Interface HeuristicCostFunction

  • All Known Implementing Classes:
    DummyCostFunction, EuclideanCostFunction, GeodeticCostFunction

    public interface HeuristicCostFunction
    This interface defines the heuristic cost function from one point to another. This interface is used in A* search and dynamic link level selector. This package provides two heuristic cost implementations for spatial networks: GeodeticCostFunction and EuclideanCostFunction. Users can provide their own cost estimates to guide the A* search. In order to guarantee optimality of A* search result, the heuristic cost from the current point to the target point must be smaller than the minimum cost from the current point to the target point.
    Since:
    11gR2
    • Method Detail

      • getHeuristicCost

        double getHeuristicCost​(HeavyPointOnNet currentPoint,
                                HeavyPointOnNet targetPoint)
        Returns the heuristic cost from the current point to the target point.
        Parameters:
        currentPoint - current point
        targetPoint - target point
        Returns:
        estimated cost from current point to target point)
      • getUserDataCategories

        int[] getUserDataCategories()
        Returns the required user data categories.
        Returns: