-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathBetweeness.java
More file actions
27 lines (23 loc) · 813 Bytes
/
Copy pathBetweeness.java
File metadata and controls
27 lines (23 loc) · 813 Bytes
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
26
27
import java.util.HashMap;
public class Betweeness {
/**
* Construct an object to compute betweeness centrality
* for the given friend graph
**/
HashMap<Friend,Integer> betweens = new HashMap<Friend,Integer>();
public Betweeness(HashMap<String, Friend> people) {
}
/**
* Compute betweeness centrality for a node in the friend graph using
* Brandes' algorithm:
* http://www.inf.uni-konstanz.de/algo/publications/b-fabc-01.pdf
* Note this algorithm gives betweeness centrality for all nodes.
* You may want to consider computing this only once and storing
* it in a lookup table that this method refers to.
*
* @returns the betweeness centrality of root
**/
public double calculate(Friend root) {
return 0.0;
}
}