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
Fix all_node_cuts output for complete graphs #6558
Conversation
Great! This should be merged after v3.2 is released and included in the release (along with removal of the deprecation warnings and |
@navyagarwal if you still have the bandwidth could you add the deprecation warnings so we can push this as part of v3.3. Thanks! |
Based on my comments in #6533 I think there is more needed here. G=nx.complete_graph(5)
G.remove_edges_from([(0, 1), (3, 4)])
print(list(nx.all_node_cuts(G))) # returns [{0, 1, 2}] returns G = nx.complete_graph(5)
G.remove_edges_from([(1, 2), (0, 4)])
print(list(nx.all_node_cuts(G))) # returns [{1, 2, 3}, {0, 3, 4}] |
Yikes -- that took a bit. But I think I found an error in Anyway, it now works! With the fix already here for complete graphs, we have solved all the issues raised in #6533. Ready for Review |
thanks @dschult @navyagarwal ! |
* Fix for complete graphs case in all_node_cuts * Check node_connectivty in complete graph * test for broken cuts. add fix --------- Co-authored-by: Dan Schult <dschult@colgate.edu>
Closes #6533
I modified the special condition for complete graphs in
all_node_cuts
to return an empty generator and also changed the test cases accordingly.