|
Boost Users : |
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net