public class PriorityWeighting extends FastestWeighting
| Modifier and Type | Field and Description |
|---|---|
protected DecimalEncodedValue |
priorityEnc |
DESTINATION_FACTOR, PRIVATE_FACTOR, SPEED_CONVaccessEnc, speedEncINFINITE_U_TURN_COSTS| Constructor and Description |
|---|
PriorityWeighting(BooleanEncodedValue accessEnc,
DecimalEncodedValue speedEnc,
DecimalEncodedValue priorityEnc,
EnumEncodedValue<RoadAccess> roadAccessEnc,
PMap pMap,
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 distance)
Used only for the heuristic estimation in A*
|
calcEdgeMillis, getNamecalcTurnMillis, calcTurnWeight, edgeHasNoAccess, getTurnCostProvider, hasTurnCosts, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcalcEdgeWeightWithAccessprotected final DecimalEncodedValue priorityEnc
public PriorityWeighting(BooleanEncodedValue accessEnc, DecimalEncodedValue speedEnc, DecimalEncodedValue priorityEnc, EnumEncodedValue<RoadAccess> roadAccessEnc, PMap pMap, TurnCostProvider turnCostProvider)
public double getMinWeight(double distance)
WeightinggetMinWeight in interface WeightinggetMinWeight in class FastestWeightingpublic double calcEdgeWeight(EdgeIteratorState edgeState, boolean reverse)
AbstractWeightingTurnCostProvider implementation to the constructor instead.calcEdgeWeight in interface WeightingcalcEdgeWeight in class FastestWeightingedgeState - 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.Copyright © 2012–2022. All rights reserved.