Boost logo

Boost :

From: Hubert HOLIN (Hubert.Holin_at_[hidden])
Date: 2001-06-28 16:19:39


Paris (U.E.), le 28/06/2001

--- In boost_at_y..., Larry Evans <jcampbell3_at_p...> wrote:

[SNIP]

> I'm confused by "accessing each index". Do you mean accessing the
> value corresponding to that index. For example, if the matrix is 'float A[N][M]`
> and if 'i' is such an iterator, then starting from the initial value of i:
> *i == A[0][0]
> *(++i) == A[0][1]
> ...
> *(++i) == A[N][M]
> ?
> In other words, the iterator produces a 'flattened' version or 'ravel' (apl term)
> of A, and then access the elements just as a regular stl iterator. Is that
> what you mean?

        Yes.

        The quirk is that on the one hand the traversal can be somewhat
more complicated than this (if required by the problem these iterators
are used for), and on the other hand not every index need be accessed
but only representatives of certain classes (such as in the case of a
row index), in which case a further level of iteration is needed after
dereferencing.

                Hubert Holin
                Hubert.Holin_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk