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 CHGraph
public final void setLevel(int nodeIndex, int level)
CHGraph
public final int getLevel(int nodeIndex)
public CHEdgeIteratorState shortcut(int a, int b)
CHGraph
protected int nextShortcutId()
public EdgeIteratorState edge(int a, int b, double distance, boolean bothDirections)
Graph
public CHEdgeIteratorState edge(int a, int b)
Graph
public CHEdgeExplorer createEdgeExplorer()
createEdgeExplorer
in interface CHGraph
createEdgeExplorer
in interface Graph
Graph.createEdgeExplorer(com.graphhopper.routing.util.EdgeFilter)
public CHEdgeExplorer createEdgeExplorer(EdgeFilter filter)
Graph
createEdgeExplorer
in interface CHGraph
createEdgeExplorer
in interface Graph
EdgeExplorer
,
Graph.createEdgeExplorer()
public final CHEdgeIteratorState getEdgeIteratorState(int edgeId, int endNode)
Graph
getEdgeIteratorState
in interface CHGraph
getEdgeIteratorState
in interface Graph
endNode
- 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()
Graph
getNodeAccess
in interface Graph
public BBox getBounds()
Graph
public void disconnect(CHEdgeExplorer explorer, EdgeIteratorState edgeState)
edgeState
- the edge from lower to higherpublic AllCHEdgesIterator getAllEdges()
getAllEdges
in interface CHGraph
getAllEdges
in interface Graph
protected int loadEdgesHeader()
protected int setEdgesHeader()
public GraphExtension getExtension()
getExtension
in interface Graph
public Graph getBaseGraph()
getBaseGraph
in interface Graph
public Graph copyTo(Graph g)
Graph
public CHGraph create(long bytes)
Storable
public boolean loadExisting()
loadExisting
in interface Storable<CHGraph>
public void flush()
Storable
public void close()
Storable
public long getCapacity()
getCapacity
in interface Storable<CHGraph>
Copyright © 2012–2018. All rights reserved.