Now my compilation of the patched Sage finished, and it seems that the
patch doesn't even work anymore. SearchTree doesn't have a
breadth_first_search_iterator; maybe that class has changed while the
patch has been waiting for review?

On Aug 2, 12:09 pm, "Johan S. R. Nielsen" <santaph...@gmail.com>
wrote:
> Argh, my mail client just tricked me. Anyway:
>
> The main reason is that I see no mathematical obvious way of iterating
> through all vectors of the integers. The (arbitrarily) decided way in
> the patch seems usable in only very few cases (and it does not even
> contain vectors with any negative elements). If one would ever want to
> have such an iterator, it seems to me that it would almost always be
> vectors of some length that was the purpose.
>
> A secondary reason is generality: If it is decided to keep this
> iterator, I think a similar iterator should be implemented for all
> finite or countably infinite vector spaces (even modules). In the case
> of finite rings as basis, it might actually make good sense;
> especially, if one specifies the length of the vector in the iterator.
>
> Thirdly, with an iterator, the IntegerVectors supports the syntax
> {{{
>    v = IntegerVectors()[25]}}}
>
> The implementation suggested in the patch would give calls like this
> something like quadratic running time. I think that the syntax should
> then explicitly be banned (by implementing a faulting __getitem__
> function?) or implemented as calculating the vector directly in some
> way. The last suggestion again seems to be hard with the current
> implementation.
>
> I have updated the trac to "needs work" and referred to this
> discussion.
>
> Cheers,
> Johan

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to