Package com.graphhopper.storage
Class RoutingCHEdgeIteratorStateImpl
java.lang.Object
com.graphhopper.storage.RoutingCHEdgeIteratorStateImpl
- All Implemented Interfaces:
RoutingCHEdgeIteratorState
- Direct Known Subclasses:
RoutingCHEdgeIteratorImpl
-
Constructor Summary
ConstructorsConstructorDescriptionRoutingCHEdgeIteratorStateImpl(CHStorage store, BaseGraph baseGraph, com.graphhopper.storage.BaseGraph.EdgeIteratorStateImpl baseEdgeState, Weighting weighting) -
Method Summary
Modifier and TypeMethodDescriptionintintintgetEdge()The CH edge ID of this edge state.intThe original/base/query graph edge ID of the edge this CH edge state represents orEdgeIterator.NO_EDGEif this is edge state is a shortcutintFor shortcuts of an edge-based CH graph this is the key of the first original edge of this edge state *in the direction of the shortcut*, i.e.intintThe CH edge ID of the first skipped edge/shortcut of this edge stateintThe CH edge ID of the second skipped edge/shortcut of this edge statedoublegetWeight(boolean reverse) boolean
-
Constructor Details
-
RoutingCHEdgeIteratorStateImpl
-
-
Method Details
-
getEdge
public int getEdge()Description copied from interface:RoutingCHEdgeIteratorStateThe CH edge ID of this edge state. This is generally not the same asRoutingCHEdgeIteratorState.getOrigEdge()- Specified by:
getEdgein interfaceRoutingCHEdgeIteratorState
-
getOrigEdge
public int getOrigEdge()Description copied from interface:RoutingCHEdgeIteratorStateThe original/base/query graph edge ID of the edge this CH edge state represents orEdgeIterator.NO_EDGEif this is edge state is a shortcut- Specified by:
getOrigEdgein interfaceRoutingCHEdgeIteratorState
-
getOrigEdgeKeyFirst
public int getOrigEdgeKeyFirst()Description copied from interface:RoutingCHEdgeIteratorStateFor shortcuts of an edge-based CH graph this is the key of the first original edge of this edge state *in the direction of the shortcut*, i.e. the one this shortcut starts with. Otherwise it is the key of the original/base/query graph edge this CH edge state represents. It is not so obvious how the direction of this key shall be defined. For base graph edges it is clear as we use the storage direction and the value of the key simply depends on which node is the base node (the one stored first or second). For shortcut edges we use the direction of the shortcut to define the direction of the first/last original edge key.- Specified by:
getOrigEdgeKeyFirstin interfaceRoutingCHEdgeIteratorState
-
getOrigEdgeKeyLast
public int getOrigEdgeKeyLast()- Specified by:
getOrigEdgeKeyLastin interfaceRoutingCHEdgeIteratorState
-
getBaseNode
public int getBaseNode()- Specified by:
getBaseNodein interfaceRoutingCHEdgeIteratorState
-
getAdjNode
public int getAdjNode()- Specified by:
getAdjNodein interfaceRoutingCHEdgeIteratorState
-
isShortcut
public boolean isShortcut()- Specified by:
isShortcutin interfaceRoutingCHEdgeIteratorState
-
getSkippedEdge1
public int getSkippedEdge1()Description copied from interface:RoutingCHEdgeIteratorStateThe CH edge ID of the first skipped edge/shortcut of this edge state- Specified by:
getSkippedEdge1in interfaceRoutingCHEdgeIteratorState
-
getSkippedEdge2
public int getSkippedEdge2()Description copied from interface:RoutingCHEdgeIteratorStateThe CH edge ID of the second skipped edge/shortcut of this edge state- Specified by:
getSkippedEdge2in interfaceRoutingCHEdgeIteratorState
-
getWeight
public double getWeight(boolean reverse) - Specified by:
getWeightin interfaceRoutingCHEdgeIteratorState
-