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, flagEncoder
INFINITE_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, toString
protected 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)
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 long calcEdgeMillis(EdgeIteratorState edgeState, boolean reverse)
Weighting
calcEdgeMillis
in interface Weighting
calcEdgeMillis
in class AbstractWeighting
public String getName()
Copyright © 2012–2020. All rights reserved.