edu.mines.jtk.lapack
Class DMatrixEvd

java.lang.Object
  extended by edu.mines.jtk.lapack.DMatrixEvd

public class DMatrixEvd
extends java.lang.Object

Eigenvalue and eigenvector decomposition of a square matrix A.

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.

Version:
2005.12.16
Author:
Dave Hale, Colorado School of Mines

Constructor Summary
DMatrixEvd(DMatrix a)
          Constructs an eigenvalue decomposition for the specified square matrix.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DMatrixEvd

public DMatrixEvd(DMatrix a)
Constructs an eigenvalue decomposition for the specified square matrix.

Parameters:
a - the square matrix
Method Detail

getV

public DMatrix getV()
Gets the matrix of eigenvectors V.

Returns:
the matrix V.

getD

public DMatrix getD()
Gets the block diagonal matrix of eigenvalues D.

Returns:
the matrix D.

getRealEigenvalues

public double[] getRealEigenvalues()
Gets the real parts of the eigenvalues.

Returns:
array of real parts = real(diag(D)).

getImagEigenvalues

public double[] getImagEigenvalues()
Gets the imaginary parts of the eigenvalues

Returns:
array of imaginary parts = imag(diag(D))