From: BFL: a node and edge betweenness based fast layout algorithm for large scale networks
1: procedure FAST DENSITY(v,currentCoord) |
---|
2: Set currentNode ← head of tree T |
3: while currentNode is not a leaf do |
4: if currentCoord > currentNode.vpartition then |
5: if currentCoord > currentNode.hpartition then |
6: Set currentNode ← currentNode.topRight |
7: else Set currentNode ← currentNode.bottomRight |
8: end if |
9: else |
10: if currentCoord > currentNode.hpartition then |
11: Set currentNode ← currentNode.topLeft |
12: else Set currentNode ← currentNode.bottomLeft |
13: end if |
14: end if |
15: end while |
16: for all node in Set currentNode do |
17: Add density ← |
18: if v and node overlap then |
19: Return ∞ |
20: end if |
21: end for |
22: Return density |
23: end procedure |
24: procedure FAST PLACE NODE(v,v') |
25: Set v.coordinate ← Coordinate generated by a Gaussian centered at v'.coordinate with variance c1N odeBC [v]2 |
26: Anneal(v,threshold) |
27: Push v → S |
28: InsertNode(v) ▹ Node insertion to tree added |
29: Get set of nodes ← values in H with key v ▹ Get orphans which can now be placed |
30: for all node in nodes do |
31: PlaceNode(node,v) |
32: end for |
33: end procedure |
34: procedure INSERT NODE(v) |
35: Set currentN ode ← head of tree T |
36: while currentN ode is not a leaf do |
37: if currentCoord > currentN ode.vpartition then |
38: if currentCoord > currentN ode.hpartition then |
39: Set currentN ode ← currentN ode.topRight |
40: else Set currentN ode ← currentN ode.bottomRight |
41: end if |
42: else |
43: if currentCoord > currentN ode.hpartition then |
44: Set currentN ode ← currentN ode.topLef t |
45: else Set currentN ode ← currentN ode.bottomLef t |
46: end if |
47: end if |
48: end while |
49: currentN ode.add(v) |
50: while currentN ode.size > maxT reeSize do22 |
51: Set currentN ode.topRight ← currentN ode.partitionT opRight |
52: Set currentN ode.topLeft ← currentN ode.partitionT opLef t |
53: Set currentN ode.bottomRight ← currentN ode.partitionBottomRight |
54: Set currentN ode.bottomLeft ← currentN ode.partitionBottomLef t |
55: end while |
56: end procedure |