Am Donnerstag, 30. Oktober 2008 00:46 schrieb Matthew Wilkins:
> How do I convert between Symmetric Double and General Double matrices and
> vice versa? For example, I have a matrix A defined in my class definition
> as LaSymmMatDouble. To compute this matrix, I have to multiply a non-square
> LaGenMatDouble matrix B with it's transpose. I would like to convert the
> LaGenMatDouble result and save it as a LaSymmMatDouble for use in further
> equations where I will take advantage of the BLAS symmetric multiplication
> routines. Is there an easy way to do this?
>
> int n = 5;
> LaGenMatDouble B(n,n),C(n,n);
> LaSymmMatDouble A(n,n);
>
> Blas_Mat_Trans_Mat_Mult(B,B,C);
>
> // How do I accomplish this step?
> A = C;
There is no function available in lapackpp to do this. Sorry.
I don't even know what lapack/blas (without the"pp") offer for this kind of
conversion. Maybe there is a multiplication available whose output type is
directly the symmetric matrix, as this is the only way to ensure a symmetric
matrix really results.
> I tried to use the la::convert_mat<type>(A) function but it apparently does
> not contain the mapping between the symmetric and general matrix classes.
Right; those functions are only convert between the value_type of the matrix,
i.e. between double, float, int, and long int.
Regards,
Christian
|