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 java.lang.Object implements AStarAdmissibleHeuristic<V>
Helper class for backward search, since it should operate on the reversed graph.
-
-
Field Summary
Fields Modifier and Type Field Description private AStarAdmissibleHeuristic<V>
heuristic
-
Constructor Summary
Constructors Constructor Description ReversedGraphHeuristic(AStarAdmissibleHeuristic<V> heuristic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
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 Detail
-
heuristic
private final AStarAdmissibleHeuristic<V> heuristic
-
-
Constructor Detail
-
ReversedGraphHeuristic
ReversedGraphHeuristic(AStarAdmissibleHeuristic<V> heuristic)
-
-
Method Detail
-
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 interfaceAStarAdmissibleHeuristic<V>
- Parameters:
sourceVertex
- the source vertextargetVertex
- the target vertex- Returns:
- an estimate of the distance from the source to the target vertex
-
-