Package com.graphhopper.storage
Class TurnCostStorage
java.lang.Object
com.graphhopper.storage.TurnCostStorage
A key/value store, where the unique keys are triples (fromEdge, viaNode, toEdge) and the values
are integers that can be used to store encoded values.
- Author:
- Karl Hübner, Peter Karich, Michael Zilske
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()create(long initBytes) voidflush()booleanget(BooleanEncodedValue bev, int fromEdge, int viaNode, int toEdge) doubleget(DecimalEncodedValue dev, int fromEdge, int viaNode, int toEdge) Returns an iterator over all entries.longintintgetTurnCostsCount(int node) booleanisClosed()booleanvoidset(BooleanEncodedValue bev, int fromEdge, int viaNode, int toEdge, boolean value) voidset(DecimalEncodedValue turnCostEnc, int fromEdge, int viaNode, int toEdge, double cost) Sets the turn cost at the viaNode when going from "fromEdge" to "toEdge"toString()
-
Constructor Details
-
TurnCostStorage
-
-
Method Details
-
create
-
flush
public void flush() -
close
public void close() -
getCapacity
public long getCapacity() -
loadExisting
public boolean loadExisting() -
set
-
set
public void set(DecimalEncodedValue turnCostEnc, int fromEdge, int viaNode, int toEdge, double cost) Sets the turn cost at the viaNode when going from "fromEdge" to "toEdge" -
get
-
get
-
getTurnCostsCount
public int getTurnCostsCount() -
getTurnCostsCount
public int getTurnCostsCount(int node) -
isClosed
public boolean isClosed() -
toString
-
getAllTurnCosts
Returns an iterator over all entries.- Returns:
- an iterator over all entries.
-