V
- the graph vertex typeE
- the graph edge typepublic static interface ShortestPathAlgorithm.SingleSourcePaths<V,E>
Modifier and Type | Method and Description |
---|---|
Graph<V,E> |
getGraph()
Returns the graph over which this set of paths is defined.
|
GraphPath<V,E> |
getPath(V sink)
Return the path from the source vertex to the sink vertex.
|
V |
getSourceVertex()
Returns the single source vertex.
|
double |
getWeight(V sink)
Return the weight of the path from the source vertex to the sink vertex.
|
Graph<V,E> getGraph()
V getSourceVertex()
double getWeight(V sink)
Double.POSITIVE_INFINITY
is returned. The weight of the path between a
vertex and itself is always zero.sink
- the sink vertexDouble.POSITIVE_INFINITY
in case no such path existsCopyright © 2019. All rights reserved.