-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
PlanePartitions are not hashable #36118
Comments
Where are some places where PlanePartitions are being put into a set? Or any other places something that expects to be able to hash PlanePartitions but cannot? |
This is mostly needed in user code. For example, imagine that you want to find a bijection between TSSCPP and ASM:
|
Then I wouldn't say a bug because that is a more general issue. This is described well with the distinction of frozenset and set. That idea works around something mutating under your feet with a version that can't. For this example, what if there was a method that does some time step of a box falling problem that mutates the partition. I don't want to store every step as a brand new immutable object when I just want the final partition for some calculation about limit shapes. |
This sounds an awful lot like premature optimization. Why are you afraid of creating a new plane partition? Note that, in general, if you add a single box to an existing one, you may be copying the old one anyway. If you really need to squeeze out all you can I think it would be best to create a specialized class for "chains" of plane partitions. |
…gemath#36116 * Fix a thinko in the iterator for TSSCPP * make plane partitions hashable * avoid rational numbers in the cardinality methods, when necessary * raise an error when an integer and a symmetry is provided as argument to `PlanePartitions` Fixes sagemath#36119 Fixes sagemath#36118 Fixes sagemath#36116 - [X] The title is concise, informative, and self-explanatory. - [X] The description explains in detail what this PR is about. - [X] I have linked a relevant issue or discussion. - [X] I have created tests covering the changes. URL: sagemath#36124 Reported by: Martin Rubey Reviewer(s): Frédéric Chapoton
Steps To Reproduce
Expected Behavior
should return a hash.
Actual Behavior
A
TypeError
is raised.Additional Information
Plane partitions inherit from
ClonableArray
, but the elements of the array are lists, eg.:Environment
Checklist
The text was updated successfully, but these errors were encountered: