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 TypeMethodDescriptionvoid
close()
create
(long initBytes) void
flush()
boolean
get
(BooleanEncodedValue bev, int fromEdge, int viaNode, int toEdge) double
get
(DecimalEncodedValue dev, int fromEdge, int viaNode, int toEdge) Returns an iterator over all entries.long
boolean
isClosed()
boolean
void
set
(BooleanEncodedValue bev, int fromEdge, int viaNode, int toEdge, boolean value) 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"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
-
isClosed
public boolean isClosed() -
toString
-
getAllTurnCosts
Returns an iterator over all entries.- Returns:
- an iterator over all entries.
-