From: Ross Smith (r-smith_at_[hidden])
Date: 2001-11-14 18:40:49
Ullrich Koethe wrote:
> Michiel Salters wrote:
> > Not bad at all.
> > I do think we should have a good review, from a C++ point of view. E.g.
> > Having
> > members "Iterator" instead of "iterator" doesn' t affect the image
> > processing part,
> > but it makes it a bit harder to treat an image as just another container.
> I have thought about this a lot. Currently, the names are different
> because the concepts are in fact incompatible.
> std::vector<...>::iterator is a 1D iterator, while
> vigra::BasicImage<...>::Iterator is 2D. The names remind me of the
> difference. It would be consistent with the STL to rename
> vigra::BasicImage<...>::ScanOrderIterator into
> vigra::BasicImage<...>::iterator because this iterator is in fact 1D.
> But then the 2D iterator should be renamed as well to avoid confusion.
> What would be intuitive names?
In my own multi-dimensional array and tree templates, I've coined the
term "traverser" for the equivalent of an iterator over non-linear data
I originally just called them iterators, but that never felt right
(regardless of how you spell it :-) ); to me, terms like "iteration"
imply a linear, one-after-the-other process. After a while I came up
with "traverser", which seems to me to fit the concept of navigating a
non-linear structure much better.
-- Ross Smith ...................................... Auckland, New Zealand r-smith_at_[hidden] ........................ http;//halflife.mani.ac.nz/ "A wise man learns from the mistakes of others; a fool learns only from his own." -- Gen. Aleksandr Lebed
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk