Opened 22 months ago
Closed 20 months ago
#30558 closed enhancement (fixed)
Implement the conjugate of a set partition
Reported by: | zabrocki | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | sage-9.3 |
Component: | combinatorics | Keywords: | set partitions, conjugate |
Cc: | saliola, aschilling | Merged in: | |
Authors: | Mike Zabrocki | Reviewers: | Anne Schilling, Frédéric Chapoton, Samuel Lelièvre |
Report Upstream: | N/A | Work issues: | |
Branch: | 7e6a9ec (Commits, GitHub, GitLab) | Commit: | 7e6a9ec3abca9e4f924ed82a9ecca35fada37d35 |
Dependencies: | Stopgaps: |
Description
Implement the notion of the conjugate of a set partition defined in "On Conjugates for Set Partitions and Integer Compositions" by David Callan for the combinatorial class SetPartition
Change History (15)
comment:1 Changed 22 months ago by
- Branch set to public/combinat/conjugate-set-partition-30558
- Commit set to cc4efc2e7935195986b34784bca7cb069eced595
- Status changed from new to needs_review
comment:2 Changed 22 months ago by
- Keywords set partitions conjugate added
- Reviewers set to Anne Schilling
- Status changed from needs_review to positive_review
comment:3 Changed 22 months ago by
too late, but this is a bit ugly
if len(initials)+len(singletons)==0:
and could have been
if not initials and not singletons:
comment:4 Changed 22 months ago by
It might be fine to reopen; otherwise fix it in a follow-up ticket.
Along with pep8 and maybe these other small things:
- return (support+[support[0]])[support.index(a)+1] + return support[(support.index(a)+1) % len(support)]
- support = sorted([a for S in sp for a in S]) + support = sorted(a for S in sp for a in S)
- support = sorted([a for S in self for a in S]) + support = sorted(a for S in self for a in S)
comment:5 Changed 22 months ago by
- Commit changed from cc4efc2e7935195986b34784bca7cb069eced595 to 6ce6f9eb614e7ba70b5d4ff8945c9f2c94fd6ca2
- Status changed from positive_review to needs_review
Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:
6ce6f9e | changed as per comments
|
comment:6 Changed 22 months ago by
- Commit changed from 6ce6f9eb614e7ba70b5d4ff8945c9f2c94fd6ca2 to 1cef639348be0ad6320365cf004145c5058e57a3
Branch pushed to git repo; I updated commit sha1. New commits:
1cef639 | pep8 changes
|
comment:7 Changed 22 months ago by
Actually, this corner case also needs to be fixed:
sage: s = SetPartitions(0).list()[0] sage: s.conjugate() --------------------------------------------------------------------------- ValueError Traceback (most recent call last)
comment:8 Changed 22 months ago by
- Commit changed from 1cef639348be0ad6320365cf004145c5058e57a3 to 5e86a5bfc7a31b4ce145577d0e730c27487bf654
Branch pushed to git repo; I updated commit sha1. New commits:
5e86a5b | catch corner case
|
comment:9 Changed 22 months ago by
Add a doc test to the corner cases too!
comment:10 Changed 22 months ago by
- Commit changed from 5e86a5bfc7a31b4ce145577d0e730c27487bf654 to 7e6a9ec3abca9e4f924ed82a9ecca35fada37d35
Branch pushed to git repo; I updated commit sha1. New commits:
7e6a9ec | add doc test for corner case
|
comment:11 Changed 22 months ago by
- Reviewers changed from Anne Schilling to Anne Schilling, Frédéric Chapoton, Samuel Lelièvre
Frédéric, any final formatting touch?
Then back to positive review?
comment:12 Changed 22 months ago by
Yes, you can set it back to positive review!
comment:13 Changed 22 months ago by
- Status changed from needs_review to positive_review
comment:14 Changed 20 months ago by
- Milestone changed from sage-9.2 to sage-9.3
comment:15 Changed 20 months ago by
- Branch changed from public/combinat/conjugate-set-partition-30558 to 7e6a9ec3abca9e4f924ed82a9ecca35fada37d35
- Resolution set to fixed
- Status changed from positive_review to closed
New commits:
initial version and reference