Dijkstra SPP can take multiple start vertices.#75
Dijkstra SPP can take multiple start vertices.#75mfuchs wants to merge 1 commit intoboostorg:developfrom
Conversation
|
Just for information. Boost already has |
|
Thanks for the information and the reply I am interested in the shortest path of any of [s_start, s_end) to some end points. In work I could use these changes. |
|
While this seems to build and run okay, I'm a bit reluctant to break the existing dijkstra_shortest_paths API. Can you refactor this to add a new overloaded method that takes the iterator pair, and leave the single vertex descriptor implemenation unmodified? Perhaps you considered this already, in which case could you explain why breaking the existing API is preferable to adding a new overloaded dijkstra_shortest_paths? |
|
Thanks for your reply. |
| { | ||
| dijkstra_shortest_paths(g, &s, &s + 1, params); | ||
| } | ||
|
|
There was a problem hiding this comment.
@Belcourt I think this is the overload that you might have overlooked that preserves the existing interface.
|
I'm helping out with the PR backlog. Looks like you have a feature addition, test, but no new examples or documentation. I would like you to add documentation and examples. This is to let you know and help me prioritize PR's. |
|
@mfuchs you need to rebase your branch. |
|
I tried rebasing locally and it needs more work than I can put in in the midst of coursework. |
|
@jzmaddock The original author has been MIA for a while. Should this be closed? |
|
@jeremy-murphy, @Belcourt, any thoughts on this one? |
|
I might have time the following weeks to look at this. |
I think this is a neat extension to the classic single-source definition of Dijkstra's algorithm. There is nothing wrong with the programming API as Belcourt believed. Because it breaks the intuitive and documented single-source definition of Dijkstra's algorithm, it needs explanation and examples in the documentation. If there is a published paper on this extension to single-source Dijkstra's algorithm then that would be a useful link to provide too. |
Sorry, just experimenting with this Task List feature. But also I think this feature is worth pursuing. :) |
7dd169f to
a6c6ac5
Compare
Instead of a single start vertex a range of start vertices can be handed in. The range is modeled by two iterators s_begin and s_end. The reason to use iterators is to be consistent with dijkstra_shortest_path that already supports multiple start vertices for some functions. Moreover, another advantage of iterators is backwards compatibility with the existing functions since the parameter count is different.
a6c6ac5 to
96d4eaf
Compare
|
@jeremy-murphy sorry it took me ages to update it, but now I finally got around it. I have also provided documentation and examples. |
Instead of a single start vertex a range of start vertices can be handed in.
The range is modeled by two iterators s_begin and s_end.
The reason to use iterators is to be consistent with dijkstra_shortest_path
that already supports multiple start vertices for some functions.
Moreover, another advantage of iterators is backwards compatibility with
the existing functions since the parameter count is different.