public class ShortestWeighting extends AbstractWeighting
accessEnc, avSpeedEnc, flagEncoder
INFINITE_U_TURN_COSTS
Constructor and Description |
---|
ShortestWeighting(FlagEncoder flagEncoder) |
ShortestWeighting(FlagEncoder flagEncoder,
TurnCostProvider turnCostProvider) |
Modifier and Type | Method and Description |
---|---|
double |
calcEdgeWeight(EdgeIteratorState edgeState,
boolean reverse)
In most cases subclasses should only override this method to change the edge-weight.
|
double |
getMinWeight(double currDistToGoal)
Used only for the heuristic estimation in A*
|
String |
getName() |
calcEdgeMillis, calcTurnMillis, calcTurnWeight, equals, getFlagEncoder, hashCode, hasTurnCosts, toString
public ShortestWeighting(FlagEncoder flagEncoder)
public ShortestWeighting(FlagEncoder flagEncoder, TurnCostProvider turnCostProvider)
public double getMinWeight(double currDistToGoal)
Weighting
public double calcEdgeWeight(EdgeIteratorState edgeState, boolean reverse)
AbstractWeighting
TurnCostProvider
implementation to the constructor instead.calcEdgeWeight
in interface Weighting
calcEdgeWeight
in class AbstractWeighting
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.public String getName()
Copyright © 2012–2020. All rights reserved.