Hi sage-combinat !! 1. In the file sage/combinat/backtrack.py, it is written::
- :class:`TransitiveIdeal`: Depth first search through a graph described by a ``neighbours`` relation. - :class:`TransitiveIdealGraded`: Breath first search through a graph described by a ``neighbours`` relation. But it does not look like it:: sage: C = TransitiveIdeal(lambda x: [2*x, 2*x+1], (1,)) sage: it = iter(C) sage: [next(it) for _ in range(10)] [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] < ---------- should not it be [1,2,4,8,16,....] my problem if it is infinite...? :: sage: C = TransitiveIdealGraded(lambda x: [2*x, 2*x+1], (1,)) sage: it = iter(C) sage: [next(it) for _ in range(10)] [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] 2. It is written (for both classes):: The memory complexity is the depth, that is the maximal distance between a generator and an element of `S`. But in the code, there is a set of ``known`` elements that are kept in memory, so why is the complexity said to be the depth !? 3. I really don't like the idea of having two classes (TransitiveIdeal and TransitiveIdealGraded). Their __init__ are the exact same. The only difference is the way the iterator is coded (TI is depth first and TIG is breadth first by default). They should just be merged and provide two distinct iterators method instead. See my patch at http://trac.sagemath.org/sage_trac/ticket/14052 where I am asking Anne not to add a new argument to the __init__ of TIG because I believe this class should just be deprecated. To me having two classes is like if the hypothesis on the relation were different, but they are the same, so it should be the same class! And if one really want __iter__ to behave depth first and /or breadth first, then we can make add changeable argument for type of enumeration used by __iter__. Cheers, Sébastien -- You received this message because you are subscribed to the Google Groups "sage-combinat-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-combinat-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-combinat-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-combinat-devel?hl=en. For more options, visit https://groups.google.com/groups/opt_out.