Package com.graphhopper.routing
Interface RoutingAlgorithm
- All Known Subinterfaces:
EdgeToEdgeRoutingAlgorithm
- All Known Implementing Classes:
AbstractBidirAlgo
,AbstractBidirCHAlgo
,AbstractBidirectionEdgeCHNoSOD
,AbstractNonCHBidirAlgo
,AbstractRoutingAlgorithm
,AlternativeRoute
,AlternativeRouteCH
,AlternativeRouteEdgeCH
,AStar
,AStarBidirection
,AStarBidirectionCH
,AStarBidirectionEdgeCHNoSOD
,Dijkstra
,DijkstraBidirectionCH
,DijkstraBidirectionCHNoSOD
,DijkstraBidirectionEdgeCHNoSOD
,DijkstraBidirectionRef
,DijkstraOneToMany
,ShortestPathTree
public interface RoutingAlgorithm
Calculates the shortest path from the specified node ids. Can be used only once.
- Author:
- Peter Karich
-
Method Summary
Modifier and TypeMethodDescriptioncalcPath
(int from, int to) Calculates the best path between the specified nodes.calcPaths
(int from, int to) Calculates multiple possibilities for a path.getName()
int
Returns the visited nodes after searching.void
setMaxVisitedNodes
(int numberOfNodes) Limit the search to numberOfNodes.void
setTimeoutMillis
(long timeoutMillis) Limit the search to the given time in milliseconds
-
Method Details
-
calcPath
Calculates the best path between the specified nodes.- Returns:
- the path. Call the method found() to make sure that the path is valid.
-
calcPaths
Calculates multiple possibilities for a path.- See Also:
-
setMaxVisitedNodes
void setMaxVisitedNodes(int numberOfNodes) Limit the search to numberOfNodes. See #681 -
setTimeoutMillis
void setTimeoutMillis(long timeoutMillis) Limit the search to the given time in milliseconds -
getName
String getName()- Returns:
- name of this algorithm
-
getVisitedNodes
int getVisitedNodes()Returns the visited nodes after searching. Useful for debugging.
-