| Modifier and Type | Method and Description |
|---|---|
void |
close()
This method makes sure that the underlying used resources are released.
|
Graph |
copyTo(Graph g)
Copy this Graph into the specified Graph g.
|
CHGraph |
create(long bytes)
Creates the underlying storage.
|
CHEdgeExplorer |
createEdgeExplorer() |
CHEdgeExplorer |
createEdgeExplorer(EdgeFilter filter)
Returns an EdgeExplorer which makes it possible to traverse all filtered edges of a specific
node.
|
EdgeExplorer |
createOriginalEdgeExplorer() |
EdgeExplorer |
createOriginalEdgeExplorer(EdgeFilter filter) |
void |
debugPrint() |
void |
disconnect(CHEdgeExplorer explorer,
EdgeIteratorState edgeState)
Disconnects the edges (higher to lower node) via the specified edgeState pointing from lower to
higher node.
|
CHEdgeIteratorState |
edge(int a,
int b)
Creates an edge between the nodes a and b.
|
EdgeIteratorState |
edge(int a,
int b,
double distance,
boolean bothDirections)
Use edge(a,b).setDistance().setFlags instead
|
void |
flush()
This method makes sure that the underlying data is written to the storage.
|
AllCHEdgesIterator |
getAllEdges() |
Graph |
getBaseGraph() |
BBox |
getBounds()
Returns the implicit bounds of this graph calculated from the lat,lon input of setNode
|
long |
getCapacity() |
CHProfile |
getCHProfile()
Returns the profile of this CH graph.
|
CHEdgeIteratorState |
getEdgeIteratorState(int edgeId,
int endNode)
Returns a wrapper over the specified edgeId.
|
int |
getEdges() |
GraphExtension |
getExtension() |
int |
getLevel(int nodeIndex) |
NodeAccess |
getNodeAccess()
Creates a node explorer to access node properties.
|
NodeOrderingProvider |
getNodeOrderingProvider() |
int |
getNodes() |
int |
getOriginalEdges() |
int |
getOtherNode(int edge,
int node) |
boolean |
isAdjacentToNode(int edge,
int node) |
boolean |
isClosed() |
boolean |
isReadyForContraction() |
boolean |
isShortcut(int edgeId) |
protected int |
loadEdgesHeader() |
boolean |
loadExisting() |
protected int |
nextShortcutId() |
protected int |
setEdgesHeader() |
void |
setLevel(int nodeIndex,
int level)
This methods sets the level of the specified node.
|
int |
shortcut(int a,
int b,
int accessFlags,
double weight,
int skippedEdge1,
int skippedEdge2)
This method creates a shortcut between a to b which is nearly identical to creating an edge
except that it can be excluded or included for certain traversals or algorithms.
|
int |
shortcutEdgeBased(int a,
int b,
int accessFlags,
double weight,
int skippedEdge1,
int skippedEdge2,
int origFirst,
int origLast)
like shortcut(), but for edge-based CH
|
String |
toString() |
public CHProfile getCHProfile()
CHGraphgetCHProfile in interface CHGraphpublic boolean isShortcut(int edgeId)
isShortcut in interface CHGraphpublic final void setLevel(int nodeIndex,
int level)
CHGraphpublic final int getLevel(int nodeIndex)
public int shortcut(int a,
int b,
int accessFlags,
double weight,
int skippedEdge1,
int skippedEdge2)
CHGraphpublic int shortcutEdgeBased(int a,
int b,
int accessFlags,
double weight,
int skippedEdge1,
int skippedEdge2,
int origFirst,
int origLast)
CHGraphshortcutEdgeBased in interface CHGraphprotected int nextShortcutId()
public EdgeIteratorState edge(int a, int b, double distance, boolean bothDirections)
Graphpublic CHEdgeIteratorState edge(int a, int b)
Graphpublic CHEdgeExplorer createEdgeExplorer()
createEdgeExplorer in interface CHGraphcreateEdgeExplorer in interface GraphGraph.createEdgeExplorer(com.graphhopper.routing.util.EdgeFilter)public CHEdgeExplorer createEdgeExplorer(EdgeFilter filter)
GraphcreateEdgeExplorer in interface CHGraphcreateEdgeExplorer in interface GraphEdgeExplorer,
Graph.createEdgeExplorer()public EdgeExplorer createOriginalEdgeExplorer()
createOriginalEdgeExplorer in interface CHGraphpublic EdgeExplorer createOriginalEdgeExplorer(EdgeFilter filter)
createOriginalEdgeExplorer in interface CHGraphpublic final CHEdgeIteratorState getEdgeIteratorState(int edgeId, int endNode)
GraphgetEdgeIteratorState in interface CHGraphgetEdgeIteratorState in interface GraphendNode - is the node that will be returned via adjNode(). If adjNode is
Integer.MIN_VALUE then the edge will be returned in the direction of how it is storedpublic int getNodes()
public int getEdges()
public int getOriginalEdges()
getOriginalEdges in interface CHGraphpublic NodeAccess getNodeAccess()
GraphgetNodeAccess in interface Graphpublic BBox getBounds()
Graphpublic boolean isReadyForContraction()
isReadyForContraction in interface CHGraphpublic int getOtherNode(int edge,
int node)
getOtherNode in interface Graphpublic boolean isAdjacentToNode(int edge,
int node)
isAdjacentToNode in interface Graphpublic void disconnect(CHEdgeExplorer explorer, EdgeIteratorState edgeState)
CHGraphdisconnect in interface CHGraphedgeState - the edge from lower to higherpublic AllCHEdgesIterator getAllEdges()
getAllEdges in interface CHGraphgetAllEdges in interface Graphprotected int loadEdgesHeader()
protected int setEdgesHeader()
public GraphExtension getExtension()
getExtension in interface Graphpublic Graph getBaseGraph()
getBaseGraph in interface Graphpublic Graph copyTo(Graph g)
Graphpublic CHGraph create(long bytes)
Storablepublic boolean loadExisting()
loadExisting in interface Storable<CHGraph>public void flush()
Storablepublic void close()
Storablepublic long getCapacity()
getCapacity in interface Storable<CHGraph>public void debugPrint()
public NodeOrderingProvider getNodeOrderingProvider()
getNodeOrderingProvider in interface CHGraphCopyright © 2012–2019. All rights reserved.