#17979: Reimplementation of IntegerListsLex
-------------------------------------+-------------------------------------
       Reporter:  aschilling         |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  blocker            |    Milestone:  sage-6.6
      Component:  combinatorics      |   Resolution:
       Keywords:  days64             |    Merged in:
        Authors:  Bryan Gillespie,   |    Reviewers:
  Anne Schilling, Nicolas M. Thiery  |  Work issues:  support n in an
Report Upstream:  N/A                |  iterable
         Branch:                     |       Commit:
  public/ticket/17979                |  6153cf8d39dc23cb41a3d0c2ea66ba5dc3abd2c0
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Replying to [comment:27 ncohen]:
 > - It seems that currently the method accepts input that does not satisfy
 the
 >   constraints that you list, i.e.:
 >
 >   {{{
 >   sage: IntegerListsLex(min_n=4)
 >   Integer lists of sum between 4 and 0 satisfying certain constraints
 >   sage: list(IntegerListsLex(min_n=4))
 >   []
 >   }}}
 >
 >   Should they really be considered as 'constraints', if the code accepts
 them
 >   and returns sensible output (i.e. empty sets)?
 I think that returning the empty set is the right answer here. As long as
 the question makes sense ''mathematically'', there should be an answer,
 not an exception.

 The only thing which can be a `ValueError` exception would be a negative
 length, since that doesn't even have a mathematical meaning. But I know
 from #17920 that some `Partitions` code gives a negative minimum length,
 so a negative value for `min_length` should just be treated as 0.

--
Ticket URL: <http://trac.sagemath.org/ticket/17979#comment:54>
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to