Re: [Lapackpp-devel] Appreciation and suggestion
Status: Beta
Brought to you by:
cstim
From: Christian S. <sti...@tu...> - 2006-08-18 08:12:11
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Aosheng Rong schrieb: > Many thanks go to Dr.Stimming for adding the inverse of complex-value > matrix to lapackpp. Did you actually retrieve the code from CVS and test it? If yes, please confirm so that we can be sure this code is working correctly. > Thought: I wonder If the COMPLEX type in LAPACKPP is identical with > the complex<double> in GNU C++. No, it is not. http://lapackpp.sourceforge.net/html/lacomplex_8h.html http://lapackpp.sourceforge.net/html/classla_1_1complex.html > Right now, the Complex type in > LAPACKPP is the structure - type, instead of class - type, as in C++. > Within the LAPACKPP class, Class-Type COMPLEX in C++ is converted to the > Structure-Type COMPLEX, compatible with Fortran LAPACK. The direct > benifit from such a definition of Class-Type COMPLEX is that one can do > operations on the product and division using complex<double> type in > GNU C++, once results are obtained from the LAPACKPP. With the present > definition of COMPLEX, we have to do term-by-term calculation based on > the decomposition of real and imaginary parts. You need to manually convert the COMPLEX values into a LaComplex value, which will then have the automatic conversion operators to std::complex<double>, as follows: std::complex<double> z; z = z * LaComplex( myMatrix(0, 2) ); which will do the automatic conversion for you. (At least I *thought* this should work.) Christian -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQCVAwUBROV2QmXAi+BfhivFAQJZ7wP+P9fEOrujLVMwi5vDQ+KnGvydX/8sYeQK sWjDpFgaaNkM0ECQsOhDtJBNC48NETdV57Z9T0nJ0Y1nsLKtbZHGBaTvAFnkPgpc L6upCNCM+KYOhU4HOD5qO8veuHLuwce+7OXIpsQ5EmsQuiWJyNU05AyL3kqXXLzx n9fdzjh02mM= =mk4V -----END PGP SIGNATURE----- |