Opened 9 years ago

Closed 7 years ago

#15525 closed enhancement (fixed)

More partition parents and fixes to global options

Reported by: Travis Scrimshaw Owned by: Sage Combinat CC user
Priority: major Milestone: sage-6.10
Component: combinatorics Keywords: partitions, global options
Cc: Sage Combinat CC user, Nicolas M. Thiéry, Andrew Mathas, Kevin Dilks Merged in:
Authors: Travis Scrimshaw Reviewers: Kevin Dilks
Report Upstream: N/A Work issues:
Branch: 1ec481d (Commits, GitHub, GitLab) Commit: 1ec481d803e3fa7d8c3d0e4038f4c476a73c0fd0
Dependencies: Stopgaps:

Status badges

Description

Currently the following breaks:

sage: P = Partitions(5, max_length=4)
sage: loads(dumps(P))

since PartitionOptions does not pickle, hence the IntegerListsLex, which takes it as an (optional) input, does not.

The proposed solution is two-fold:

  • Add a class for partitions that inherit from IntegerListsLex (or use it as an iterator).
  • Add a warning when using the global_options parameter that the resulting class might not pickle.

Here's also a discussion on sage-combinat-devel:

https://groups.google.com/forum/?fromgroups=#!topic/sage-combinat-devel/Hyak8ndRi4o

I'm also going to add parent classes for k-regular partitions.

Change History (20)

comment:1 Changed 9 years ago by Travis Scrimshaw

Branch: public/combinat/partitions_constraints

Here's the initial branch, still a little more work to be done.

comment:2 Changed 9 years ago by git

Commit: 7982d3ad9815b6313ac93880467aaf71ddb096ca

Branch pushed to git repo; I updated commit sha1. New commits:

7982d3aIniital fix and added regular partitions.

comment:3 Changed 9 years ago by Travis Scrimshaw

Branch: public/combinat/partitions_constraintspublic/combinat/partitions_constraints-15525
Commit: 7982d3ad9815b6313ac93880467aaf71ddb096ca

comment:4 Changed 9 years ago by git

Commit: 7982d3ad9815b6313ac93880467aaf71ddb096ca

Branch pushed to git repo; I updated commit sha1. New commits:

7982d3aIniital fix and added regular partitions.

comment:5 Changed 9 years ago by git

Commit: 7982d3ad9815b6313ac93880467aaf71ddb096ca1adb368c00b4b8e1eb49186af47ee1e86dafd94f

Branch pushed to git repo; I updated commit sha1. New commits:

1adb368Added deprecation to IntegerListLex global_options arg. Fixed doctests.
4143c96Merge branch 'develop' into public/combinat/partitions_constraints-15525

comment:6 Changed 9 years ago by Travis Scrimshaw

Status: newneeds_review

Okay, ready for consumption.

comment:7 Changed 9 years ago by For batch modifications

Milestone: sage-6.1sage-6.2

comment:8 Changed 8 years ago by For batch modifications

Milestone: sage-6.2sage-6.3

comment:9 Changed 8 years ago by For batch modifications

Milestone: sage-6.3sage-6.4

comment:10 Changed 8 years ago by git

Commit: 1adb368c00b4b8e1eb49186af47ee1e86dafd94fc477d6cf7d5ac2143f700dc83123f7d2d8d919ac

Branch pushed to git repo; I updated commit sha1. New commits:

c477d6cMerge branch 'public/combinat/partitions_constraints-15525' of trac.sagemath.org:sage into public/combinat/partitions_constraints-15525

comment:11 Changed 7 years ago by git

Commit: c477d6cf7d5ac2143f700dc83123f7d2d8d919ac03dcda9bd81cc42c2c61439ea11be485e15f6142

Branch pushed to git repo; I updated commit sha1. New commits:

03dcda9Merge branch 'public/combinat/partitions_constraints-15525' of trac.sagemath.org:sage into public/combinat/partitions_constraints-15525

comment:12 Changed 7 years ago by Frédéric Chapoton

Status: needs_reviewneeds_work

one failing doctest, see patchbot report

comment:13 Changed 7 years ago by git

Commit: 03dcda9bd81cc42c2c61439ea11be485e15f61420cc28a0202ba183faec750fa4e02083d1500e52d

Branch pushed to git repo; I updated commit sha1. New commits:

82f4fd5Merge branch 'public/combinat/partitions_constraints-15525' of trac.sagemath.org:sage into public/combinat/partitions_constraints-15525
0cc28a0Fixing some things.

comment:14 Changed 7 years ago by Travis Scrimshaw

Cc: Kevin Dilks added
Status: needs_workneeds_review

comment:15 Changed 7 years ago by Kevin Dilks

Milestone: sage-6.4sage-6.9

comment:16 Changed 7 years ago by Kevin Dilks

So far only noticing very minor issues.

  • In the definition of being \ell-regular, it should mention that m_i is the multiplicity of i in the partition. The first time I looked at this, I thought that m_i was maybe referring to the part sizes. In the source code you can just search for 'm_i' to see what it means, but in the HTML doc 'm_i' is always going to be Tex'd and harder to search for. Also, character_polynomial() doc used a_i to refer to the multiplicity of i in a permutation alpha, so maybe that should be changed to m_i to be consistent.
  • Does the code ever check that \ell is an integer, and preferably a nonnegative one?

comment:17 Changed 7 years ago by git

Commit: 0cc28a0202ba183faec750fa4e02083d1500e52d1ec481d803e3fa7d8c3d0e4038f4c476a73c0fd0

Branch pushed to git repo; I updated commit sha1. New commits:

1ec481dAddressing Kevin's comments.

comment:18 Changed 7 years ago by Kevin Dilks

Status: needs_reviewpositive_review

comment:19 Changed 7 years ago by Travis Scrimshaw

Milestone: sage-6.9sage-6.10
Reviewers: Kevin Dilks

comment:20 Changed 7 years ago by Volker Braun

Branch: public/combinat/partitions_constraints-155251ec481d803e3fa7d8c3d0e4038f4c476a73c0fd0
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.