Class Eigen
java.lang.Object
org.jblas.Eigen
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComplexDoubleMatrixComputes the eigenvalues of a general matrix.static ComplexFloatMatrixComputes the eigenvalues of a general matrix.static ComplexDoubleMatrix[]Computes the eigenvalues and eigenvectors of a general matrix.static ComplexFloatMatrix[]Computes the eigenvalues and eigenvectors of a general matrix.static DoubleMatrixCompute the eigenvalues for a symmetric matrix.static FloatMatrixCompute the eigenvalues for a symmetric matrix.static DoubleMatrix[]Computes the eigenvalues and eigenvectors for a symmetric matrix.static FloatMatrix[]Computes the eigenvalues and eigenvectors for a symmetric matrix.static DoubleMatrixCompute generalized eigenvalues of the problem A x = L B x.static DoubleMatrixsymmetricGeneralizedEigenvalues(DoubleMatrix A, DoubleMatrix B, double vl, double vu) Computes selected eigenvalues of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0.static DoubleMatrixsymmetricGeneralizedEigenvalues(DoubleMatrix A, DoubleMatrix B, int il, int iu) Computes selected eigenvalues of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0.static FloatMatrixCompute generalized eigenvalues of the problem A x = L B x.static FloatMatrixsymmetricGeneralizedEigenvalues(FloatMatrix A, FloatMatrix B, float vl, float vu) Computes selected eigenvalues of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0.static FloatMatrixsymmetricGeneralizedEigenvalues(FloatMatrix A, FloatMatrix B, int il, int iu) Computes selected eigenvalues of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0.static DoubleMatrix[]Solve a general problem A x = L B x.static DoubleMatrix[]symmetricGeneralizedEigenvectors(DoubleMatrix A, DoubleMatrix B, double vl, double vu) Computes selected eigenvalues and their corresponding eigenvectors of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0.static DoubleMatrix[]symmetricGeneralizedEigenvectors(DoubleMatrix A, DoubleMatrix B, int il, int iu) Computes selected eigenvalues and their corresponding eigenvectors of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0.static FloatMatrix[]Solve a general problem A x = L B x.static FloatMatrix[]symmetricGeneralizedEigenvectors(FloatMatrix A, FloatMatrix B, float vl, float vu) Computes selected eigenvalues and their corresponding eigenvectors of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0.static FloatMatrix[]symmetricGeneralizedEigenvectors(FloatMatrix A, FloatMatrix B, int il, int iu) Computes selected eigenvalues and their corresponding eigenvectors of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0.
-
Constructor Details
-
Eigen
public Eigen()
-
-
Method Details
-
symmetricEigenvalues
Compute the eigenvalues for a symmetric matrix. -
symmetricEigenvectors
Computes the eigenvalues and eigenvectors for a symmetric matrix.- Returns:
- an array of DoubleMatrix objects containing the eigenvectors stored as the columns of the first matrix, and the eigenvalues as diagonal elements of the second matrix.
-
eigenvalues
Computes the eigenvalues of a general matrix. -
eigenvectors
Computes the eigenvalues and eigenvectors of a general matrix.- Returns:
- an array of ComplexDoubleMatrix objects containing the eigenvectors stored as the columns of the first matrix, and the eigenvalues as the diagonal elements of the second matrix.
-
symmetricGeneralizedEigenvalues
Compute generalized eigenvalues of the problem A x = L B x.- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.- Returns:
- a vector of eigenvalues L.
-
symmetricGeneralizedEigenvectors
Solve a general problem A x = L B x.- Parameters:
A- symmetric matrix AB- symmetric matrix B- Returns:
- an array of matrices of length two. The first one is an array of the eigenvectors X The second one is A vector containing the corresponding eigenvalues L.
-
symmetricGeneralizedEigenvalues
public static DoubleMatrix symmetricGeneralizedEigenvalues(DoubleMatrix A, DoubleMatrix B, double vl, double vu) Computes selected eigenvalues of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric and B is also positive definite. The selection is based on the given range of values for the desired eigenvalues.The range is half open: (vl,vu].
- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.vl- lower bound of the smallest eigenvalue to returnvu- upper bound of the largest eigenvalue to return- Returns:
- a vector of eigenvalues L
- Throws:
IllegalArgumentException- ifvl > vuNoEigenResultException- if no eigevalues are found for the selected range: (vl,vu]
-
symmetricGeneralizedEigenvalues
public static DoubleMatrix symmetricGeneralizedEigenvalues(DoubleMatrix A, DoubleMatrix B, int il, int iu) Computes selected eigenvalues of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric and B is also positive definite. The selection is based on the given range of indices for the desired eigenvalues.- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.il- lower index (in ascending order) of the smallest eigenvalue to return (index is 0-based)iu- upper index (in ascending order) of the largest eigenvalue to return (index is 0-based)- Returns:
- a vector of eigenvalues L
- Throws:
IllegalArgumentException- ifil > iuoril < 0oriu > A.rows - 1
-
symmetricGeneralizedEigenvectors
public static DoubleMatrix[] symmetricGeneralizedEigenvectors(DoubleMatrix A, DoubleMatrix B, double vl, double vu) Computes selected eigenvalues and their corresponding eigenvectors of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric and B is also positive definite. The selection is based on the given range of values for the desired eigenvalues. The range is half open: (vl,vu].- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.vl- lower bound of the smallest eigenvalue to returnvu- upper bound of the largest eigenvalue to return- Returns:
- an array of matrices of length two. The first one is an array of the eigenvectors x. The second one is a vector containing the corresponding eigenvalues L.
- Throws:
IllegalArgumentException- ifvl > vuNoEigenResultException- if no eigevalues are found for the selected range: (vl,vu]
-
symmetricGeneralizedEigenvectors
public static DoubleMatrix[] symmetricGeneralizedEigenvectors(DoubleMatrix A, DoubleMatrix B, int il, int iu) Computes selected eigenvalues and their corresponding eigenvectors of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric and B is also positive definite. The selection is based on the given range of values for the desired eigenvalues.- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.il- lower index (in ascending order) of the smallest eigenvalue to return (index is 0-based)iu- upper index (in ascending order) of the largest eigenvalue to return (index is 0-based)- Returns:
- an array of matrices of length two. The first one is an array of the eigenvectors x. The second one is a vector containing the corresponding eigenvalues L.
- Throws:
IllegalArgumentException- ifil > iuoril < 0oriu > A.rows - 1
-
symmetricEigenvalues
Compute the eigenvalues for a symmetric matrix. -
symmetricEigenvectors
Computes the eigenvalues and eigenvectors for a symmetric matrix.- Returns:
- an array of FloatMatrix objects containing the eigenvectors stored as the columns of the first matrix, and the eigenvalues as diagonal elements of the second matrix.
-
eigenvalues
Computes the eigenvalues of a general matrix. -
eigenvectors
Computes the eigenvalues and eigenvectors of a general matrix.- Returns:
- an array of ComplexFloatMatrix objects containing the eigenvectors stored as the columns of the first matrix, and the eigenvalues as the diagonal elements of the second matrix.
-
symmetricGeneralizedEigenvalues
Compute generalized eigenvalues of the problem A x = L B x.- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.- Returns:
- a vector of eigenvalues L.
-
symmetricGeneralizedEigenvectors
Solve a general problem A x = L B x.- Parameters:
A- symmetric matrix AB- symmetric matrix B- Returns:
- an array of matrices of length two. The first one is an array of the eigenvectors X The second one is A vector containing the corresponding eigenvalues L.
-
symmetricGeneralizedEigenvalues
public static FloatMatrix symmetricGeneralizedEigenvalues(FloatMatrix A, FloatMatrix B, float vl, float vu) Computes selected eigenvalues of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric and B is also positive definite. The selection is based on the given range of values for the desired eigenvalues.The range is half open: (vl,vu].
- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.vl- lower bound of the smallest eigenvalue to returnvu- upper bound of the largest eigenvalue to return- Returns:
- a vector of eigenvalues L
- Throws:
IllegalArgumentException- ifvl > vuNoEigenResultException- if no eigevalues are found for the selected range: (vl,vu]
-
symmetricGeneralizedEigenvalues
public static FloatMatrix symmetricGeneralizedEigenvalues(FloatMatrix A, FloatMatrix B, int il, int iu) Computes selected eigenvalues of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric and B is also positive definite. The selection is based on the given range of indices for the desired eigenvalues.- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.il- lower index (in ascending order) of the smallest eigenvalue to return (index is 0-based)iu- upper index (in ascending order) of the largest eigenvalue to return (index is 0-based)- Returns:
- a vector of eigenvalues L
- Throws:
IllegalArgumentException- ifil > iuoril < 0oriu > A.rows - 1
-
symmetricGeneralizedEigenvectors
public static FloatMatrix[] symmetricGeneralizedEigenvectors(FloatMatrix A, FloatMatrix B, float vl, float vu) Computes selected eigenvalues and their corresponding eigenvectors of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric and B is also positive definite. The selection is based on the given range of values for the desired eigenvalues. The range is half open: (vl,vu].- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.vl- lower bound of the smallest eigenvalue to returnvu- upper bound of the largest eigenvalue to return- Returns:
- an array of matrices of length two. The first one is an array of the eigenvectors x. The second one is a vector containing the corresponding eigenvalues L.
- Throws:
IllegalArgumentException- ifvl > vuNoEigenResultException- if no eigevalues are found for the selected range: (vl,vu]
-
symmetricGeneralizedEigenvectors
public static FloatMatrix[] symmetricGeneralizedEigenvectors(FloatMatrix A, FloatMatrix B, int il, int iu) Computes selected eigenvalues and their corresponding eigenvectors of the real generalized symmetric-definite eigenproblem of the form A x = L B x or, equivalently, (A - L B)x = 0. Here A and B are assumed to be symmetric and B is also positive definite. The selection is based on the given range of values for the desired eigenvalues.- Parameters:
A- symmetric Matrix A. Only the upper triangle will be considered.B- symmetric Matrix B. Only the upper triangle will be considered.il- lower index (in ascending order) of the smallest eigenvalue to return (index is 0-based)iu- upper index (in ascending order) of the largest eigenvalue to return (index is 0-based)- Returns:
- an array of matrices of length two. The first one is an array of the eigenvectors x. The second one is a vector containing the corresponding eigenvalues L.
- Throws:
IllegalArgumentException- ifil > iuoril < 0oriu > A.rows - 1
-