#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:
Report Upstream: N/A | Commit:
Branch: | 39d1993d70a837967109be12de261f4f504901cc
public/ticket/17979 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by nthiery):
Replying to [comment:83 jdemeyer]:
> Replying to [comment:76 bgillespie]:
> > The point is that if it is a bug, then it's a bug in the
specification, not the code, since we are requiring the output to be in
lexicographic order. However, if we don't want to call it an iterator
because it doesn't satisfy the contract of eventually reaching every
element in the set, then the class won't interact well with the many
places that use iterators in Python and Sage. Can you propose a solution
to this?
>
> The are two possible solutions:
> 1. raise an exception if the iterator doesn't iterate over all elements.
> 2. drop the "lexicographic order" requirement.
Having alternative implementations that take the second route to
handle those cases is indeed a worthwhile goal. But that's not
`IntegerListsLex`'s job :-)
Here, we shall aim for 1., whenever possible: that is systematically
when floor/ceiling are not functions, and when it's obvious and cheap
otherwise.
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/ticket/17979#comment:103>
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.