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() |
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) |
Weighting |
getWeighting() |
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.
|
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.
|
int |
shortcut(int a,
int b,
int accessFlags,
double weight,
double distance,
int skippedEdge1,
int skippedEdge2) |
int |
shortcutEdgeBased(int a,
int b,
int accessFlags,
double weight,
double distance,
int skippedEdge1,
int skippedEdge2,
int origFirst,
int origLast) |
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
public int shortcut(int a, int b, int accessFlags, double weight, double distance, int skippedEdge1, int skippedEdge2)
public int shortcutEdgeBased(int a, int b, int accessFlags, double weight, double distance, int skippedEdge1, int skippedEdge2, int origFirst, int origLast)
shortcutEdgeBased
in interface 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 EdgeExplorer createOriginalEdgeExplorer()
createOriginalEdgeExplorer
in interface CHGraph
public EdgeExplorer createOriginalEdgeExplorer(EdgeFilter filter)
createOriginalEdgeExplorer
in interface CHGraph
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 will be returned in the direction of how it is storedpublic int getNodes()
public int getEdges()
public int getOriginalEdges()
getOriginalEdges
in interface CHGraph
public NodeAccess getNodeAccess()
Graph
getNodeAccess
in interface Graph
public BBox getBounds()
Graph
public boolean isReadyForContraction()
isReadyForContraction
in interface CHGraph
public int getOtherNode(int edge, int node)
getOtherNode
in interface Graph
public boolean isAdjacentToNode(int edge, int node)
isAdjacentToNode
in interface Graph
public void disconnect(CHEdgeExplorer explorer, EdgeIteratorState edgeState)
CHGraph
disconnect
in interface CHGraph
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>
public void debugPrint()
public NodeOrderingProvider getNodeOrderingProvider()
getNodeOrderingProvider
in interface CHGraph
Copyright © 2012–2019. All rights reserved.