N
- node classE
- edge class@ParametersAreNonnullByDefault public 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.
|
@Nonnull N getInitialNode()
float getShortestPathDistance(N target)
target
- the target nodeGraphs.INVALID_DISTANCE
if there exists no such path.@Nullable List<E> getShortestPath(N target)
Note that implementations might construct these paths on-the-fly.
target
- the target node@Nullable E getShortestPathEdge(N target)
target
- the target nodeCopyright © 2018. All rights reserved.