blob: 0926d34873bf5f33c976ac740d41526c832d29df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package util;
import GraphElements.RetweetEdge;
import GraphElements.UserNode;
import edu.uci.ics.jung.algorithms.scoring.VertexScorer;
import edu.uci.ics.jung.algorithms.shortestpath.DijkstraShortestPath;
import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.Hypergraph;
public class BetweennessScorer implements VertexScorer<UserNode, Double>{
public BetweennessScorer(Hypergraph<UserNode, RetweetEdge> graph){
/*
* Step 1: Calculate the shortest path between each pair of nodes.
*/
DijkstraShortestPath<UserNode, RetweetEdge> paths = new DijkstraShortestPath<UserNode, RetweetEdge>((Graph<UserNode, RetweetEdge>) graph);
// paths.getDistance(source, target);
}
public Double getVertexScore(UserNode arg0) {
// TODO Auto-generated method stub
return null;
}
}
|