#13605: Partition options and cleanup partitions documentation
-----------------------------------------------+----------------------------
Reporter: tscrim | Owner: sage-combinat
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.7
Component: combinatorics | Resolution:
Keywords: partition, options, output | Work issues:
Report Upstream: N/A | Reviewers: Andew Mathas
Authors: Travis Scrimshaw | Merged in:
Dependencies: #13074 #13762 #13840 #10193 | Stopgaps:
-----------------------------------------------+----------------------------
Comment (by tscrim):
Hey Simon,
Replying to [comment:16 SimonKing]:
> #12313 introduces a speed regression related with the fact that
currently Partitions are not unique parents. This is dealt with at #13991.
>
> If I understand correctly, you intend to make partitions unique parents.
Hence, it would probably solve the speed regression. But how soon do you
expect this ticket to be ready for being merged (given that one dependency
does not have a positive review yet)?
As soon as possible. I might move this past the #10193 dependency since it
is more of a semantic rather than a functional dependency.
> At #13991, I have attached a patch that turns `Partitions_FOO` for
various values of FOO into a `UniqueRepresentation` (actually, I do it for
all classes which do not take lists as input data). It is not finalised
yet, but since it does fix the speed regression, it could be a short-term
solution, if you need more time with the ticket here.
-----
Hey Andrew,
As I recall, Nicolas' main reason was suppose you did something like the
following:
{{{
sage: P = Partitions(4)
sage: Partitions.options(order="dominance")
sage: y = Partition([2,1])
sage: L = [x for x in P if x < y]
}}}
and you depended on this being dominance ordering. Somewhere along the
way, you set the ordering back to "lex", and then needed to recreate `L`.
You would (generally) end up with a different list. I do agree with you
that (new) code relying on a particular ordering should call that order
method directly, but I agree with Nicolas assessment more in that this is
somewhat subtle behavior and can lead to subtle bugs.
End of the day, I'm really starting to think that deciding an ordering is
more trouble than it's worth. At the very least, given #13991, should we
separate this feature out to another ticket?
Last thing for now, are there any other major issues currently with this
patch? I really appreciate you reviewing this.
Thank you,
Travis
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13605#comment:17>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.