-
Notifications
You must be signed in to change notification settings - Fork 184
enumerate paths should support DijkstraState all paths. #266
Comments
The graph you created only has four vertices so there cannot be an edge to vertex 5.... ETA: if you mean "the path 1->3->4", then the answer is that |
probably @bicycle1885 meant 1->3->4. Should not the output look like this?
|
@CarloLucibello yes - ideally. |
enumerate_paths(dijkstra_shortest_paths(allpaths=true)
doesn't enumerate all paths.
Sorry, I made a mistake. I meant "1 -> 3 -> 4" as you said. Edited the original post. |
PS @bicycle1885 - this might make a nice easy PR if you've got some time :) I'm out of pocket for a week or two. |
It would be suitable for an exercise of a graph theory 101 class :) |
Yes, I didn't mean to imply it would be a challenge for you - just that if you wanted a fix quickly, it might be best for you to create the PR since I'm on vacation :) |
I've given this some thought lately, and I'm not sure I want to do this after all. It's recursive and will only really work for small graphs. Please feel free to continue the discussion but I'll close this out until someone can persuade me this is generally useful. |
The following graph is a diamond-shaped graph with two paths between 1st and 4th vertices:
Apparently, there is a path
1 => 3 => 4
in the graph but it is not printed:I naively thought that
allpaths=true
would enumerate all paths but it doesn't. Is this a bug or an intended behavior?The text was updated successfully, but these errors were encountered: