-
Notifications
You must be signed in to change notification settings - Fork 155
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
Always return a cycle in digraph_find_cycle
if no node is specified and a cycle exists
#1181
Conversation
Pull Request Test Coverage Report for Build 9103568887Details
💛 - Coveralls |
digraph_find_cycle
if no node is specified and a cycle existsdigraph_find_cycle
if no node is specified and a cycle exists
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.
Overall I like the idea here it makes sense to me to use a connected component function to get a node in a cycle and go from there. I just have some concerns about the backwards compatibility implications. They're likely unavoidable to use the scc functions, but we should document it as an upgrade change then.
I removed most of the traits but |
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 now, thanks for the quick update.
Closes #1171
Instead of picking an arbitrary node if it is not provided, we find a smarter pick that is in a strongly-connected component with more than one node. It also handles the case of self-loops in case there is a SCC with a single node.