public class DMatrixEvd
extends java.lang.Object
If A is symmetric, then A = V*D*V' where the matrix of eigenvalues D is diagonal and the matrix of eigenvectors V is orthogonal (V*V' = I).
If A is not symmetric, then the eigenvalue matrix D is block diagonal with real eigenvalues in 1-by-1 blocks and any complex eigenvalues lambda + i*mu in 2-by-2 block [lambda, mu; -mu, lambda]. The columns of V represent the eigenvectors in the sense that 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 on the condition number of V.
This class was adapted from the package Jama, which was developed by Joe Hicklin, Cleve Moler, and Peter Webb of The MathWorks, Inc., and by Ronald Boisvert, Bruce Miller, Roldan Pozo, and Karin Remington of the National Institue of Standards and Technology.
Constructor and Description |
---|
DMatrixEvd(DMatrix a)
Constructs an eigenvalue decomposition for the specified square matrix.
|
Modifier and Type | Method and Description |
---|---|
DMatrix |
getD()
Gets the block diagonal matrix of eigenvalues D.
|
double[] |
getImagEigenvalues()
Gets the imaginary parts of the eigenvalues
|
double[] |
getRealEigenvalues()
Gets the real parts of the eigenvalues.
|
DMatrix |
getV()
Gets the matrix of eigenvectors V.
|
public DMatrixEvd(DMatrix a)
a
- the square matrixpublic DMatrix getV()
public DMatrix getD()
public double[] getRealEigenvalues()
public double[] getImagEigenvalues()