Package com.flag4j.linalg
Class Eigen
java.lang.Object
com.flag4j.linalg.Eigen
This class provides several methods useful for computing eigen values, eigen vectors, as well as singular values and
singular vectors.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CVector
get2x2EigenValues(CMatrix src)
Computes the eigenvalues of a 2x2 matrix explicitly.static CVector
get2x2EigenValues(Matrix src)
Computes the eigenvalues of a 2x2 matrix explicitly.static CVector
Computes the eigenvalues for the lower right 2x2 block matrix of a larger matrix.static CVector
Computes the eigenvalues for the lower right 2x2 block matrix of a larger matrix.static CMatrix[]
getEigenPairs(CMatrix src)
Computes the eigenvalues and eigenvectors of a square real matrix.static CMatrix[]
getEigenPairs(Matrix src)
Computes the eigenvalues and eigenvectors of a square real matrix.static CVector
getEigenValues(CMatrix src)
Computes the eigenvalues of a square complex dense matrix.static CVector
getEigenValues(Matrix src)
Computes the eigenvalues of a square real dense matrix.static CMatrix
getEigenVectors(CMatrix src)
Computes the eigenvectors of a square complex dense matrix.static CMatrix
getEigenVectors(Matrix src)
Computes the eigenvectors of a square real dense matrix.static CMatrix
Computes the eigenvectors of an upper triangular matrix.static CMatrix
Computes the eigenvectors of an upper triangular matrix.
-
Constructor Details
-
Eigen
public Eigen()
-
-
Method Details
-
get2x2EigenValues
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
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
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
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
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
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
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
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
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
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
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 thesrc
matrix. The second matrix has shapesrc.numRowsxsrc.numCols
and contains the eigenvectors of thesrc
matrix as its columns.
-
getEigenPairs
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 thesrc
matrix. The second matrix has shapesrc.numRowsxsrc.numCols
and contains the eigenvectors of thesrc
matrix as its columns.
-