|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javanetworkanalyzer.alg.GraphSearchAlgorithm<V,E>
org.javanetworkanalyzer.alg.Dijkstra<VWCent,E>
org.javanetworkanalyzer.alg.DijkstraForCentrality<E>
public class DijkstraForCentrality<E extends EdgeSPT>
An implementation of Dijkstra's algorithm which can be used to calculate
betweenness and closeness in a GraphAnalyzer.
| Field Summary |
|---|
| Fields inherited from class org.javanetworkanalyzer.alg.Dijkstra |
|---|
TOLERANCE |
| Fields inherited from class org.javanetworkanalyzer.alg.GraphSearchAlgorithm |
|---|
currentStartNode, graph |
| Constructor Summary | |
|---|---|
DijkstraForCentrality(org.jgrapht.Graph<VWCent,E> graph,
Stack<VWCent> stack)
Constructs a new DijkstraForCentrality object. |
|
| Method Summary | |
|---|---|
WeightedPathLengthData |
getPaths()
Returns the path length data. |
protected void |
init(VWCent startNode)
Performs any initializations to be done at the start of the TraversalAlg.calculate(V) method. |
protected void |
multipleShortestPathUpdate(VWCent u,
VWCent v,
E e)
Updates to be performed if the path to v through u is a new multiple shortest path. |
protected boolean |
preRelaxStep(VWCent startNode,
VWCent u)
Before relaxing the outgoing edges of u, we push it to the stack and record its shortest path length. |
protected void |
shortestPathSoFarUpdate(VWCent startNode,
VWCent u,
VWCent v,
Double uvWeight,
E e,
PriorityQueue<VWCent> queue)
Updates to be performed if the path to v through u is the shortest path to v found so far. |
| Methods inherited from class org.javanetworkanalyzer.alg.Dijkstra |
|---|
calculate, calculate, manyToMany, manyToOne, oneToMany, oneToOne, reconstructTraversalGraph, relax |
| Methods inherited from class org.javanetworkanalyzer.alg.GraphSearchAlgorithm |
|---|
outdegree, outgoingEdgesOf, outgoingEdgesOf, reconstructTraversalGraph, successorListOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.javanetworkanalyzer.alg.TraversalAlg |
|---|
calculate, reconstructTraversalGraph |
| Constructor Detail |
|---|
public DijkstraForCentrality(org.jgrapht.Graph<VWCent,E> graph,
Stack<VWCent> stack)
DijkstraForCentrality object.
graph - The graph.stack - The stack which will return nodes ordered by non-increasing
distance from startNode.| Method Detail |
|---|
protected void init(VWCent startNode)
GraphSearchAlgorithmTraversalAlg.calculate(V) method.
init in class Dijkstra<VWCent,E extends EdgeSPT>startNode - Start node
protected boolean preRelaxStep(VWCent startNode,
VWCent u)
preRelaxStep in class Dijkstra<VWCent,E extends EdgeSPT>u - Vertex u.
protected void shortestPathSoFarUpdate(VWCent startNode,
VWCent u,
VWCent v,
Double uvWeight,
E e,
PriorityQueue<VWCent> queue)
Dijkstra
shortestPathSoFarUpdate in class Dijkstra<VWCent,E extends EdgeSPT>u - Vertex uv - Vertex vuvWeight - w(u,v)e - Edge equeue - Queue
protected void multipleShortestPathUpdate(VWCent u,
VWCent v,
E e)
Dijkstra
multipleShortestPathUpdate in class Dijkstra<VWCent,E extends EdgeSPT>u - Vertex uv - Vertex ve - Edge epublic WeightedPathLengthData getPaths()
CentralityAlg
getPaths in interface CentralityAlg<VWCent,E extends EdgeSPT,WeightedPathLengthData>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||