Class EVD

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

public class EVD extends Object
Computes eigenvalue decompositions of general matrices
  • Constructor Details

    • 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 Details

    • 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