Class SymmetricQREigenHelper_DDRM

java.lang.Object
org.ejml.dense.row.decomposition.eig.symm.SymmetricQREigenHelper_DDRM

public class SymmetricQREigenHelper_DDRM extends Object
A helper class for the symmetric matrix implicit QR algorithm for eigenvalue decomposition. Performs most of the basic operations needed to extract eigenvalues and eigenvectors.
  • Field Details

    • rand

      protected Random rand
    • steps

      protected int steps
    • numExceptional

      protected int numExceptional
    • lastExceptional

      protected int lastExceptional
    • eigenSmall

      protected EigenvalueSmall_F64 eigenSmall
    • Q

      @Nullable protected @Nullable DMatrixRMaj Q
    • N

      protected int N
    • diag

      protected double[] diag
    • off

      protected double[] off
    • x1

      protected int x1
    • x2

      protected int x2
    • splits

      protected int[] splits
    • numSplits

      protected int numSplits
  • Constructor Details

    • SymmetricQREigenHelper_DDRM

      public SymmetricQREigenHelper_DDRM()
  • Method Details

    • printMatrix

      public void printMatrix()
    • setQ

      public void setQ(DMatrixRMaj 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.
    • isZero

      protected boolean isZero(int index)
      Checks to see if the specified off diagonal element is zero using a relative metric.
    • performImplicitSingleStep

      protected void performImplicitSingleStep(double lambda, boolean byAngle)
    • updateQ

      protected void updateQ(int m, int n, double c, double s)
    • createBulge

      protected void createBulge(int x1, double p, boolean byAngle)
      Performs a similar transform on A-pI
    • createBulge2by2

      protected void createBulge2by2(int x1, double p, boolean byAngle)
    • removeBulge

      protected void removeBulge(int x1)
    • removeBulgeEnd

      protected void removeBulgeEnd(int x1)
      Rotator to remove the bulge
    • eigenvalue2by2

      protected void eigenvalue2by2(int x1)
      Computes the eigenvalue of the 2 by 2 matrix.
    • 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()