org.ejml.alg.dense.decomposition.eig.symm
Class SymmetricQREigenHelper
- java.lang.Object
-
- org.ejml.alg.dense.decomposition.eig.symm.SymmetricQREigenHelper
-
public class SymmetricQREigenHelper extends java.lang.ObjectA helper class for the symmetric matrix implicit QR algorithm for eigenvalue decomposition. Performs most of the basic operations needed to extract eigenvalues and eigenvectors.
-
-
Constructor Summary
Constructors Constructor and Description SymmetricQREigenHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecomputeShift()doublecomputeWilkinsonShift()double[]copyDiag(double[] ret)double[]copyEigenvalues(double[] ret)double[]copyOff(double[] ret)voidexceptionalShift()Perform a shift in a random direction that is of the same magnitude as the elements in the matrix.intgetMatrixSize()voidincrementSteps()voidinit(double[] diag, double[] off, int numCols)Sets up and declares internal data structures.booleannextSplit()Tells it to process the submatrix at the next split.voidprintMatrix()voidreset(int N)Sets the size of the matrix being decomposed, declares new memory if needed, and sets all helper functions to their initial value.voidresetSteps()voidsetQ(DenseMatrix64F q)voidsetSubmatrix(int x1, int x2)Sets which submatrix is being processed.double[]swapDiag(double[] diag)Exchanges the internal array of the diagonal elements for the provided one.double[]swapOff(double[] off)Exchanges the internal array of the off diagonal elements for the provided one.
-
-
-
Method Detail
-
printMatrix
public void printMatrix()
-
setQ
public void setQ(DenseMatrix64F q)
-
incrementSteps
public void incrementSteps()
-
init
public void init(double[] diag, double[] off, int numCols)Sets up and declares internal data structures.- Parameters:
diag- Diagonal elements from tridiagonal matrix. Modified.off- Off diagonal elements from tridiagonal matrix. Modified.numCols- number of columns (and rows) in the matrix.
-
swapDiag
public double[] swapDiag(double[] diag)
Exchanges the internal array of the diagonal elements for the provided one.
-
swapOff
public double[] swapOff(double[] off)
Exchanges the internal array of the off diagonal elements for the provided one.
-
reset
public void reset(int N)
Sets the size of the matrix being decomposed, declares new memory if needed, and sets all helper functions to their initial value.
-
copyDiag
public double[] copyDiag(double[] ret)
-
copyOff
public double[] copyOff(double[] ret)
-
copyEigenvalues
public double[] copyEigenvalues(double[] ret)
-
setSubmatrix
public void setSubmatrix(int x1, int x2)Sets which submatrix is being processed.- Parameters:
x1- Lower bound, inclusive.x2- Upper bound, inclusive.
-
exceptionalShift
public void exceptionalShift()
Perform a shift in a random direction that is of the same magnitude as the elements in the matrix.
-
nextSplit
public boolean nextSplit()
Tells it to process the submatrix at the next split. Should be called after the current submatrix has been processed.
-
computeShift
public double computeShift()
-
computeWilkinsonShift
public double computeWilkinsonShift()
-
getMatrixSize
public int getMatrixSize()
-
resetSteps
public void resetSteps()
-
-
DMelt 3.0 © DataMelt by jWork.ORG