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 |
disconnectEdge(int edge,
int adjNode,
int prevEdge) |
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() |
CHConfig |
getCHConfig()
Returns the profile of this CH graph.
|
CHEdgeIteratorState |
getEdgeIteratorState(int edgeId,
int endNode)
Returns a wrapper over the specified edgeId.
|
int |
getEdges() |
int |
getLevel(int nodeIndex) |
NodeAccess |
getNodeAccess()
Creates an object to access node properties.
|
NodeOrderingProvider |
getNodeOrderingProvider() |
int |
getNodes() |
int |
getOriginalEdges() |
int |
getOtherNode(int edge,
int node) |
TurnCostStorage |
getTurnCostStorage() |
boolean |
isAdjacentToNode(int edge,
int node) |
boolean |
isClosed() |
boolean |
isReadyForContraction() |
boolean |
isShortcut(int edgeId) |
protected int |
loadEdgesHeader() |
boolean |
loadExisting() |
protected int |
nextShortcutId() |
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() |
Weighting |
wrapWeighting(Weighting weighting)
Wraps the given weighting into a weighting that can be used by this graph
|
public CHConfig getCHConfig()
CHGraph
getCHConfig
in interface CHGraph
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 int shortcut(int a, int b, int accessFlags, double weight, int skippedEdge1, int skippedEdge2)
CHGraph
public int shortcutEdgeBased(int a, int b, int accessFlags, double weight, int skippedEdge1, int skippedEdge2, int origFirst, int origLast)
CHGraph
shortcutEdgeBased
in interface CHGraph
origFirst
- The first original edge that is skipped by this shortcut. For example for the following shortcut
edge from x to y, which itself skips the shortcuts x->v and v->y the first original edge would
be x->u: x->u->v->w->yorigLast
- like origFirst, but the last orig edge, i.e w->y in above exampleprotected 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 getAdjNode(). 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 disconnectEdge(int edge, int adjNode, int prevEdge)
disconnectEdge
in interface CHGraph
public AllCHEdgesIterator getAllEdges()
getAllEdges
in interface CHGraph
getAllEdges
in interface Graph
protected int loadEdgesHeader()
public TurnCostStorage getTurnCostStorage()
getTurnCostStorage
in interface Graph
TurnCostStorage
or null if not supportedpublic Weighting wrapWeighting(Weighting weighting)
Graph
wrapWeighting
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–2020. All rights reserved.