| 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.
|
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() |
CHEdgeIteratorState |
getEdgeIteratorState(int edgeId,
int endNode)
Returns a wrapper over the specified edgeId.
|
GraphExtension |
getExtension() |
int |
getLevel(int nodeIndex) |
NodeAccess |
getNodeAccess()
Creates a node explorer to access node properties.
|
int |
getNodes() |
Weighting |
getWeighting() |
boolean |
isClosed() |
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.
|
CHEdgeIteratorState |
shortcut(int a,
int b)
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.
|
String |
toString() |
public final Weighting getWeighting()
public boolean isShortcut(int edgeId)
isShortcut in interface CHGraphpublic final void setLevel(int nodeIndex,
int level)
CHGraphpublic final int getLevel(int nodeIndex)
public CHEdgeIteratorState shortcut(int a, int b)
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 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 with uncertain values for adjNode and baseNode (two
possibilities) will be returned.public int getNodes()
public NodeAccess getNodeAccess()
GraphgetNodeAccess in interface Graphpublic BBox getBounds()
Graphpublic void disconnect(CHEdgeExplorer explorer, EdgeIteratorState edgeState)
edgeState - 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>Copyright © 2012–2018. All rights reserved.