Class CHPreparationGraph

java.lang.Object
com.graphhopper.routing.ch.CHPreparationGraph

public class CHPreparationGraph extends Object
Graph data structure used for CH preparation. It allows caching weights, and edges that are not needed anymore (those adjacent to contracted nodes) can be removed (see disconnect(int).
Author:
easbar
  • Method Details

    • nodeBased

      public static CHPreparationGraph nodeBased(int nodes, int edges)
    • edgeBased

      public static CHPreparationGraph edgeBased(int nodes, int edges, CHPreparationGraph.TurnCostFunction turnCostFunction)
    • buildFromGraph

      public static void buildFromGraph(CHPreparationGraph prepareGraph, Graph graph, Weighting weighting)
    • buildTurnCostFunctionFromTurnCostStorage

      public static CHPreparationGraph.TurnCostFunction buildTurnCostFunctionFromTurnCostStorage(Graph graph, Weighting weighting)
    • getNodes

      public int getNodes()
    • getOriginalEdges

      public int getOriginalEdges()
    • getDegree

      public int getDegree(int node)
    • addEdge

      public void addEdge(int from, int to, int edge, double weightFwd, double weightBwd)
    • addShortcut

      public int addShortcut(int from, int to, int origEdgeKeyFirst, int origEdgeKeyLast, int skipped1, int skipped2, double weight, int origEdgeCount)
    • prepareForContraction

      public void prepareForContraction()
    • setShortcutForPrepareEdge

      public void setShortcutForPrepareEdge(int prepareEdge, int shortcut)
    • getShortcutForPrepareEdge

      public int getShortcutForPrepareEdge(int prepareEdge)
    • createOutEdgeExplorer

      public PrepareGraphEdgeExplorer createOutEdgeExplorer()
    • createInEdgeExplorer

      public PrepareGraphEdgeExplorer createInEdgeExplorer()
    • createOutOrigEdgeExplorer

      public PrepareGraphOrigEdgeExplorer createOutOrigEdgeExplorer()
    • createInOrigEdgeExplorer

      public PrepareGraphOrigEdgeExplorer createInOrigEdgeExplorer()
    • getTurnWeight

      public double getTurnWeight(int inEdgeKey, int viaNode, int outEdgeKey)
    • disconnect

      public com.carrotsearch.hppc.IntContainer disconnect(int node)
    • close

      public void close()