Class CustomWeightingHelper
java.lang.Object
com.graphhopper.routing.weighting.custom.CustomWeightingHelper
This class is for internal usage only. It is subclassed by Janino, then special expressions are injected into init,
getSpeed and getPriority. At the end an instance is created and used in CustomWeighting.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DecimalEncodedValueprotected CustomModelprotected EncodedValueLookupprotected DecimalEncodedValue -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal doublefinal doubledoublegetPriority(EdgeIteratorState edge, boolean reverse) protected final doublegetRawPriority(EdgeIteratorState edge, boolean reverse) protected final doublegetRawSpeed(EdgeIteratorState edge, boolean reverse) doublegetSpeed(EdgeIteratorState edge, boolean reverse) static booleanin(Polygon p, EdgeIteratorState edge) voidinit(CustomModel customModel, EncodedValueLookup lookup, DecimalEncodedValue avgSpeedEnc, DecimalEncodedValue priorityEnc, Map<String, JsonFeature> areas)
-
Field Details
-
avg_speed_enc
-
priority_enc
-
lookup
-
customModel
-
-
Constructor Details
-
CustomWeightingHelper
protected CustomWeightingHelper()
-
-
Method Details
-
init
public void init(CustomModel customModel, EncodedValueLookup lookup, DecimalEncodedValue avgSpeedEnc, DecimalEncodedValue priorityEnc, Map<String, JsonFeature> areas) -
getPriority
-
getSpeed
-
getRawSpeed
-
getRawPriority
-
calcMaxSpeed
public final double calcMaxSpeed() -
calcMaxPriority
public final double calcMaxPriority() -
in
-