Boost logo

Glas :

Re: [glas] norms and inner products for vectors of matrices

From: Peter Gottschling (pgottsch_at_[hidden])
Date: 2006-01-11 20:13:09


I wonder what vectors of matrices are intended to be used for.

Matrices of matrices are as far as I see used for blocking, e.g.
matrix< matrix<T, fixed_size<2, 3> >. The corresponding vector types
to this matrix would also be blocked but this are vectors of vectors.
In the example it would be vector< vector<T, fixed_size<3> > x and
vector< vector<T, fixed_size<2> > y to compute y= A*x in the canonical
way.

If there is no other reason for having matrix< matrix> I don't see a
need to have vector< matrix > and vector< vector > is what we need to
consider.

Concerning the norms, I would like to limit the result type to real
values as I have seen it in all mathematical definitions. Does
somebody sees a reason to vectors or matrices as results?

The definitions of vector<vector> norms are straight forward:
- norm_1 := sum (norm_1(x[i])
- norm_2 := sqrt(sum(norm_2(x[i])^2)) // there might be more
efficient ways to compute this
- norm_inf := max(norm_inf(x[i])

Best,
Peter

On 09.01.2006, at 11:22, Karl Meerbergen wrote:

> I suggest we first agree what we mean by vector< matrix<T> > ? Why do
> we
> need it? What do we want to use it for?
>
> I do not interpret vector<matrix<T> > as a matrix, but a vector with
> matrix<T> as value_type.
> Strictly algebraically speaking, vector<matrix<T> > is an unusual
> concept, so I would avoid its use if possible.
>
> One possibility is to consider vector<matrix> as a matrix, but which is
> its size? Suppose v[0] is a 2x3 matrix and v[1] a 4x1 matrix, which is
> the number of columns of v?
>
> An argument in favour of vector<matrix> is the possibility for blocking
> in algorithms. But I think there is a better way than vector<matrix>
> for
> doing this.
>
> Perhaps we could introduce the notion of grid, where a matrix (or a
> vector) can be mapped onto this grid for performing blocking
> operations.
> For example, a matrix mapped onto a (1x10) grid still is a matrix and
> not a vector<matrix>. The algorithms use the grid for computational
> purposes or for accessing the data. To the outside world, the matrix
> behaves like a matrix, while the algorithmic internals use the blocking
> information.
>
> The grid_type could be a template argument of vector and matrix.
>
>
> Karl
>
>
>
>
> Andrew Lumsdaine wrote:
>
>> I think the definition of the norm for a vector of matrices depends
>> on what is meant mathematically by a vector of matrices. If the
>> vector of matrices is a block row (or block column) sliced out of a
>> block matrix, then the definitions shown would not be the expected
>> norms for that portion of the matrix without the blocking. And I
>> think, at least in some cases, one would want those norms to be the
>> same.
>>
>>
>>
>
>
> _______________________________________________
> glas mailing list
> glas_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/glas
>
------------
Peter Gottschling
Research Associate
Open Systems Laboratory
Indiana University
301i Lindley Hall
Bloomington, IN 47405
Tel.: +1 812 855-8898 Fax: +1 812 856 0853
http://www.osl.iu.edu/~pgottsch