public class PreparationWeighting extends Object implements Weighting
PrepareContractionHierarchies| Constructor and Description |
|---|
PreparationWeighting(Weighting userWeighting) |
| Modifier and Type | Method and Description |
|---|---|
long |
calcMillis(EdgeIteratorState edgeState,
boolean reverse,
int prevOrNextEdgeId)
This method calculates the time taken (in milli seconds) for the specified edgeState and
optionally include the turn costs (in seconds) of the previous (or next) edgeId via
prevOrNextEdgeId.
|
double |
calcWeight(EdgeIteratorState edgeState,
boolean reverse,
int prevOrNextEdgeId)
This method calculates the weighting a certain edgeState should be associated.
|
FlagEncoder |
getFlagEncoder() |
double |
getMinWeight(double distance)
Used only for the heuristic estimation in A*
|
String |
getName() |
boolean |
matches(HintsMap map)
Returns true if the specified weighting and encoder matches to this Weighting.
|
String |
toString() |
public PreparationWeighting(Weighting userWeighting)
public final double getMinWeight(double distance)
WeightinggetMinWeight in interface Weightingpublic double calcWeight(EdgeIteratorState edgeState, boolean reverse, int prevOrNextEdgeId)
WeightingcalcWeight in interface WeightingedgeState - the edge for which the weight should be calculatedreverse - if the specified edge is specified in reverse direction e.g. from the reverse
case of a bidirectional search.prevOrNextEdgeId - if reverse is false this has to be the previous edgeId, if true it
has to be the next edgeId in the direction from start to end.public long calcMillis(EdgeIteratorState edgeState, boolean reverse, int prevOrNextEdgeId)
WeightingcalcMillis in interface Weightingpublic FlagEncoder getFlagEncoder()
getFlagEncoder in interface Weightingpublic boolean matches(HintsMap map)
WeightingCopyright © 2012–2018. All rights reserved.