Boost logo

Ublas :

From: Nico Galoppo (nico_at_[hidden])
Date: 2006-07-05 05:08:47


Hi,

For linear algebra routines efficiency, I use a compressed_matrix for my sparse
matrix. Unfortunately, random insertion in a compressed_matrix is slow (see
Gunter's notes: )

Therefore, I changed my code to fill a temporary
ublas::generalized_vector_of_vector< real_type, row_major,
ublas::vector<compressed_vector<real_type> > > first, then assigning to the
compressed_matrix as such: C.assign(tmp);

The fill time has improved from 150s (compressed_matrix) to 0.9 s (fill of
vector_of_vector) + 29 s (assignment).

I was wondering if there may be an even faster way.

Thanks,

--nico

-- 
Nico Galoppo           UNC-CH :: ETHZ         http://www.ngaloppo.org
                        +41-77-4319939