public interface Weighting
Modifier and Type | Field and Description |
---|---|
static int |
INFINITE_U_TURN_COSTS |
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)
This method calculates the weight of a given
EdgeIteratorState . |
long |
calcTurnMillis(int inEdge,
int viaNode,
int outEdge) |
double |
calcTurnWeight(int inEdge,
int viaNode,
int outEdge) |
FlagEncoder |
getFlagEncoder() |
double |
getMinWeight(double distance)
Used only for the heuristic estimation in A*
|
String |
getName() |
boolean |
hasTurnCosts()
This method can be used to check whether or not this weighting returns turn costs (or if they are all zero).
|
static final int INFINITE_U_TURN_COSTS
double getMinWeight(double distance)
double calcEdgeWeight(EdgeIteratorState edgeState, boolean reverse)
EdgeIteratorState
. E.g. a high value indicates that the edge
should be avoided during shortest path search. Make sure that this method is very fast and optimized as this is
called potentially millions of times for one route or a lot more for nearly any preprocessing phase.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.long calcEdgeMillis(EdgeIteratorState edgeState, boolean reverse)
double calcTurnWeight(int inEdge, int viaNode, int outEdge)
long calcTurnMillis(int inEdge, int viaNode, int outEdge)
boolean hasTurnCosts()
FlagEncoder getFlagEncoder()
String getName()
Copyright © 2012–2020. All rights reserved.