public class PriorityWeighting extends FastestWeighting
Modifier and Type | Field and Description |
---|---|
static int |
KEY
For now used only in BikeCommonFlagEncoder, FootEncoder and MotorcycleFlagEncoder
|
SPEED_CONV
flagEncoder
Constructor and Description |
---|
PriorityWeighting(FlagEncoder encoder) |
PriorityWeighting(FlagEncoder encoder,
PMap pMap) |
Modifier and Type | Method and Description |
---|---|
double |
calcWeight(EdgeIteratorState edgeState,
boolean reverse,
int prevOrNextEdgeId)
This method calculates the weighting a certain edgeState should be associated.
|
double |
getMinWeight(double distance)
Used only for the heuristic estimation in A*
|
calcMillis, getName
equals, getFlagEncoder, hashCode, matches, toString, weightingToFileName
public static final int KEY
public PriorityWeighting(FlagEncoder encoder)
public PriorityWeighting(FlagEncoder encoder, PMap pMap)
public double getMinWeight(double distance)
Weighting
getMinWeight
in interface Weighting
getMinWeight
in class FastestWeighting
public double calcWeight(EdgeIteratorState edgeState, boolean reverse, int prevOrNextEdgeId)
Weighting
calcWeight
in interface Weighting
calcWeight
in class FastestWeighting
edgeState
- 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.Copyright © 2012–2018. All rights reserved.