Class SubnetworkStorage
java.lang.Object
com.graphhopper.routing.subnetwork.SubnetworkStorage
This class handles storage of subnetwork ids for every node. Useful to pick the correct set of
landmarks or fail fast for routing when two nodes are from different subnetworks.
- Author:
- Peter Karich
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()create(long byteCount) voidflush()longintgetSubnetwork(int nodeId) Returns the subnetwork ID for the specified nodeId or 0 if non is associated e.g.booleanisClosed()booleanvoidsetSubnetwork(int nodeId, int subnetwork) This method sets the subnetwork if of the specified nodeId.
-
Constructor Details
-
SubnetworkStorage
-
-
Method Details
-
getSubnetwork
public int getSubnetwork(int nodeId) Returns the subnetwork ID for the specified nodeId or 0 if non is associated e.g. because the subnetwork is too small. -
setSubnetwork
public void setSubnetwork(int nodeId, int subnetwork) This method sets the subnetwork if of the specified nodeId. Default is 0 and means subnetwork was too small to be useful to be stored. -
loadExisting
public boolean loadExisting() -
create
-
flush
public void flush() -
close
public void close() -
isClosed
public boolean isClosed() -
getCapacity
public long getCapacity()
-