Interface ShortestPathAlgorithm<V,E>
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Known Subinterfaces:
ManyToManyShortestPathsAlgorithm<V,E>
- All Known Implementing Classes:
AStarShortestPath, BaseBidirectionalShortestPathAlgorithm, BaseManyToManyShortestPaths, BaseShortestPathAlgorithm, BellmanFordShortestPath, BFSShortestPath, BidirectionalAStarShortestPath, BidirectionalDijkstraShortestPath, CHManyToManyShortestPaths, ContractionHierarchyBidirectionalDijkstra, DefaultManyToManyShortestPaths, DeltaSteppingShortestPath, DijkstraManyToManyShortestPaths, DijkstraShortestPath, FloydWarshallShortestPaths, IntVertexDijkstraShortestPath, JohnsonShortestPaths, TransitNodeRoutingShortestPath
public interface ShortestPathAlgorithm<V,E>
An algorithm which computes shortest paths between vertices.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA set of paths starting from a single source vertex. -
Method Summary
Modifier and TypeMethodDescriptionGet a shortest path from a source vertex to a sink vertex.Compute all shortest paths starting from a single source vertex.doublegetPathWeight(V source, V sink) Get the weight of the shortest path from a source vertex to a sink vertex.
-
Method Details
-
getPath
-
getPathWeight
Get the weight of the shortest path from a source vertex to a sink vertex. ReturnsDouble.POSITIVE_INFINITYif no path exists.- Parameters:
source- the source vertexsink- the sink vertex- Returns:
- the weight of the shortest path from a source vertex to a sink vertex, or
Double.POSITIVE_INFINITYif no path exists
-
getPaths
Compute all shortest paths starting from a single source vertex.- Parameters:
source- the source vertex- Returns:
- the shortest paths
-