Boost logo

Boost :

From: rgarcia1771 (garcia_at_[hidden])
Date: 2002-01-18 15:04:58

--- In boost_at_y..., Toon Knapen <toon.knapen_at_s...> wrote:
> Looking at the slicing and ranging possibilities of both multi_array
> ublas, I find the concepts as they are currently defined overlapping
> limited in respect to e.g. Blitz++.
The slicing and ranging options of Blitz++ exist in what I call
"views." One can create a view with less than or equal to the number
of dimensions of the original array. I believe that Blitz++ refers to
these operations under two separate names (slicing for the less than

> But another concept I'm missing, and which is in neither of the three
> libraries, is creating a sub-array (of the same order as the array)
> contains a specific selection of indices for every dimension of the
> array. e.g. in the 2D case I would like to do
> matrix< double > A(8,8);
> boost::array<3> i1 = { 0,1,6 };
> boost::array<5> i2 = { 5,6,7 };
> sub_matrix sub_A = submatrix(A, i1,i2 );
> where sub_A contains all element that are in columns 5,6 and 7 and in
> rows 0,1 and 6. The difference with a range is thus that this sub-array
> is not a continuous block in the original array. The diff with the
> current definition of slicing is that the selection does not need to be
> strided.
Ahh. This sort of "indirect" view does not currently exist in
multi_array, but I see its utility. I would like to see this
functionality in multi_array.

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