Class EigenDecomposition
- java.lang.Object
-
- dev.nm.algebra.linear.matrix.doubles.factorization.eigen.EigenDecomposition
-
public class EigenDecomposition extends Object
Let A be a square, diagonalizable N × N matrix with N linearly independent eigenvectors. Then A can be factorized as Q * D * Q' = A. Q is the square N × N matrix whose i-th column is the eigenvector of A, and D is the diagonal matrix whose diagonal elements are the corresponding eigenvalues.
-
-
Constructor Summary
Constructors Constructor Description EigenDecomposition(Matrix A)
Runs the eigen decomposition on a square matrix.EigenDecomposition(Matrix A, double epsilon)
Runs the eigen decomposition on a square matrix.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DiagonalMatrix
D()
Get the diagonal matrix D as in Q * D * Q' = A.Matrix
Q()
Get Q as in Q * D * Q' = A.Matrix
Qt()
Get Q' as in Q * D * Q' = A.
-
-
-
Constructor Detail
-
EigenDecomposition
public EigenDecomposition(Matrix A)
Runs the eigen decomposition on a square matrix.- Parameters:
A
- a square, diagonalizable matrix
-
EigenDecomposition
public EigenDecomposition(Matrix A, double epsilon)
Runs the eigen decomposition on a square matrix.- Parameters:
A
- a square, diagonalizable matrixepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0
-
-
Method Detail
-
D
public DiagonalMatrix D()
Get the diagonal matrix D as in Q * D * Q' = A. Note that for the moment we support only real eigenvalues.- Returns:
- D
-
Q
public Matrix Q()
Get Q as in Q * D * Q' = A. Note that for the moment we support only real eigenvalues.- Returns:
- Q
-
Qt
public Matrix Qt()
Get Q' as in Q * D * Q' = A. Note that for the moment we support only real eigenvalues.- Returns:
Q.t()
-
-