LdDl / ch

Contraction Hierarchies (with bidirectional version of Dijkstra's algorithm) technique for computing shortest path in graph.
Apache License 2.0
46 stars 5 forks source link

Unify forward and backward search #33

Closed magnushiie closed 1 year ago

magnushiie commented 1 year ago

The forward and backward search were basically copies of each other with only the direction variables being different.

This change unifies the searches in both directions to loops over directions.

It's probably easier to review the commits separately, I intentionally made it in separate steps so it's obvious what changes.