Class BidirectionalAStarShortestPath.ReversedGraphHeuristic

java.lang.Object
org.jgrapht.alg.shortestpath.BidirectionalAStarShortestPath.ReversedGraphHeuristic
All Implemented Interfaces:
AStarAdmissibleHeuristic<V>
Enclosing class:
BidirectionalAStarShortestPath<V,E>

class BidirectionalAStarShortestPath.ReversedGraphHeuristic extends Object implements AStarAdmissibleHeuristic<V>
Helper class for backward search, since it should operate on the reversed graph.
  • Field Details

  • Constructor Details

  • Method Details

    • getCostEstimate

      public double getCostEstimate(V sourceVertex, V targetVertex)
      Description copied from interface: AStarAdmissibleHeuristic
      An admissible "heuristic estimate" of the distance from $x$, the sourceVertex, to the goal (usually denoted $h(x)$). This is the good guess function which must never overestimate the distance.
      Specified by:
      getCostEstimate in interface AStarAdmissibleHeuristic<V>
      Parameters:
      sourceVertex - the source vertex
      targetVertex - the target vertex
      Returns:
      an estimate of the distance from the source to the target vertex