| Constructor and Description |
|---|
TurnWeighting(Weighting superWeighting,
TurnCostExtension turnCostExt) |
| 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 |
calcTurnWeight(int edgeFrom,
int nodeVia,
int edgeTo)
This method calculates the turn weight separately.
|
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 weightingMap)
Returns true if the specified weighting and encoder matches to this Weighting.
|
TurnWeighting |
setDefaultUTurnCost(double costInSeconds)
Set the default cost for an u-turn in seconds.
|
String |
toString() |
public TurnWeighting(Weighting superWeighting, TurnCostExtension turnCostExt)
turnCostExt - the turn cost storage to be usedpublic TurnWeighting setDefaultUTurnCost(double costInSeconds)
public 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 double calcTurnWeight(int edgeFrom,
int nodeVia,
int edgeTo)
public FlagEncoder getFlagEncoder()
getFlagEncoder in interface Weightingpublic boolean matches(HintsMap weightingMap)
WeightingCopyright © 2012–2018. All rights reserved.