
Hi Rob, Yes, the return type of indexing a view is a subarray. However, subarrays don't copy the data in an array. Think of a subarray as just a special case of view. cheers, ron On Oct 10, 2008, at 5:12 AM, Robert Jones wrote:
Hi All
I'm still plugging away at trying to make use of multi_array, but I seem to be having a few problems! I suspect my understanding of the basic paradigm is flawed.
I'm bit confused about views and slices. If I start with a rectangular, 2 dimensional grid, take a view of the whole grid, and then use a single subscript to index into that view, then I expected the result to be a view of one less dimension then the original view. However, it seems to be a "sub_array".
which seems to confirm I've got all my consts and dimensions correct.
So, why is this wrong?
Also, does the return type of sub_array, rather than array_view, mean that the contents of the relevant cells have been copied?
Thanks
- Rob. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/ listinfo.cgi/boost