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. |
default double |
calcEdgeWeightWithAccess(EdgeIteratorState edgeState,
boolean reverse) |
long |
calcTurnMillis(int inEdge,
int viaNode,
int outEdge) |
double |
calcTurnWeight(int inEdge,
int viaNode,
int outEdge) |
boolean |
edgeHasNoAccess(EdgeIteratorState edgeState,
boolean reverse) |
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)
boolean edgeHasNoAccess(EdgeIteratorState edgeState, boolean reverse)
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()
String getName()
default double calcEdgeWeightWithAccess(EdgeIteratorState edgeState, boolean reverse)
Copyright © 2012–2022. All rights reserved.