#5600: [with patch, needs work] Cleanup of integer compositions
---------------------------+------------------------------------------------
Reporter: nthiery | Owner: nthiery
Type: enhancement | Status: assigned
Priority: major | Milestone: sage-combinat
Component: combinatorics | Keywords: integer compositions
---------------------------+------------------------------------------------
Comment(by ddrake):
I very much want this patch to get in, since I almost opened a ticket for
one of the problems that it fixes. ({{{Composition()}}} doesn't take
tuples as input.) One thing that needs to change, though, is with the
docstring for Composition: right now, it tells the user to do
{{{Composition_class?}}}, but that doesn't work since
{{{Composition_class}}} is not in the default namespace. I think
{{{Composition?}}} should simply display the correct docstring; there's no
need to annoy the user by sending him or her bouncing from one docstring
to the next.
Another issue is that the AUTHORS block is deleted from the head of the
file. This should not be done. In fact, you should add yourself to it as
the [http://sagemath.org/doc/developer/conventions.html#headings-of-sage-
library-code-files developer's guide suggests]: something like "Nicolas M.
Thiery (2009-05-25): several cleanups, new functions, and improvements
(trac #5600)". I like listing ticket numbers because interested developers
can go see exactly what you changed.
Tiny grammar/spelling issues:
* At the top of compositions.py, you write "a compositions c of..."; you
should use the singular. "A composition c of..."
* line 56: you say a composition is a list of ''positive'' integers, but
it should be a list of ''nonnegative'' integers.
Finally, I am seeing a doctest failure with this patch applied to vanilla
4.0.rc0:
{{{
**********************************************************************
File "/var/tmp/sage-4.0.rc0/devel/sage/sage/combinat/ribbon_tableau.py",
line 875:
sage: SemistandardMultiSkewTableaux([sp[0], sp[-1]],[2,2,2]).list()
Expected:
[[[[1], [2], [3]], [[1, 2, 3]]]]
Got:
[[[[1, 1, 2]], [[None, None, 3], [None, 3], [2]]], [[[1, 2, 2]],
[[None, None, 3], [None, 3], [1]]], [[[1, 1, 2]], [[None, None, 3], [None,
2], [3]]], [[[1, 2, 2]], [[None, None, 3], [None, 1], [3]]], [[[1, 1, 2]],
[[None, None, 2], [None, 3], [3]]], [[[1, 2, 2]], [[None, None, 1], [None,
3], [3]]], [[[1, 1, 3]], [[None, None, 3], [None, 2], [2]]], [[[1, 2, 3]],
[[None, None, 3], [None, 2], [1]]], [[[1, 2, 3]], [[None, None, 3], [None,
1], [2]]], [[[2, 2, 3]], [[None, None, 3], [None, 1], [1]]], [[[1, 1, 3]],
[[None, None, 2], [None, 3], [2]]], [[[1, 2, 3]], [[None, None, 2], [None,
3], [1]]], [[[1, 2, 3]], [[None, None, 1], [None, 3], [2]]], [[[2, 2, 3]],
[[None, None, 1], [None, 3], [1]]], [[[1, 1, 3]], [[None, None, 2], [None,
2], [3]]], [[[1, 2, 3]], [[None, None, 2], [None, 1], [3]]], [[[1, 2, 3]],
[[None, None, 1], [None, 2], [3]]], [[[2, 2, 3]], [[None, None, 1], [None,
1], [3]]], [[[1, 3, 3]], [[None, None, 2], [None, 2], [1]]], [[[1, 3, 3]],
[[None, None, 2], [None, 1], [2]]], [[[1, 3, 3]], [[None, None, 1], [None,
2], [2]]], [[[2, 3, 3]], [[None, None, 2], [None, 1], [1]]], [[[2, 3, 3]],
[[None, None, 1], [None, 2], [1]]], [[[2, 3, 3]], [[None, None, 1], [None,
1], [2]]]]
**********************************************************************
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5600#comment:7>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---