Boost logo

Glas :

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

From: Matthias Troyer (troyer_at_[hidden])
Date: 2006-01-18 09:03:14


On Jan 18, 2006, at 1:57 PM, Karl Meerbergen wrote:

> Can we conclude that
>
> 1) 'Nested' collections are supported in containers and views (matrix
> row, column, etc) only, but not in computational algorithms?
>
> 2) Those who want to use vector<vector<T>> etc in computations have to
> implement their own.

It should not be necessary to write your own algorithm. It should be
enough to make sure that your data type models the required concepts,
i.e. that it satisfies all the requirements. This might mean
providing an operator* or a norm_1 function.

>
> 3) GLAS should be relatively easy to extend, i.e. it should be
> possible
> to write
> glas::norm_1(v), where norm_1 is dispatched to a user defined
> function.

Of course. Isn't that the whole idea behind the project?

Matthias