public interface EdgeIterator extends EdgeIteratorState
EdgeExplorer explorer = graph.createEdgeExplorer();
EdgeIterator iter = explorer.setBaseNode(nodeId);
// calls to iter.getAdjNode(), getDistance() without calling next() will cause undefined behaviour!
while(iter.next()) {
int baseNodeId = iter.getBaseNode(); // equal to nodeId
int adjacentNodeId = iter.getAdjNode(); // this is the node where this edge state is "pointing to"
...
}
EdgeIteratorState,
EdgeExplorer| Modifier and Type | Interface and Description |
|---|---|
static class |
EdgeIterator.Edge |
| Modifier and Type | Field and Description |
|---|---|
static int |
ANY_EDGE
Integer value used in places where normally an edge would be expected, but no specific edge shall be specified.
|
static int |
NO_EDGE
Integer value used in places where normally an edge would be expected, but none is given.
|
REVERSE_STATE, UNFAVORED_EDGE| Modifier and Type | Method and Description |
|---|---|
boolean |
next()
To be called to go to the next edge state.
|
copyPropertiesFrom, detach, fetchWayGeometry, get, get, get, get, get, getAdjNode, getBaseNode, getDistance, getEdge, getEdgeKey, getFlags, getKeyValues, getName, getReverse, getReverse, getReverse, getReverse, getReverse, getReverseEdgeKey, getValue, set, set, set, set, set, set, set, set, set, set, setDistance, setFlags, setKeyValues, setReverse, setReverse, setReverse, setReverse, setReverse, setWayGeometrystatic final int NO_EDGE
static final int ANY_EDGE
Copyright © 2012–2023. All rights reserved.