Module org.jgrapht.core
Package org.jgrapht.alg.shortestpath
Class BidirectionalAStarShortestPath.ConsistentTerminationCriterion
java.lang.Object
BidirectionalAStarShortestPath<V,E>.org.jgrapht.alg.shortestpath.BidirectionalAStarShortestPath.TerminationCriterion
org.jgrapht.alg.shortestpath.BidirectionalAStarShortestPath.ConsistentTerminationCriterion
- Enclosing class:
BidirectionalAStarShortestPath<V,
E>
class BidirectionalAStarShortestPath.ConsistentTerminationCriterion
extends BidirectionalAStarShortestPath<V,E>.TerminationCriterion
Termination criterion for the consistent heuristics.
-
Field Summary
FieldsFields inherited from class org.jgrapht.alg.shortestpath.BidirectionalAStarShortestPath.TerminationCriterion
backward, forward
-
Constructor Summary
ConstructorsConstructorDescriptionConsistentTerminationCriterion
(BidirectionalAStarShortestPath<V, E>.AStarSearchFrontier forward, BidirectionalAStarShortestPath<V, E>.AStarSearchFrontier backward, double sourceTargetEstimate) -
Method Summary
Modifier and TypeMethodDescription(package private) boolean
stop
(double bestPath) Determines if the search should be terminated.
-
Field Details
-
sourceTargetEstimate
final double sourceTargetEstimate
-
-
Constructor Details
-
ConsistentTerminationCriterion
ConsistentTerminationCriterion(BidirectionalAStarShortestPath<V, E>.AStarSearchFrontier forward, BidirectionalAStarShortestPath<V, E>.AStarSearchFrontier backward, double sourceTargetEstimate)
-
-
Method Details
-
stop
boolean stop(double bestPath) Description copied from class:BidirectionalAStarShortestPath.TerminationCriterion
Determines if the search should be terminated.- Specified by:
stop
in classBidirectionalAStarShortestPath<V,
E>.TerminationCriterion - Parameters:
bestPath
- length of the shortest path seen so far- Returns:
- true iff the search should be terminated
-