-
-
Notifications
You must be signed in to change notification settings - Fork 454
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
Set partition to disjoint set #38693
base: develop
Are you sure you want to change the base?
Set partition to disjoint set #38693
Conversation
Documentation preview for this PR (built with commit 0761846; changes) is ready! 🎉 |
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.
otherwise LGTM.
{{0}, {1}, {2}, {3}, {4}} | ||
sage: DisjointSet(SP) == DisjointSet(5) | ||
True | ||
|
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.
1 empty line is enough
src/sage/sets/disjoint_set.pyx
Outdated
@@ -103,6 +104,15 @@ cpdef DisjointSet(arg): | |||
sage: DisjointSet(['yi', 45, 'cheval']) | |||
{{'cheval'}, {'yi'}, {45}} | |||
|
|||
From a set partition:: |
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.
you could add a reference to the issue or the PR using (see :issue:`12345`)
Fixed. I also forgot that this issue handles #38416 by providing the alternative solution. |
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.
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.
go back to positive review after rebase
This issue fixes the bug in #38415 . It uses the base of
SetPartition
to allow aDisjointSet
to be created in a nice way. This also solves issue #38416📝 Checklist
⌛ Dependencies
#38415 , #38416