Class XFirstSearch

java.lang.Object
com.graphhopper.util.XFirstSearch
Direct Known Subclasses:
BreadthFirstSearch, DepthFirstSearch

public abstract class XFirstSearch extends Object
This abstract class defines commonalities for BFS and DFS
Author:
Jan Sölter
  • Constructor Details

    • XFirstSearch

      public XFirstSearch()
  • Method Details

    • createBitSet

      protected abstract GHBitSet createBitSet()
      Pick the BitSet implementation wisely. Use GHBitSetImpl only if we are sure you visit a large portion of the graph. And if you choose GHTBitSet the initial capacity can be also important for performance.
    • start

      public abstract void start(EdgeExplorer explorer, int startNode)
    • goFurther

      protected boolean goFurther(int nodeId)
    • checkAdjacent

      protected boolean checkAdjacent(EdgeIteratorState edge)