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 Type
    Method
    Description
    calcPath(int from, int to)
    Calculates the best path between the specified nodes.
    calcPaths(int from, int to)
    Calculates multiple possibilities for a path.
     
    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

      Path calcPath(int from, int to)
      Calculates the best path between the specified nodes.
      Returns:
      the path. Call the method found() to make sure that the path is valid.
    • calcPaths

      List<Path> calcPaths(int from, int to)
      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.