Boost logo

Boost Users :

Subject: Re: [Boost-users] [multi_array] Access a view's index_range
From: Ronald Garcia (garcia_at_[hidden])
Date: 2008-10-10 19:11:00


Hi Rob,

I mis-spoke, index_bases() is exactly what you want. Use that in
place of indices() below.

cheers,
ron

On Oct 10, 2008, at 3:02 AM, Robert Jones wrote:

>
> Without making the assumption that my indices are zero based I
> think I can generally
> write my loop as, (and please confirm this btw)
>
> for (view_t::index i = * view.index_bases(); i != * view.shape(); +
> +i ) {.....}
>
> but it seems a rather non-obvious and cumbersome expression. If
> view_t had
> an indices() method that returned a list of index_range objects
> then I could
> write
>
> for(view_t::index i = view.indices()[0].start(); i != view.indices()
> [0].finish(); ++i ){.....}



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