Boost logo

Boost Users :

From: Ronald Garcia (garcia_at_[hidden])
Date: 2006-05-24 14:26:54


Hi Levent,

In this case, '???' should be:

Arr::index_gen::gen_type<3,3>::type;

gen_type is a type generator for specifying an the result of applying
operator[] to an index_gen. It takes two unsigned integral
arguments. The first specifies the number of dimensions of the
original array (to which operator[] is being applied). The second
specifies the number of dimensions in the resulting view.

Hope this helps,
ron

On May 6, 2006, at 6:33 PM, Levent wrote:

> Is it possible to store tuples of index or range values (or
> generators)
> for later reuse? Consider the following:
>
> typedef boost::multi_array<int,3> Arr;
> typedef Arr::index_range Ir;
> typedef ??? indices;
> Arr a(boost::extents[3][4][5]);
> Arr b(a);
> indices somerange = Arr::index_gen[Ir()][Ir(1,5)][Ir()<2];
> b[somerange] = a[somerange];
> // and so on
>
> What should `???' be?
>
> thanks
> - Levent
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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