#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:  Nathann Cohen, Jeroen
  Anne Schilling, Nicolas M. Thiery  |  Demeyer, Travis Scrimshaw
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/ticket/17979                |  0bff4490123fc1366799be4a92d5d5ddfb82a5cc
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by ncohen):

 Hello Nicolas,

 I reported the following problems:

 - From the doumentation: infinite set, no warning:
   {{{
   sage: for x in IntegerListsLex(NonNegativeIntegers(),length=1):
   ....:     pass
   }}}

 - Non ordered output:
   {{{
   sage: IntegerListsLex([1,2],length=3).list()
   [[1, 0, 0],
    [0, 1, 0],
    [0, 0, 1],
    [2, 0, 0],
    [1, 1, 0],
    [1, 0, 1],
    [0, 2, 0],
    [0, 1, 1],
    [0, 0, 2]]
   }}}

 > Indeed, and this is in fact a feature. I reworked the documentation to
 better
 > highlight this.

 I consider this example to break what the class promises (by being called
 `IntegerListsLex`): its output is not sorted lexicograpically.

 Now, I agree that this is hard to fix inside of the class. Thus instead of
 claiming that it is not a bug by adding a line of documentation (which is
 why
 you are rewriting the class today) please consider deprecating it.
 Updating the
 code that calls it should not be a problem, as it can call
 `DisjointUnionEnumeratedSets` directly.

 Nathann

--
Ticket URL: <http://trac.sagemath.org/ticket/17979#comment:439>
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