#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 | aec1e101e8078ed90c1c6c906f4b79dcfa93330f
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Hello,
There are several things that I do not quite understand. Could you explain
or modify it:
1. The iterator `IntegerListLex` aims to be fast and low-level. What is
the point of using the `Parent`/`Element` stuff? Why `ClonableArray` are
better than Python lists?
2. Having a nested class seems overkill. The class `_Iter` is created only
once in `__iter__`. Moreover, all methods in it starts with `p =
self.parent`. Why do you need to create this extra `_Iter` class? Why does
it need to be a nested class?
3. Do you have a use case for
{{{
sage: IntegerListsLex(NN, max_length=3)
Disjoint union of Lazy family (<lambda>(i))_{i in Non negative integer
semiring}
}}}
The feature only appears once in the doc in a place which does not
appear in the reference manual.
4. Why `_check_lexicographic_iterable` is a cached method? And I do not
get why is it called from `_Iter` and not at the initialization of
`IntegerListsLex`.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/17979#comment:291>
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.