Boost logo

Ublas :

From: Kresimir Fresl (fresl_at_[hidden])
Date: 2007-08-24 12:22:56


Hi aain,

> Additional question:
> When it is written "symmetric matrix" in the documentation
> there, that means that I still pass a "usual"
> "ublas::matrix<std::complex<double> >",
> and during the call only upper or lower triangular
> part of it will be refered by lapack ; i.e. no
> "ublas::symmetric_adaptor" or "ublas::symmetric_matrix"
> is needed ?

As you can see in the table in atlas bindings doc, there are usually two
overloads of functions for symmetric and Hermitian matrices; eg.:

   syrk (Uplo,Trans,a,A,b,C)
   syrk (Trans,a,A,b,C)

For second overload, "It is assumed that matrix traits class can
determine whether upper or lower triangular part of A contains the
corresponding part of the symmetric/Hermitian matrix".

That is, first overload is for "usual" ublas matrices (and first
argument must be either CblasUpper or CblasLower, denoting that leading
upper or lower triangular part of A contains the upper or lower
triangular part of the symmetric/Hermitian matrix).

Second overload is for matrices wrapped in "ublas::symmetric_adaptor".
Traits class will extract CblasUpper/CblasLower from adaptor.

See examples ublas_symm*.cc in

http://boost.cvs.sourceforge.net/boost-sandbox/boost-sandbox/libs/numeric/bindings/atlas/

Hope this helps. Regards,

fres