|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--SSF.OS.OSPF.Dijkstra
Dijkstra's shortest path algorithm. Most of the algorithm is taken from Introduction to Algorithms by Cormen, Leiserson and Rivest.
| Constructor Summary | |
Dijkstra(java.util.Hashtable G,
java.lang.String s)
Constructs a new instance of a Dijkstra's algorithm execution given a graph (where vertices are routers and edges are links) and a source vertex. |
|
| Method Summary | |
boolean |
computed()
Returns true if all information initiated and shortest paths calculated. |
boolean |
findAllShortestPaths()
Returns the true if all the shortest paths can be found. |
int |
getDistance(java.lang.String nhipref)
Returns the distance from the source to the given vertex. |
java.lang.String |
nextHop(java.lang.String src,
java.lang.String dest)
Returns the NHI prefix of the next hop given a destination NHI prefix. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Dijkstra(java.util.Hashtable G,
java.lang.String s)
| Method Detail |
public boolean findAllShortestPaths()
public int getDistance(java.lang.String nhipref)
nhipref - The NHI prefix address of the router (vertex) to find the
distance to.
public java.lang.String nextHop(java.lang.String src,
java.lang.String dest)
src - The NHI prefix address of the router to find the next hop
from.dest - The NHI prefix address of the router toward which the next
hop is to be determined.public boolean computed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||