Boost logo

Ublas :

From: Preben Hagh Strunge Holm (preben_at_[hidden])
Date: 2007-03-05 09:34:51


> You could use a custom class and overload the prod() function (or simpler
> provide a special axpy_prod) which looks like
>
> project(y, range(r1,r2)) += prod( submatrix, project(x, range(c1,c2)) )

The project-function?
Could you explain what should be going on here?

> where submatrix has size (r2-r1)x(c2-c1). Using a sparse matrix is also
> possible but may be slower because you have to store the column indices.
> Usually the dense algorithm wins over the sparse when there are more than 25%
> non-zeros in you matrix.
>
> Alternatively you could develop a new block-sparse matrix class (which would
> be very interesting) and contribute it to ublas.

I don't think I have the competence in C++ to do that.. But yes - quite
interesting.

I'll look more into the sparse matrix. Sometimes there are only 3 or 6
elements in the matrix of size 72x72 (that's below 25% "I think").

Thanks for helping

Best regards,
Preben