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 example for cycle detection #6560
Add example for cycle detection #6560
Conversation
…d added relevant test function
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 @PurviChaurasia , I took the liberty of making some minor tweaks, but this example LGTM!
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.
I reopened this PR because I was about to approve it as well.
I'm thinking that it might be confusing to call nx.find_cycles twice because the cycle returned may be different. See suggestion below.
* Fix negative edge cycle function raising exception for empty graph and added relevant test function * Unresolved change * Added example script to visualize GOT network * Added example script to visualize cycle detection * Deleted got.py * Minor tweaks to example. * Update examples/algorithms/plot_cycle_detection.py --------- Co-authored-by: Ross Barnowski <rossbar@caltech.edu> Co-authored-by: Dan Schult <dschult@colgate.edu>
Added an example script to explain and highlight cycles in a graph using the
find_cycle
function.