-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dijkstra-search #489
Add dijkstra-search #489
Conversation
This commit implements a `dijkstra_search` that traverses a graph using Dijkstra algorithm and provides the ability to insert callback functions at specified event points. Python users should subclass `retworkx.visit.DijkstraVisitor` and overwrite the appropriate callback functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, after #456 and #469 this feels natural and it will be a great addition.
One thing I would like to debate is not replacing our current implementation of Dijkstra, I understand it is shorter but I find it harder to maintain. It feels less straightforward with details hidden on another part of the code.
Pull Request Test Coverage Report for Build 1698719141
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, fantastic addition to the 0.11 release
* Add dijkstra-search This commit implements a `dijkstra_search` that traverses a graph using Dijkstra algorithm and provides the ability to insert callback functions at specified event points. Python users should subclass `retworkx.visit.DijkstraVisitor` and overwrite the appropriate callback functions. * remove unnecessary test file * revert changes in `dijkstra.rs` * cargo fmt * deduplicate `try_control` macro * raise if negative weight * fix release note Co-authored-by: Matthew Treinish <[email protected]>
This commit implements a
dijkstra_search
that traverses a graphusing Dijkstra algorithm and provides the ability to insert callback
functions at specified event points. Python users should subclass
retworkx.visit.DijkstraVisitor
and overwrite the appropriate callback functions.