public interface Weighting
Modifier and Type | Method and Description |
---|---|
long |
calcMillis(EdgeIteratorState edgeState,
boolean reverse,
int prevOrNextEdgeId)
This method calculates the time taken (in milli seconds) for the specified edgeState and
optionally include the turn costs (in seconds) of the previous (or next) edgeId via
prevOrNextEdgeId.
|
double |
calcWeight(EdgeIteratorState edgeState,
boolean reverse,
int prevOrNextEdgeId)
This method calculates the weighting a certain edgeState should be associated.
|
FlagEncoder |
getFlagEncoder() |
double |
getMinWeight(double distance)
Used only for the heuristic estimation in A*
|
String |
getName() |
boolean |
matches(HintsMap map)
Returns true if the specified weighting and encoder matches to this Weighting.
|
double getMinWeight(double distance)
double calcWeight(EdgeIteratorState edgeState, boolean reverse, int prevOrNextEdgeId)
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.prevOrNextEdgeId
- if reverse is false this has to be the previous edgeId, if true it
has to be the next edgeId in the direction from start to end.long calcMillis(EdgeIteratorState edgeState, boolean reverse, int prevOrNextEdgeId)
FlagEncoder getFlagEncoder()
String getName()
boolean matches(HintsMap map)
Copyright © 2012–2018. All rights reserved.