|
Boost : |
From: Jeremy Siek (jsiek_at_[hidden])
Date: 2000-12-01 10:41:08
On Thu, 30 Nov 2000, Jeremy Siek wrote:
> Hi Giovanni,
>
> Hmm, my intuition is that when dereferencing the Array<int,2>::iterator
> and Array<int,3>::iterator I should get a subarray, not an element. I
> would rather have to explicitly request a "flattened" view to get what you
> have here.
Just something to back up this intuition:
It is natural to expect that a[i] be equivalent to *(a.begin() + i). For
this to be true for the multi-dim array, the iterators for higher
dimensional slices need to dereference to give subarrays instead of the
flattened sections.
Ciao,
Jeremy
----------------------------------------------------------------------
Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
Ph.D. Candidate email: jsiek_at_[hidden]
Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk