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.
|
@Nullable 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 nodeGraphs.INVALID_DISTANCE
if there exists no such path.@Nullable List<E> getShortestPath(N target)
null
if
there exists no such path.
Note that implementations might construct these paths on-the-fly.
target
- the target nodenull
if there exists no such path.E getShortestPathEdge(N target)
null
is returned.target
- the target nodenull
.Copyright © 2020. All rights reserved.