Class RestrictionSetter
java.lang.Object
com.graphhopper.routing.util.parsers.RestrictionSetter
Used to add via-node and via-edge restrictions to a given graph. Via-edge restrictions are realized
by augmenting the graph with artificial edges. For proper handling of overlapping turn restrictions
(turn restrictions that share the same via-edges) and turn restrictions for different encoded values
it is important to add all restrictions with a single call.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRestrictionSetter
(BaseGraph baseGraph, List<BooleanEncodedValue> turnRestrictionEncs) -
Method Summary
Modifier and TypeMethodDescriptionstatic com.carrotsearch.hppc.BitSet
copyEncBits
(com.carrotsearch.hppc.BitSet encBits) createViaEdgeRestriction
(com.carrotsearch.hppc.IntArrayList edges) createViaNodeRestriction
(int fromEdge, int viaNode, int toEdge) void
setRestrictions
(List<RestrictionSetter.Restriction> restrictions, List<com.carrotsearch.hppc.BitSet> encBits)
-
Constructor Details
-
RestrictionSetter
-
-
Method Details
-
createViaNodeRestriction
public static RestrictionSetter.Restriction createViaNodeRestriction(int fromEdge, int viaNode, int toEdge) -
createViaEdgeRestriction
public static RestrictionSetter.Restriction createViaEdgeRestriction(com.carrotsearch.hppc.IntArrayList edges) -
setRestrictions
public void setRestrictions(List<RestrictionSetter.Restriction> restrictions, List<com.carrotsearch.hppc.BitSet> encBits) -
copyEncBits
public static com.carrotsearch.hppc.BitSet copyEncBits(com.carrotsearch.hppc.BitSet encBits)
-