Refactor degree sequence functions#41188
Conversation
|
Can you help me check if the result is true? Thank you @maxale |
|
These changes look good to me, but with respect to refactoring, I'd also suggest to change |
The result is right. But it takes 11 minutes. Is it normal? @maxale |
I have used tuple instaed of list |
|
Maybe it would make sense to implement a |
|
As suggestions I would like to use range instead of this loop |
I don't think we'd usually consider this a breaking change. I don't think we have a clear policy on this. |
|
okay. cf. #41038 where |
|
Do we really want to include the last commit (which is a slowdown)? |
If It does not be slower much than before, I think it is acceptable. @user202729 |
Yes, but is there any good reason to do it? The other loops in the same file are consistently done with the same syntax, and I don't see any advantage of imitating python style in this particular case. |
|
Maybe I revert this |
I have done this. Maybe revert is much faster |
We introduce a new class for Enum
Update the assignment of self._n to avoid unnecessary conversion.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Added examples for checking containment in DegreeSequences.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@mantepse can you help me review this? |
|
Documentation preview for this PR (built with commit 9adc2e0; changes) is ready! 🎉 |
|
@user202729 Can you review this again? |
otherwise looks correct. |
|
I think |
|
one comment left
but shouldn't be blocking. |
Refactor degree sequence generation to use generators, reducing memory usage. Fix #41187
📝 Checklist
⌛ Dependencies