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 TypeMethodDescriptionint
int
int
getEdge()
The CH edge ID of this edge state.int
The original/base/query graph edge ID of the edge this CH edge state represents orEdgeIterator.NO_EDGE
if this is edge state is a shortcutint
For 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.int
int
The CH edge ID of the first skipped edge/shortcut of this edge stateint
The CH edge ID of the second skipped edge/shortcut of this edge statedouble
getWeight
(boolean reverse) boolean
-
Constructor Details
-
RoutingCHEdgeIteratorStateImpl
-
-
Method Details
-
getEdge
public int getEdge()Description copied from interface:RoutingCHEdgeIteratorState
The CH edge ID of this edge state. This is generally not the same asRoutingCHEdgeIteratorState.getOrigEdge()
- Specified by:
getEdge
in interfaceRoutingCHEdgeIteratorState
-
getOrigEdge
public int getOrigEdge()Description copied from interface:RoutingCHEdgeIteratorState
The original/base/query graph edge ID of the edge this CH edge state represents orEdgeIterator.NO_EDGE
if this is edge state is a shortcut- Specified by:
getOrigEdge
in interfaceRoutingCHEdgeIteratorState
-
getOrigEdgeKeyFirst
public int getOrigEdgeKeyFirst()Description copied from interface:RoutingCHEdgeIteratorState
For 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:
getOrigEdgeKeyFirst
in interfaceRoutingCHEdgeIteratorState
-
getOrigEdgeKeyLast
public int getOrigEdgeKeyLast()- Specified by:
getOrigEdgeKeyLast
in interfaceRoutingCHEdgeIteratorState
-
getBaseNode
public int getBaseNode()- Specified by:
getBaseNode
in interfaceRoutingCHEdgeIteratorState
-
getAdjNode
public int getAdjNode()- Specified by:
getAdjNode
in interfaceRoutingCHEdgeIteratorState
-
isShortcut
public boolean isShortcut()- Specified by:
isShortcut
in interfaceRoutingCHEdgeIteratorState
-
getSkippedEdge1
public int getSkippedEdge1()Description copied from interface:RoutingCHEdgeIteratorState
The CH edge ID of the first skipped edge/shortcut of this edge state- Specified by:
getSkippedEdge1
in interfaceRoutingCHEdgeIteratorState
-
getSkippedEdge2
public int getSkippedEdge2()Description copied from interface:RoutingCHEdgeIteratorState
The CH edge ID of the second skipped edge/shortcut of this edge state- Specified by:
getSkippedEdge2
in interfaceRoutingCHEdgeIteratorState
-
getWeight
public double getWeight(boolean reverse) - Specified by:
getWeight
in interfaceRoutingCHEdgeIteratorState
-