no.uib.cipr.matrix
Class EVD

java.lang.Object
  extended by no.uib.cipr.matrix.EVD

public class EVD
extends java.lang.Object

Computes eigenvalue decompositions of general matrices


Constructor Summary
EVD(int n)
          Creates an empty eigenvalue decomposition which will compute all the eigenvalues and eigenvectors (left and right)
EVD(int n, boolean left, boolean right)
          Creates an empty eigenvalue decomposition
 
Method Summary
 EVD factor(DenseMatrix A)
          Computes the eigenvalue decomposition of the given matrix
static EVD factorize(Matrix A)
          Convenience method for computing the complete eigenvalue decomposition of the given matrix
 double[] getImaginaryEigenvalues()
          Gets the imaginary part of the eigenvalues
 DenseMatrix getLeftEigenvectors()
          Gets the left eigenvectors, if available
 double[] getRealEigenvalues()
          Gets the real part of the eigenvalues
 DenseMatrix getRightEigenvectors()
          Gets the right eigenvectors, if available
 boolean hasLeftEigenvectors()
          True if the left eigenvectors have been computed
 boolean hasRightEigenvectors()
          True if the right eigenvectors have been computed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EVD

public EVD(int n)
Creates an empty eigenvalue decomposition which will compute all the eigenvalues and eigenvectors (left and right)

Parameters:
n - Size of the matrix

EVD

public EVD(int n,
           boolean left,
           boolean right)
Creates an empty eigenvalue decomposition

Parameters:
n - Size of the matrix
left - Whether to compute the left eigenvectors or not
right - Whether to compute the right eigenvectors or not
Method Detail

factorize

public static EVD factorize(Matrix A)
                     throws NotConvergedException
Convenience method for computing the complete eigenvalue decomposition of the given matrix

Parameters:
A - Matrix to factorize. Not modified
Returns:
Newly allocated decomposition
Throws:
NotConvergedException

factor

public EVD factor(DenseMatrix A)
           throws NotConvergedException
Computes the eigenvalue decomposition of the given matrix

Parameters:
A - Matrix to factorize. Overwritten on return
Returns:
The current decomposition
Throws:
NotConvergedException

getLeftEigenvectors

public DenseMatrix getLeftEigenvectors()
Gets the left eigenvectors, if available


getRightEigenvectors

public DenseMatrix getRightEigenvectors()
Gets the right eigenvectors, if available


getRealEigenvalues

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


getImaginaryEigenvalues

public double[] getImaginaryEigenvalues()
Gets the imaginary part of the eigenvalues


hasLeftEigenvectors

public boolean hasLeftEigenvectors()
True if the left eigenvectors have been computed


hasRightEigenvectors

public boolean hasRightEigenvectors()
True if the right eigenvectors have been computed