#20008: Implement non-recursive iterator for compositions
-------------------------------------+-------------------------------------
       Reporter:  tscrim             |        Owner:  sage-combinat
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.1
      Component:  combinatorics      |   Resolution:
       Keywords:  iterator           |    Merged in:
        Authors:  Travis Scrimshaw   |    Reviewers:  Darij Grinberg
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/combinat/composition_iterator-20008|  
c6ba3e7f4d3414877fdce12128d36b40bd5e7834
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by nthiery):

 * cc: vdelecroix (added)


Comment:

 Hi!

 Thanks Travis; the timing is indeed way better.

 Vincent, what do you think? This looks like a step in our general
 direction of splitting:

 - a lowlevel library of super-fast itertools style iterators producing
 plain data structures
 - higher level layer views, with all the Parent, Element goodies.

 I haven't followed much the progress in this direction. But I am wondering
 whether we want to go further (here or in a later ticket) by moving the
 iterator in a separate Cython file possibly using C-level data structure
 like vector<int> or ClonableIntArray.

 The other thing is that the algorithm here is exactly that of
 IntegerListLex, with in principle, the same complexity. Of course the
 later has overhead since it needs to handle all the additional
 constraints. Yet it would reduce code bloat to focus on
 optimizing/cythonizing IntegerListLex rather than having a bunch of non
 cythonized (by lack of manpower) python methods for special cases.

 Cheers,

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

Reply via email to