|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectannas.graph.util.Floyd<N,A>
N
- Node typeA
- Arc typepublic class Floyd<N,A extends ArcInterface<N>>
Determines all pair shortest paths, as described here
Constructor Summary | |
---|---|
Floyd(GraphInterface<N,A> g)
Default constructor |
Method Summary | |
---|---|
double[][] |
getD()
The distance matrix for the current graph. |
double |
getDistance(N A,
N B)
Finds the distance between the two nodes, by looking in the distance matrix. |
int[][] |
getR()
The route matrix for the current graph. |
GraphPath<N,A> |
getRoute(N A,
N B)
Find the route through the Graph from the source node to the destination node, by using the route matrix. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Floyd(GraphInterface<N,A> g)
g
- Graph o perform algorithm on.Method Detail |
---|
public int[][] getR()
public double[][] getD()
public double getDistance(N A, N B)
A
- SourceB
- Destination
public GraphPath<N,A> getRoute(N A, N B)
A
- SourceB
- Destination
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |