Class TurnCostStorage

java.lang.Object
com.graphhopper.storage.TurnCostStorage

public class TurnCostStorage extends Object
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
  • Constructor Details

  • Method Details

    • create

      public TurnCostStorage create(long initBytes)
    • flush

      public void flush()
    • close

      public void close()
    • getCapacity

      public long getCapacity()
    • loadExisting

      public boolean loadExisting()
    • set

      public void set(BooleanEncodedValue bev, int fromEdge, int viaNode, int toEdge, boolean value)
    • 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

      public double get(DecimalEncodedValue dev, int fromEdge, int viaNode, int toEdge)
    • get

      public boolean get(BooleanEncodedValue bev, int fromEdge, int viaNode, int toEdge)
    • isClosed

      public boolean isClosed()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAllTurnCosts

      public TurnCostStorage.Iterator getAllTurnCosts()
      Returns an iterator over all entries.
      Returns:
      an iterator over all entries.