public class AvoidEdgesWeighting extends AbstractAdjustedWeighting
Modifier and Type | Field and Description |
---|---|
protected com.carrotsearch.hppc.IntSet |
visitedEdges |
superWeighting
INFINITE_U_TURN_COSTS
Constructor and Description |
---|
AvoidEdgesWeighting(Weighting superWeighting) |
Modifier and Type | Method and Description |
---|---|
void |
addEdges(Collection<EdgeIteratorState> edges)
This method adds the specified path to this weighting which should be penalized in the
calcWeight method.
|
double |
calcEdgeWeight(EdgeIteratorState edgeState,
boolean reverse)
This method calculates the weight of a given
EdgeIteratorState . |
String |
getName() |
AvoidEdgesWeighting |
setEdgePenaltyFactor(double edgePenaltyFactor) |
calcEdgeMillis, calcTurnMillis, calcTurnWeight, getFlagEncoder, getMinWeight, hasTurnCosts, toString
public AvoidEdgesWeighting(Weighting superWeighting)
public AvoidEdgesWeighting setEdgePenaltyFactor(double edgePenaltyFactor)
public void addEdges(Collection<EdgeIteratorState> edges)
public double calcEdgeWeight(EdgeIteratorState edgeState, boolean reverse)
Weighting
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.calcEdgeWeight
in interface Weighting
calcEdgeWeight
in class AbstractAdjustedWeighting
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 String getName()
Copyright © 2012–2020. All rights reserved.