public class FastestWeighting extends AbstractWeighting
| Modifier and Type | Field and Description |
|---|---|
protected static double |
SPEED_CONV
Converting to seconds is not necessary but makes adding other penalties easier (e.g.
|
accessEnc, avSpeedEnc, flagEncoderINFINITE_U_TURN_COSTS| Constructor and Description |
|---|
FastestWeighting(FlagEncoder encoder) |
FastestWeighting(FlagEncoder encoder,
PMap map) |
FastestWeighting(FlagEncoder encoder,
PMap map,
TurnCostProvider turnCostProvider) |
FastestWeighting(FlagEncoder encoder,
TurnCostProvider turnCostProvider) |
| Modifier and Type | Method and Description |
|---|---|
long |
calcEdgeMillis(EdgeIteratorState edgeState,
boolean reverse)
This method calculates the time taken (in milli seconds) to travel along the specified edgeState.
|
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*
|
String |
getName() |
calcTurnMillis, calcTurnWeight, equals, getFlagEncoder, hashCode, hasTurnCosts, toStringprotected static final double SPEED_CONV
public FastestWeighting(FlagEncoder encoder)
public FastestWeighting(FlagEncoder encoder, TurnCostProvider turnCostProvider)
public FastestWeighting(FlagEncoder encoder, PMap map)
public FastestWeighting(FlagEncoder encoder, PMap map, TurnCostProvider turnCostProvider)
public double getMinWeight(double distance)
Weightingpublic double calcEdgeWeight(EdgeIteratorState edgeState, boolean reverse)
AbstractWeightingTurnCostProvider implementation to the constructor instead.calcEdgeWeight in interface WeightingcalcEdgeWeight in class AbstractWeightingedgeState - 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 long calcEdgeMillis(EdgeIteratorState edgeState, boolean reverse)
WeightingcalcEdgeMillis in interface WeightingcalcEdgeMillis in class AbstractWeightingpublic String getName()
Copyright © 2012–2020. All rights reserved.