#include <jama_eig.h>
Public Methods | |
Eigenvalue (const TNT::Array2D< Real > &A) | |
void | getV (TNT::Array2D< Real > &V_) |
void | getRealEigenvalues (TNT::Array1D< Real > &d_) |
void | getImagEigenvalues (TNT::Array1D< Real > &e_) |
void | getD (TNT::Array2D< Real > &D) |
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 . . . . . . ythen D looks like
u v . . . . -v u . . . . . . a b . . . . -b a . . . . . . x . . . . . . yThis 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).
|
Check for symmetry, then construct the eigenvalue decomposition
|
|
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 . . . . . . ythen D looks like u v . . . . -v u . . . . . . a b . . . . -b a . . . . . . x . . . . . . yThis keeps V a real matrix in both symmetric and non-symmetric cases, and A*V = V*D.
|
|
Return the imaginary parts of the eigenvalues in parameter e_.
|
|
Return the real parts of the eigenvalues
|
|
Return the eigenvector matrix
|