SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.factorization.eigen
Class EigenDecomposition

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.factorization.eigen.EigenDecomposition

public class EigenDecomposition
extends java.lang.Object

Let A be a square, diagonalizable N × N matrix with N linearly independent eigenvectors. Then A can be factorized as Q * D * Q' = A. Q is the square N × N matrix whose i-th column is the eigenvector of A, and D is the diagonal matrix whose diagonal elements are the corresponding eigenvalues.

See Also:
Wikipedia: Eigendecomposition of a matrix

Constructor Summary
EigenDecomposition(Matrix A)
          Run the eigen decomposition on a square matrix.
EigenDecomposition(Matrix A, double epsilon)
          Run the eigen decomposition on a square matrix.
 
Method Summary
 DiagonalMatrix D()
          Get the diagonal matrix D as in Q * D * Q' = A.
 Matrix Q()
          Get Q as in Q * D * Q' = A.
 Matrix Qt()
          Get Q' as in Q * D * Q' = A.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EigenDecomposition

public EigenDecomposition(Matrix A,
                          double epsilon)
Run the eigen decomposition on a square matrix.

Parameters:
A - a square, diagonalizable matrix
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0

EigenDecomposition

public EigenDecomposition(Matrix A)
Run the eigen decomposition on a square matrix.

Parameters:
A - a square, diagonalizable matrix
Method Detail

D

public DiagonalMatrix D()
Get the diagonal matrix D as in Q * D * Q' = A.

Note that for the moment we support only real eigenvalues.

Returns:
D

Q

public Matrix Q()
Get Q as in Q * D * Q' = A.

Note that for the moment we support only real eigenvalues.

Returns:
Q

Qt

public Matrix Qt()
Get Q' as in Q * D * Q' = A.

Note that for the moment we support only real eigenvalues.

Returns:
Q.t()

SuanShu, a Java numerical and statistical library

Copyright © 2012 Numerical Method Inc. Ltd. All Rights Reserved.