On Tue, Mar 13, 2012 at 05:52:03PM +0100, Florent Hivert wrote:
> So if we suggest that the sum could be negative then we should also
> take care of having other negative argument.

I would put it more mildly: if we accept negative sums, then the user
might expect that other arguments like min_part would accept negative
values. However the underlying algorithmic strongly relies on all
parts to be non negative.

That being said, if there is a good use case where it is much more
practical to accept negative sums, and if it can be implemented
consistently for Partitions, Compositions, and other IntegerVectors
with just a few lines of code, then I guess I would be fine with it,
as long as this is documented as such:

    For the user's convenience, Partitions(-4) is accepted and returns
    the empty set::

        sage: Partitions(-4).list()
        []
        sage: TestSuite(Partitions(-4)).run()

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to