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, getAdjNode, getBaseNode, getDistance, getEdge, getFlags, getName, getOrigEdgeFirst, getOrigEdgeLast, getReverse, getReverse, getReverse, getReverse, set, set, set, set, setDistance, setFlags, setName, setReverse, setReverse, setReverse, setReverse, setWayGeometry
static final int NO_EDGE
static final int ANY_EDGE
Copyright © 2012–2020. All rights reserved.