|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.graph.algorithm.AllPairsShortestPath
This class implements the AllPairsShortestPath algorithm variant by Floyd by finding all shortest paths in the graph. That means it will find the shortest path for all possible distinct pairs of nodes.
| Constructor Summary | |
AllPairsShortestPath()
Constructs a new stateless instance of the AllPairsShortestPath algorithm. |
|
| Method Summary | |
int[] |
apply(Graph graph)
Returns a |V| * |V| large 2-dimensional array that represents a matrix of all shortest paths in the graph. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AllPairsShortestPath()
AllPairsShortestPath algorithm.
| Method Detail |
public int[] apply(Graph graph)
throws GraphException
This algorithm also solves the problem of TransitiveClosure in one go.
For further information consult a text book on graph theory (for example Algorithms in XXX by Sedgewick).
graph - the Graph to analyze, may not be null.
GraphException - thrown if the algorithm cannot be applied.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||