org.ejml.simple
Class SimpleEVD<T extends SimpleMatrix>

java.lang.Object
  extended by org.ejml.simple.SimpleEVD<T>

public class SimpleEVD<T extends SimpleMatrix>
extends Object

Wrapper around EigenDecomposition for SimpleMatrix

Author:
Peter Abeles

Constructor Summary
SimpleEVD(DenseMatrix64F mat)
           
 
Method Summary
 Complex64F getEigenvalue(int index)
           Returns the value of an individual eigenvalue.
 T getEigenVector(int index)
           Used to retrieve real valued eigenvectors.
 EigenDecomposition getEVD()
          Returns the underlying decomposition that this is a wrapper around.
 int getNumberOfEigenvalues()
          Returns the number of eigenvalues/eigenvectors.
 double quality()
           Computes the quality of the computed decomposition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleEVD

public SimpleEVD(DenseMatrix64F mat)
Method Detail

getNumberOfEigenvalues

public int getNumberOfEigenvalues()
Returns the number of eigenvalues/eigenvectors. This is the matrix's dimension.

Returns:
number of eigenvalues/eigenvectors.

getEigenvalue

public Complex64F getEigenvalue(int index)

Returns the value of an individual eigenvalue. The eigenvalue maybe a complex number. It is a real number of the imaginary component is equal to exactly one.

Parameters:
index - Index of the eigenvalue eigenvector pair.
Returns:
An eigenvalue.

getEigenVector

public T getEigenVector(int index)

Used to retrieve real valued eigenvectors. If an eigenvector is associated with a complex eigenvalue then null is returned instead.

Parameters:
index - Index of the eigenvalue eigenvector pair.
Returns:
If the associated eigenvalue is real then an eigenvector is returned, null otherwise.

quality

public double quality()

Computes the quality of the computed decomposition. A value close to or less than 1e-15 is considered to be within machine precision.

This function must be called before the original matrix has been modified or else it will produce meaningless results.

Returns:
Quality of the decomposition.

getEVD

public EigenDecomposition getEVD()
Returns the underlying decomposition that this is a wrapper around.

Returns:
EigenDecomposition


Copyright © 2011. All Rights Reserved.