0

The document https://github.com/graphhopper/graphhopper/blob/master/docs/core/technical.md states that "nodeA is always smaller than nodeB" related to GraphHopper data layout. Which are the benefits of implementing it that way? How the edge direction is represented in data layout?

regispires
  • 73
  • 1
  • 5

1 Answers1

1

This is just a convention.

The direction can be different and depends on how you traverse the graph because for the bidirectional algorithms you need to access every edge from both sides, even if it is a directed edge. E.g. if you have node Y and X, you can either do edgeIterator=edgeExplorer.setBaseNode(X) or setBaseNode(Y). And depending on the returned flags (edgeIterator.getFlags) you can find out the accesibility for every stored vehicles.

Karussell
  • 17,085
  • 16
  • 97
  • 197