diagonalize_2 - Diagonalizes a matrix
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
const Matrix *mp,
Given a matrix A, this routine computes A = E*D*inv(E), where D is diagonal,
and contains the eigenvalues of A, and the columns of E contain the
eigenvectors. If A is symmetric, then the eigenvalues are real. However, if
this is the case, then use the routine diagonalize_symmetric(). If
A is non-symmetric, but the eigenvalues are expected to be real regardless,
then use the routine diagonalize(). In general, this routine assumes that all
quantities may be complex.
The matrix of eigenvectors is put into the matrix pointed to by *E_re_mpp and
*E_im_mpp which are created or resized as needed. The diagonal matrix of
eigenvalues is put into the vectors pointed to by *D_re_vpp and *D_im_vpp,
which are also created or resized as needed. If any of these quantities are
not needed, the arguments may be set to NULL.
NO_ERROR on success, and ERROR on failure, with an appropriate error
message being set.
Unlike diagonalize() and diagonalize_symmetric() this routine does NOT
Technically, we compute the "right" eigenvectors. If needed, this routine
could be trivially modified to provide another diagonalization routine,
diagonalize_3() which could provide, both "left" and "right"
This routine requires that that the LAPACK library is available. If this
file was compiled without the presence of that library, then this routine
will return ERROR.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.