public class AvoidEdgesWeighting extends AbstractAdjustedWeighting
| Modifier and Type | Field and Description |
|---|---|
protected com.carrotsearch.hppc.IntSet |
visitedEdges |
superWeighting| 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 |
calcWeight(EdgeIteratorState edgeState,
boolean reverse,
int prevOrNextEdgeId)
This method calculates the weighting a certain edgeState should be associated.
|
double |
getMinWeight(double distance)
Used only for the heuristic estimation in A*
|
String |
getName() |
AvoidEdgesWeighting |
setEdgePenaltyFactor(double edgePenaltyFactor) |
calcMillis, getFlagEncoder, matches, toStringpublic AvoidEdgesWeighting(Weighting superWeighting)
public AvoidEdgesWeighting setEdgePenaltyFactor(double edgePenaltyFactor)
public void addEdges(Collection<EdgeIteratorState> edges)
public double getMinWeight(double distance)
Weightingpublic double calcWeight(EdgeIteratorState edgeState, boolean reverse, int prevOrNextEdgeId)
WeightingedgeState - 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.public String getName()
Copyright © 2012–2018. All rights reserved.