N
- node classE
- edge classpublic interface SSSPResult<N,E>
Modifier and Type | Method and Description |
---|---|
N |
getInitialNode()
Retrieves the node the source was started from.
|
List<E> |
getShortestPath(N target)
Retrieves the shortest path from the initial node to the given one (as a sequence of edges),
or null if there exists no such path.
|
float |
getShortestPathDistance(N target)
Retrieves the length of the shortest path from the initial node
to the given one.
|
E |
getShortestPathEdge(N target)
Retrieves the incoming edge via which the given node is reached on the shortest path.
|
N getInitialNode()
float getShortestPathDistance(N target)
target
- the target nodeGraphAlgorithms#INVALID_DISTANCE
if there exists no
such path.List<E> getShortestPath(N target)
Note that implementations might construct these paths on-the-fly.
target
- the target nodeE getShortestPathEdge(N target)
target
- the target nodeCopyright © 2015. All Rights Reserved.