Class Eigen

java.lang.Object
com.flag4j.linalg.Eigen

public class Eigen extends Object
This class provides several methods useful for computing eigen values, eigen vectors, as well as singular values and singular vectors.
  • Constructor Details

    • Eigen

      public Eigen()
  • Method Details

    • get2x2EigenValues

      public static CVector get2x2EigenValues(Matrix src)
      Computes the eigenvalues of a 2x2 matrix explicitly.
      Parameters:
      src - The 2x2 matrix to compute the eigenvalues of.
      Returns:
      A complex vector containing the eigenvalues of the 2x2 src matrix.
    • get2x2EigenValues

      public static CVector get2x2EigenValues(CMatrix src)
      Computes the eigenvalues of a 2x2 matrix explicitly.
      Parameters:
      src - The 2x2 matrix to compute the eigenvalues of.
      Returns:
      A complex vector containing the eigenvalues of the 2x2 src matrix.
    • get2x2LowerRightBlockEigenValues

      public static CVector get2x2LowerRightBlockEigenValues(CMatrix src)
      Computes the eigenvalues for the lower right 2x2 block matrix of a larger matrix.
      Parameters:
      src - Source matrix to compute eigenvalues of lower right 2x2 block.
      Returns:
      A vector of length 2 containing the eigenvalues of the lower right 2x2 block of src.
    • get2x2LowerRightBlockEigenValues

      public static CVector get2x2LowerRightBlockEigenValues(Matrix src)
      Computes the eigenvalues for the lower right 2x2 block matrix of a larger matrix.
      Parameters:
      src - Source matrix to compute eigenvalues of lower right 2x2 block.
      Returns:
      A vector of length 2 containing the eigenvalues of the lower right 2x2 block of src.
    • getEigenValues

      public static CVector getEigenValues(Matrix src)
      Computes the eigenvalues of a square real dense matrix.
      Parameters:
      src - The matrix to compute the eigenvalues of.
      Returns:
      The eigenvalues of the src matrix.
    • getEigenValues

      public static CVector getEigenValues(CMatrix src)
      Computes the eigenvalues of a square complex dense matrix.
      Parameters:
      src - The matrix to compute the eigenvalues of.
      Returns:
      The eigenvalues of the src matrix.
    • getEigenVectors

      public static CMatrix getEigenVectors(Matrix src)
      Computes the eigenvectors of a square real dense matrix.
      Parameters:
      src - The matrix to compute the eigenvectors of.
      Returns:
      A matrix containing the eigenvectors of src as its columns.
    • getEigenVectors

      public static CMatrix getEigenVectors(CMatrix src)
      Computes the eigenvectors of a square complex dense matrix.
      Parameters:
      src - The matrix to compute the eigenvectors of.
      Returns:
      A matrix containing the eigenvectors of src as its columns.
    • getEigenVectorsTriu

      public static CMatrix getEigenVectorsTriu(Matrix T)
      Computes the eigenvectors of an upper triangular matrix.
      Parameters:
      T - The upper triangular matrix to compute the eigenvectors of.
      Returns:
      A matrix containing the eigenvectors of T as its columns.
    • getEigenVectorsTriu

      public static CMatrix getEigenVectorsTriu(CMatrix T)
      Computes the eigenvectors of an upper triangular matrix.
      Parameters:
      T - The upper triangular matrix to compute the eigenvectors of.
      Returns:
      A matrix containing the eigenvectors of T as its columns.
    • getEigenPairs

      public static CMatrix[] getEigenPairs(Matrix src)
      Computes the eigenvalues and eigenvectors of a square real matrix.
      Parameters:
      src - The matrix to compute the eigenvalues and vectors of.
      Returns:
      An array containing two matrices. The first matrix has shape 1xsrc.numCols and contains the eigenvalues of the src matrix. The second matrix has shape src.numRowsxsrc.numCols and contains the eigenvectors of the src matrix as its columns.
    • getEigenPairs

      public static CMatrix[] getEigenPairs(CMatrix src)
      Computes the eigenvalues and eigenvectors of a square real matrix.
      Parameters:
      src - The matrix to compute the eigenvalues and vectors of.
      Returns:
      An array containing two matrices. The first matrix has shape 1xsrc.numCols and contains the eigenvalues of the src matrix. The second matrix has shape src.numRowsxsrc.numCols and contains the eigenvectors of the src matrix as its columns.