summaryrefslogtreecommitdiff
path: root/src/Chapter4/centrality/examples/EigenvectorCentralityExample.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Chapter4/centrality/examples/EigenvectorCentralityExample.java')
-rw-r--r--src/Chapter4/centrality/examples/EigenvectorCentralityExample.java36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/Chapter4/centrality/examples/EigenvectorCentralityExample.java b/src/Chapter4/centrality/examples/EigenvectorCentralityExample.java
deleted file mode 100644
index 172dd16..0000000
--- a/src/Chapter4/centrality/examples/EigenvectorCentralityExample.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package centrality.examples;
-
-import Chapter4.util.TweetFileToGraph;
-import java.io.File;
-import GraphElements.RetweetEdge;
-import GraphElements.UserNode;
-import edu.uci.ics.jung.algorithms.scoring.EigenvectorCentrality;
-import edu.uci.ics.jung.graph.DirectedGraph;
-
-public class EigenvectorCentralityExample {
- public static void main(String[] args){
-
- File tweetFile;
-
- if(args.length > 0){
- tweetFile = new File(args[0]);
- }
- else{
- tweetFile = new File("synthetic_retweet_network.json");
- }
-
- DirectedGraph<UserNode, RetweetEdge> retweetGraph = TweetFileToGraph.getRetweetNetwork(tweetFile);
-
-// EigenVectorScorer scorer = new EigenVectorScorer(retweetGraph);
-// for(UserNode node : retweetGraph.getVertices()){
-// System.out.println(node + " - " + scorer.getVertexScore(node));
-// }
-
- EigenvectorCentrality<UserNode, RetweetEdge> eig = new EigenvectorCentrality<UserNode, RetweetEdge>(retweetGraph);
- eig.evaluate();
-
- for(UserNode node : retweetGraph.getVertices()){
- System.out.println(node + " - " + eig.getVertexScore(node));
- }
- }
-}