|
||||||||||
| 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.BFS<VUCent,E>
org.javanetworkanalyzer.alg.BFSForCentrality<E>
public class BFSForCentrality<E extends EdgeSPT>
Uses BFS to do graph analysis (calculating betweenness centrality, etc.).
| Field Summary |
|---|
| Fields inherited from class org.javanetworkanalyzer.alg.GraphSearchAlgorithm |
|---|
currentStartNode, graph |
| Constructor Summary | |
|---|---|
BFSForCentrality(org.jgrapht.Graph<VUCent,E> graph,
Stack<VUCent> stack)
Constructs a new BFSForCentrality object. |
|
| Method Summary | |
|---|---|
protected VUCent |
dequeueStep(LinkedList<VUCent> queue)
Dequeues a node from the given queue and pushes it to the stack. |
protected void |
firstTimeFoundStep(VUCent current,
VUCent neighbor)
Work to be done after BFS.enqueueAndUpdateDistance(V, V, java.util.LinkedList. |
UnweightedPathLengthData |
getPaths()
Returns the path length data. |
protected void |
init(VUCent startNode)
Performs any initializations to be done at the start of the TraversalAlg.calculate(V) method. |
protected void |
shortestPathStep(VUCent current,
VUCent neighbor,
E e)
Work to be done if this is a shortest path from the start node to neighbor via current. |
| Methods inherited from class org.javanetworkanalyzer.alg.BFS |
|---|
calculate, enqueueAndUpdateDistance |
| 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 BFSForCentrality(org.jgrapht.Graph<VUCent,E> graph,
Stack<VUCent> stack)
BFSForCentrality object.
graph - The graph.stack - Stack which returns nodes in order of non-increasing
distance from the start node| Method Detail |
|---|
protected void init(VUCent startNode)
GraphSearchAlgorithmTraversalAlg.calculate(V) method.
init in class BFS<VUCent,E extends EdgeSPT>startNode - Start nodeprotected VUCent dequeueStep(LinkedList<VUCent> queue)
dequeueStep in class BFS<VUCent,E extends EdgeSPT>queue - The queue.
protected void firstTimeFoundStep(VUCent current,
VUCent neighbor)
BFSBFS.enqueueAndUpdateDistance(V, V, java.util.LinkedList) .
firstTimeFoundStep in class BFS<VUCent,E extends EdgeSPT>current - Current nodeneighbor - Neighbor node
protected void shortestPathStep(VUCent current,
VUCent neighbor,
E e)
BFS
shortestPathStep in class BFS<VUCent,E extends EdgeSPT>current - Current nodeneighbor - Neighbor nodee - Edge (current, neighbor)public UnweightedPathLengthData getPaths()
CentralityAlg
getPaths in interface CentralityAlg<VUCent,E extends EdgeSPT,UnweightedPathLengthData>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||