Graphs.jl
Graphs.jl copied to clipboard
Standardized output for shortest path algorithms
At the moment, a_star returns a list of edges, while dijkstra_shortest_paths returns a custom state object. Would it make sense to have homogeneous outputs, at least for the single-source case?
What about returning a named tuple instead of a custom struct?
The problem is that not all shortest path algorithms are created equal. While Dijkstra can fill a correct shortest path tree, A* only finds the shortest s-d path with no guarantee on the vertices explored in between
However, normalizing the A* output could help solve #59
In a future version, I think A* should return a vector of nodes instead of edges. And we could add methods for Dijkstra & Co which, when called with a source and and destination, would also return a vector of nodes
Related: https://github.com/JuliaGraphs/Graphs.jl/issues/264