$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Slicing multi_array
From: James Amundson (amundson_at_[hidden])
Date: 2009-11-05 15:08:13
On 11/04/2009 05:39 PM, Rhys Ulerich wrote:
>
> I want to write a function that operates on one-dimensional
> multi_array's and use it to modify the columns of a
> two-dimensional multi_array. I thought that this would be a
> straightforward application of slicing, i.e., views with
> dimensional reduction.
>
> Any suggestions?
>
>
> Attached version of it working, I think. Not quite what you had in
> mind since my attachment includes saves the view as a temporary and
> then passes the view by reference to the function fill_array.
Thanks. That works, but it's really ugly.
I don't understand why a slice of a multi_array(_ref) isn't simply a
multi_array_ref. The current implementation seems to make dealing with
slices unnecessarily complicated. The documentation on views is also
very thin. Can anyone explain the rationale behind the design?
Thanks again,
Jim