Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
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 TypeMethodDescriptiondouble
getCostEstimate
(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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jgrapht.alg.interfaces.AStarAdmissibleHeuristic
isConsistent
-
Field Details
-
heuristic
-
-
Constructor Details
-
ReversedGraphHeuristic
ReversedGraphHeuristic(AStarAdmissibleHeuristic<V> heuristic)
-
-
Method Details
-
getCostEstimate
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 interfaceAStarAdmissibleHeuristic<V>
- Parameters:
sourceVertex
- the source vertextargetVertex
- the target vertex- Returns:
- an estimate of the distance from the source to the target vertex
-