Added clique_number, independence_number#155
Conversation
gdalle
left a comment
There was a problem hiding this comment.
Thanks for the PR, sorry for the late review
|
I've pushed an update that hopefully addresses these concerns. (I rebased to master - hopefully that doesn't make the diffs too messy.) After making a proper unit test for independent sets, I found I had to convert AbstractGraph to SimpleGraph in order to call complement. Performance shouldn't be an issue since this data copy is negligible in comparison to the cost of the maximal_cliques call. But I don't know if there is some other reason this would be problematic. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #155 +/- ##
=======================================
Coverage 97.22% 97.22%
=======================================
Files 122 122
Lines 7240 7250 +10
=======================================
+ Hits 7039 7049 +10
Misses 201 201 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I would add a warning to the docstring pointing to the conversion, but otherwise I'd say it's okay |
|
This looks good, and thankfully it has not bitrotten in the last two years. Thank you for the contribution! |
These simple implementations use
maximal_cliquesas the computational engine. Perhaps there is a more efficient way, but it would be great to at least have these implemented.