Hi Doug,

Welcome to the Sage community!

On Wed, Feb 09, 2011 at 01:02:10PM +0800, D. S. McNeil wrote:
> (2) No kwarg constraints in Partitions/Compositions should be mutually
> exclusive.  (I think there's a ticket for this but I can't find it
> now.)
> 
> Partitions(15,length=5, parts_in=[1,3,4]) doesn't work, so you have to
> do an explicit filter.  Optimizing it is a separate issue, but when
> there's a trivial way to implement the functionality (simply test that
> partitions satisfy the specified criteria before yielding them, in
> cases where we don't currently embed the constraints in the
> construction process itself), then ISTM we should do so now rather
> than wait for a more efficient implementation to appear.
> Functionality+speed > functionality, but functionality >>> no
> functionality.

Annoying, huh? This has bothered us ever since IntegersListLex was
first implemented in MuPAD 9 years ago :-)

In principle one of the goals of the upcoming Sage Days in Acadia in
May is to reimplement IntegersListLex
(http://trac.sagemath.org/sage_trac/ticket/6538). I can't guarantee
that it will actually happen though. Volunteers are welcome to
implement a temporary fix. However one should be careful: the kwarg
options are *not* mutually exclusive as long as they are consistent
(for some loose definition of consistent), and this feature is used in
many places. So one should be careful not to slow things down in those
situations.

> Currently, partitions_restricted's docstring says not to use it but to
> use RestrictedPartitions instead, which in turn says not to use
> RestrictedPartitions but to use Partitions with the "parts_in"
> keyword, which in its turn doesn't work.

Specific examples welcome!

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

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to