Boost logo

Ublas :

From: Nico Galoppo (nico_at_[hidden])
Date: 2007-07-11 14:37:45


Hi,

what is the best way to construct a diagonal matrix from a vector (where the
vector should be the diagonal).

I think I can use banded_matrix<> for diagonal matrices, but there seems to be
no explicit constructors except for maybe assigning the vector to a slice of the
banded_matrix<>? In this case, what are the performance implications?

Any help appreciated.

--nico

-- 
Nico Galoppo        UNC-CH PhD.student        http://www.ngaloppo.org
                    cell +1-919-360-5056