org.ejml.alg.dense.decomposition.eig.symm
Class SymmetricQrAlgorithm

java.lang.Object
  extended by org.ejml.alg.dense.decomposition.eig.symm.SymmetricQrAlgorithm

public class SymmetricQrAlgorithm
extends Object

Computes the eigenvalues and eigenvectors of a symmetric tridiagonal matrix using the symmetric QR algorithm.

This implementation is based on the algorithm is sketched out in:
David S. Watkins, "Fundamentals of Matrix Computations," Second Edition. page 377-385

Author:
Peter Abeles

Constructor Summary
SymmetricQrAlgorithm()
          Creates a new SymmetricQREigenvalue class that declares its own SymmetricQREigenHelper.
SymmetricQrAlgorithm(SymmetricQREigenHelper helper)
           
 
Method Summary
 double getEigenvalue(int index)
          Returns the eigenvalue at the specified index.
 int getNumberOfEigenvalues()
          Returns the number of eigenvalues available.
 DenseMatrix64F getQ()
           
 void performStep()
          First looks for zeros and then performs the implicit single step in the QR Algorithm.
 boolean process(int sideLength, double[] diag, double[] off)
           
 boolean process(int sideLength, double[] diag, double[] off, double[] eigenvalues)
          Computes the eigenvalue of the provided tridiagonal matrix.
 void setFastEigenvalues(boolean fastEigenvalues)
           
 void setMaxIterations(int maxIterations)
           
 void setQ(DenseMatrix64F q)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SymmetricQrAlgorithm

public SymmetricQrAlgorithm(SymmetricQREigenHelper helper)

SymmetricQrAlgorithm

public SymmetricQrAlgorithm()
Creates a new SymmetricQREigenvalue class that declares its own SymmetricQREigenHelper.

Method Detail

setMaxIterations

public void setMaxIterations(int maxIterations)

getQ

public DenseMatrix64F getQ()

setQ

public void setQ(DenseMatrix64F q)

setFastEigenvalues

public void setFastEigenvalues(boolean fastEigenvalues)

getEigenvalue

public double getEigenvalue(int index)
Returns the eigenvalue at the specified index.

Parameters:
index - Which eigenvalue.
Returns:
The eigenvalue.

getNumberOfEigenvalues

public int getNumberOfEigenvalues()
Returns the number of eigenvalues available.

Returns:
How many eigenvalues there are.

process

public boolean process(int sideLength,
                       double[] diag,
                       double[] off,
                       double[] eigenvalues)
Computes the eigenvalue of the provided tridiagonal matrix. Note that only the upper portion needs to be tridiagonal. The bottom diagonal is assumed to be the same as the top.

Parameters:
sideLength - Number of rows and columns in the input matrix.
diag - Diagonal elements from tridiagonal matrix. Modified.
off - Off diagonal elements from tridiagonal matrix. Modified.
Returns:
true if it succeeds and false if it fails.

process

public boolean process(int sideLength,
                       double[] diag,
                       double[] off)

performStep

public void performStep()
First looks for zeros and then performs the implicit single step in the QR Algorithm.



Copyright © 2012. All Rights Reserved.