Boost logo

Boost :

Subject: Re: [boost] [multi_array] Slices, views and sub_arrays
From: Ronald Garcia (garcia_at_[hidden])
Date: 2008-10-10 19:05:28

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.


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:
> listinfo.cgi/boost

Boost list run by bdawes at, gregod at, cpdaniel at, john at