Edge-based versions of AStar and DijkstraBidirectionalRef.