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
Make chordal_graph_cliques a generator #5758
Make chordal_graph_cliques a generator #5758
Conversation
>>> cliques = [c for c in chordal_graph_cliques(G)] | ||
>>> cliques[0] | ||
frozenset({1, 2, 3}) |
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 think this is okay because, though the ordering of the cliques is arbitrary, it should be consistent between function calls. If we wanted to be extra sure though, we could use sorted
to guarantee the ordering, e.g.
>>> cliques = [c for c in chordal_graph_cliques(G)] | |
>>> cliques[0] | |
frozenset({1, 2, 3}) | |
>>> cliques = sorted(chordal_graph_cliques(G)) | |
[frozenset({1, 2, 3}), | |
frozenset({2, 3, 4}), | |
frozenset({3, 4, 5, 6}), | |
frozenset({7, 8}), | |
frozenset({9})] |
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.
This comment isn't a blocker though, we can always fix this up in a follow-up PR!
e4e2928
to
f20c854
Compare
Make chordal_graph_cliques a generator Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Make chordal_graph_cliques a generator Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
No description provided.