Class DefaultTurnCostProvider
java.lang.Object
com.graphhopper.routing.weighting.DefaultTurnCostProvider
- All Implemented Interfaces:
TurnCostProvider
-
Field Summary
Fields inherited from interface com.graphhopper.routing.weighting.TurnCostProvider
NO_TURN_COST_PROVIDER
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTurnCostProvider
(BooleanEncodedValue turnRestrictionEnc, DecimalEncodedValue orientationEnc, Graph graph, TurnCostsConfig tcConfig) -
Method Summary
Modifier and TypeMethodDescriptionlong
calcTurnMillis
(int inEdge, int viaNode, int outEdge) double
calcTurnWeight
(int inEdge, int viaNode, int outEdge) toString()
-
Constructor Details
-
DefaultTurnCostProvider
public DefaultTurnCostProvider(BooleanEncodedValue turnRestrictionEnc, DecimalEncodedValue orientationEnc, Graph graph, TurnCostsConfig tcConfig)
-
-
Method Details
-
calcTurnWeight
public double calcTurnWeight(int inEdge, int viaNode, int outEdge) - Specified by:
calcTurnWeight
in interfaceTurnCostProvider
- Returns:
- the turn weight of a transitions from the edge with id to the edge with id at the node with id
-
calcTurnMillis
public long calcTurnMillis(int inEdge, int viaNode, int outEdge) - Specified by:
calcTurnMillis
in interfaceTurnCostProvider
- Returns:
- the time it takes to take a turn in milli-seconds
- See Also:
-
toString
-