#include <tnt_linalg.h>
Public Member Functions | |
| Eigenvalue (const Matrix< Real > &A) | |
| void | getV (Matrix< Real > &V_) |
| void | getRealEigenvalues (Vector< Real > &d_) |
| void | getImagEigenvalues (Vector< Real > &e_) |
| void | getD (Matrix< Real > &D) |
Private Member Functions | |
| void | tred2 () |
| void | tql2 () |
| void | orthes () |
| void | cdiv (Real xr, Real xi, Real yr, Real yi) |
| void | hqr2 () |
Private Attributes | |
| int | n |
| int | issymmetric |
| Vector< Real > | d |
| Vector< Real > | e |
| Matrix< Real > | V |
| Matrix< Real > | H |
| Vector< Real > | ort |
| Real | cdivr |
| Real | cdivi |
If A is symmetric, then A = V*D*V' where the eigenvalue matrix D is diagonal and the eigenvector matrix V is orthogonal. That is, the diagonal values of D are the eigenvalues, and V*V' = I, where I is the identity matrix. The columns of V represent the eigenvectors in the sense that A*V = V*D.
If A is not symmetric, then the eigenvalue matrix D is block diagonal with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues, a + i*b, in 2-by-2 blocks, [a, b; -b, a]. That is, if the complex eigenvalues look like
u + iv . . . . .
. u - iv . . . .
. . a + ib . . .
. . . a - ib . .
. . . . x .
. . . . . y
then D looks like
u v . . . .
-v u . . . .
. . a b . .
. . -b a . .
. . . . x .
. . . . . y
This keeps V a real matrix in both symmetric and non-symmetric cases, and A*V = V*D.The matrix V may be badly conditioned, or even singular, so the validity of the equation A = V*D*inverse(V) depends upon the condition number of V.
(Adapted from JAMA, a Java Matrix Library, developed by jointly by the Mathworks and NIST (see http://math.nist.gov/javanumerics/jama), which in turn, were based on original EISPACK routines.
Definition at line 283 of file tnt_linalg.h.
| TNT::Linear_Algebra::Eigenvalue< Real >::Eigenvalue | ( | const Matrix< Real > & | A | ) | [inline] |
Check for symmetry, then construct the eigenvalue decomposition
| A | Square real (non-complex) matrix |
Definition at line 1114 of file tnt_linalg.h.
| void TNT::Linear_Algebra::Eigenvalue< Real >::cdiv | ( | Real | xr, | |
| Real | xi, | |||
| Real | yr, | |||
| Real | yi | |||
| ) | [inline, private] |
Definition at line 649 of file tnt_linalg.h.
| void TNT::Linear_Algebra::Eigenvalue< Real >::getD | ( | Matrix< Real > & | D | ) | [inline] |
Computes the block diagonal eigenvalue matrix. If the original matrix A is not symmetric, then the eigenvalue matrix D is block diagonal with the real eigenvalues in 1-by-1 blocks and any complex eigenvalues, a + i*b, in 2-by-2 blocks, [a, b; -b, a]. That is, if the complex eigenvalues look like
u + iv . . . . .
. u - iv . . . .
. . a + ib . . .
. . . a - ib . .
. . . . x .
. . . . . y
then D looks like
u v . . . .
-v u . . . .
. . a b . .
. . -b a . .
. . . . x .
. . . . . y
This keeps V a real matrix in both symmetric and non-symmetric cases, and A*V = V*D.
| D,: | upon return, the matrix is filled with the block diagonal eigenvalue matrix. |
Definition at line 1221 of file tnt_linalg.h.
| void TNT::Linear_Algebra::Eigenvalue< Real >::getImagEigenvalues | ( | Vector< Real > & | e_ | ) | [inline] |
Return the imaginary parts of the eigenvalues in parameter e_.
| e_,: | new matrix with imaginary parts of the eigenvalues. |
Definition at line 1182 of file tnt_linalg.h.
| void TNT::Linear_Algebra::Eigenvalue< Real >::getRealEigenvalues | ( | Vector< Real > & | d_ | ) | [inline] |
Return the real parts of the eigenvalues
Definition at line 1172 of file tnt_linalg.h.
| void TNT::Linear_Algebra::Eigenvalue< Real >::getV | ( | Matrix< Real > & | V_ | ) | [inline] |
| void TNT::Linear_Algebra::Eigenvalue< Real >::hqr2 | ( | ) | [inline, private] |
Definition at line 667 of file tnt_linalg.h.
| void TNT::Linear_Algebra::Eigenvalue< Real >::orthes | ( | ) | [inline, private] |
Definition at line 554 of file tnt_linalg.h.
| void TNT::Linear_Algebra::Eigenvalue< Real >::tql2 | ( | ) | [inline, private] |
Definition at line 431 of file tnt_linalg.h.
| void TNT::Linear_Algebra::Eigenvalue< Real >::tred2 | ( | ) | [inline, private] |
Definition at line 314 of file tnt_linalg.h.
Real TNT::Linear_Algebra::Eigenvalue< Real >::cdivi [private] |
Definition at line 648 of file tnt_linalg.h.
Real TNT::Linear_Algebra::Eigenvalue< Real >::cdivr [private] |
Definition at line 648 of file tnt_linalg.h.
Vector<Real> TNT::Linear_Algebra::Eigenvalue< Real >::d [private] |
Arrays for internal storage of eigenvalues.
Definition at line 294 of file tnt_linalg.h.
Vector<Real> TNT::Linear_Algebra::Eigenvalue< Real >::e [private] |
Definition at line 295 of file tnt_linalg.h.
Matrix<Real> TNT::Linear_Algebra::Eigenvalue< Real >::H [private] |
Definition at line 303 of file tnt_linalg.h.
int TNT::Linear_Algebra::Eigenvalue< Real >::issymmetric [private] |
Definition at line 290 of file tnt_linalg.h.
int TNT::Linear_Algebra::Eigenvalue< Real >::n [private] |
Row and column dimension (square matrix).
Definition at line 288 of file tnt_linalg.h.
Vector<Real> TNT::Linear_Algebra::Eigenvalue< Real >::ort [private] |
Definition at line 309 of file tnt_linalg.h.
Matrix<Real> TNT::Linear_Algebra::Eigenvalue< Real >::V [private] |
Array for internal storage of eigenvectors.
Definition at line 298 of file tnt_linalg.h.
1.5.8