Salut Sébastien!

On Fri, Feb 08, 2013 at 02:36:18PM -0800, slabbe wrote:
>    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...?

Yes, this is definitely inconsistent with what the doc says.

>    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.

I don't have a strong opinion. From the user point of view there
certainly should be a single entry point. Whether internally this is
implemented in one or two class is mostly an implementation detail.

Just a (non rhetorical) question: as in SearchForest, we will
eventually want additional methods like "return all the elements of
depth 3". Does those make sense for a set defined recursively if it is
configured with depth first search enumeration? If not, that may call
for having indeed two classes since the operations will be different.

In any case: if at all possible, I would recommend to go either for
the full refactorization (SearchForent + TransitiveIdeal +
TransitiveIdealGraded) or nothing. Just in order to avoid having yet
another intermediate state for which we need to handle backward
compatibility.

        http://trac.sagemath.org/sage_trac/ticket/6637

Thanks for working on that!

Cheers,
                                Nicolas
--
Nicolas M. Thiéry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
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.


Reply via email to