#17979: Reimplementation of IntegerListsLex
-------------------------------------+-------------------------------------
       Reporter:  aschilling         |        Owner:
           Type:  defect             |       Status:  needs_review
       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                |  d976b2087e17107f748b1cbe05f3fab93ea81734
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by nthiery):

 Replying to [comment:326 ncohen]:
 > The function `_possible_m(self, m, j, min_sum, max_sum)` takes four
 parameters, all of which are attributes of `self`.
 >
 > {{{
 > if self._next_state == LOOKAHEAD:
 >     m = self._current_list[-1]
 >     if self._possible_m(m, self._j,
 >        min_sum - (self._current_sum-m),
 >        max_sum - (self._current_sum-m)):
 > }}}
 >
 > It would make more sense to me if this function had no arguments at all.

 I agree that this should eventually become an argument-less
 `look_ahead` method that tests if the current list could possibly be a
 prefix of some valid list.

 I would like to postpone this change to #18055 however: anyway this
 method will need to be rewritten there (in particular to handle an
 empty `current_list`), and changing the interface now would require
 rewriting most of the current tests of `_possible_m` to construct a
 bunch of different IntegerListsLex objects instead of just passing
 various arguments. Note also that, as specified in the doc, `min_sum`
 and `max_sum` do not exactly match the corresponding attributes: they
 are bounds on the tail of the list only (agreed, the difference above
 could be done in _possible_m).

 Cheers,
                                       Nicolas

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