
Ublas : 
From: Gunter Winkler (guwi17_at_[hidden])
Date: 20061012 04:47:29
On Thursday 12 October 2006 01:22, Nico Galoppo wrote:
> Hi everybody,
>
> I'd like to choose the appropriate ublas matrix type for a matrix that has
> very few nonzero entries in each row, but every row has atleast a few
> nonzeros. (In fact, every row has exactly three of them).
This perfectly fits for compressed_matrix.
>
> Let's call this matrix J. I'd like to perform matrix multiplies M *
> trans(J) and vector multiplies J * x efficiently. Which of the ublas sparse
> types (compressed_matrix, gvov, ...) have those matrixmatrix multiplies
> specialized?
currently there is no specialization of matrixaxpy for the different sparse
types, except the general iterator based axpy (see operation.hpp). If you
often have to compute J * M' you can easily take the compressed_matrix*vector
axpy_prod from operation.hpp and modify it to compute
compressed_matrix*dense_matrix.
AFAIK the compressed_matrix (CSR, CSC) has always the fastest multiplication
speed.
mfg
Gunter