You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm, I believe it is best to provide two overloads. As Dijsktra computes the shortest paths from one vertex to all the others (if not stopped early), it seems reasonable to provide an overload that does that, returning distances and previous map, telling for each node which index is the previous in the path.
pair<vector<double>, vector<int>> shortest_path_dijsktra(const graf_t& graf, int origin);
Another should find the shortest path from one vertex to another and break earlier than above, but also return the path, as it costs little more to provide that data.
pair<double, vector<int>> shortest_path_dijsktra(const graf_t& graf, int origin, int target);
This should be consistent with BellmanFord algorithm. @mucamaca
No description provided.
The text was updated successfully, but these errors were encountered: