V
- the graph vertex typeE
- the graph edge typepublic interface ShortestPathAlgorithm<V,E>
Modifier and Type | Interface and Description |
---|---|
static interface |
ShortestPathAlgorithm.SingleSourcePaths<V,E>
A set of paths starting from a single source vertex.
|
Modifier and Type | Method and Description |
---|---|
GraphPath<V,E> |
getPath(V source,
V sink)
Get a shortest path from a source vertex to a sink vertex.
|
ShortestPathAlgorithm.SingleSourcePaths<V,E> |
getPaths(V source)
Compute all shortest paths starting from a single source vertex.
|
double |
getPathWeight(V source,
V sink)
Get the weight of the shortest path from a source vertex to a sink vertex.
|
GraphPath<V,E> getPath(V source, V sink)
source
- the source vertexsink
- the target vertexdouble getPathWeight(V source, V sink)
Double.POSITIVE_INFINITY
if no path exists.source
- the source vertexsink
- the sink vertexDouble.POSITIVE_INFINITY
if no path existsShortestPathAlgorithm.SingleSourcePaths<V,E> getPaths(V source)
source
- the source vertexCopyright © 2019. All rights reserved.