public class InterleavedBidirectionalHeuristic extends Object implements RemainingWeightHeuristic
Constructor and Description |
---|
InterleavedBidirectionalHeuristic(Graph graph) |
Modifier and Type | Method and Description |
---|---|
void |
doSomeWork()
Do up to N iterations as long as the queue is not empty
|
double |
estimateRemainingWeight(State s)
We must return an underestimate of the cost to reach the destination no matter how much
progress has been made on the heuristic search.
|
void |
initialize(RoutingRequest options,
long abortTime)
Perform any one-time setup and pre-computation that will be needed by later calls to
computeForwardWeight/computeReverseWeight.
|
void |
reset()
Reset any cached data in the heuristic, before reuse in a search with the same destination.
|
public InterleavedBidirectionalHeuristic(Graph graph)
public void initialize(RoutingRequest options, long abortTime)
RemainingWeightHeuristic
initialize
in interface RemainingWeightHeuristic
abortTime
- time since the Epoch in milliseconds at which we should bail out of initialization,
or Long.MAX_VALUE for no limit.public void doSomeWork()
doSomeWork
in interface RemainingWeightHeuristic
public double estimateRemainingWeight(State s)
estimateRemainingWeight
in interface RemainingWeightHeuristic
public void reset()
RemainingWeightHeuristic
reset
in interface RemainingWeightHeuristic
Copyright © 2015. All rights reserved.