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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetCostEstimate(V sourceVertex, V targetVertex) An admissible "heuristic estimate" of the distance from $x$, the sourceVertex, to the goal (usually denoted $h(x)$).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AStarAdmissibleHeuristic
isConsistent
-
Field Details
-
heuristic
-
-
Constructor Details
-
ReversedGraphHeuristic
ReversedGraphHeuristic(AStarAdmissibleHeuristic<V> heuristic)
-
-
Method Details
-
getCostEstimate
Description copied from interface:AStarAdmissibleHeuristicAn 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:
getCostEstimatein interfaceAStarAdmissibleHeuristic<V>- Parameters:
sourceVertex- the source vertextargetVertex- the target vertex- Returns:
- an estimate of the distance from the source to the target vertex
-