public class ComplexEigenDecomposition extends Object
Complex Eigen Decomposition differs from the EigenDecomposition
since it
computes the eigen vectors as complex eigen vectors (if applicable).
Beware that in the complex case, you do not always have \(V \times V^{T} = I\) or even a diagonal matrix, even if the eigenvectors that form the columns of the V matrix are independent. On example is the square matrix \[ A = \left(\begin{matrix} 3 & -2\\ 4 & -1 \end{matrix}\right) \] which has two conjugate eigenvalues \(\lambda_1=1+2i\) and \(\lambda_2=1-2i\) with associated eigenvectors \(v_1^T = (1, 1-i)\) and \(v_2^T = (1, 1+i)\). \[ V\timesV^T = \left(\begin{matrix} 2 & 2\\ 2 & 0 \end{matrix}\right) \] which is not the identity matrix. Therefore, despite \(A \times V = V \times D\), \(A \ne V \times D \time V^T\), which would hold for real eigendecomposition.
Compute complex eigen values from the Schur transform. Compute complex eigen vectors based on eigen values and the inverse iteration method. see: https://en.wikipedia.org/wiki/Inverse_iteration https://en.wikiversity.org/wiki/Shifted_inverse_iteration http://www.robots.ox.ac.uk/~sjrob/Teaching/EngComp/ecl4.pdf http://www.math.ohiou.edu/courses/math3600/lecture16.pdfModifier and Type | Field and Description |
---|---|
static double |
DEFAULT_EIGENVECTORS_EQUALITY
Default threshold below which eigenvectors are considered equal.
|
static double |
DEFAULT_EPSILON
Default value to use for internal epsilon.
|
static double |
DEFAULT_EPSILON_AV_VD_CHECK
Internally used epsilon criteria for final AV=VD check.
|
Constructor and Description |
---|
ComplexEigenDecomposition(RealMatrix matrix)
Constructor for decomposition.
|
ComplexEigenDecomposition(RealMatrix matrix,
double eigenVectorsEquality,
double epsilon,
double epsilonAVVDCheck)
Constructor for decomposition.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkDefinition(RealMatrix matrix)
Check definition of the decomposition in runtime.
|
protected void |
findEigenValues(RealMatrix matrix)
Compute eigen values using the Schur transform.
|
protected void |
findEigenVectors(FieldMatrix<Complex> matrix)
Compute the eigen vectors using the inverse power method.
|
FieldMatrix<Complex> |
getD()
Getter D.
|
double |
getDeterminant()
Computes the determinant.
|
Complex[] |
getEigenvalues()
Getter of the eigen values.
|
FieldVector<Complex> |
getEigenvector(int i)
Getter of the eigen vectors.
|
FieldMatrix<Complex> |
getV()
Getter V.
|
FieldMatrix<Complex> |
getVT()
Getter VT.
|
boolean |
hasComplexEigenvalues()
Confirm if there are complex eigen values.
|
public static final double DEFAULT_EIGENVECTORS_EQUALITY
public static final double DEFAULT_EPSILON
public static final double DEFAULT_EPSILON_AV_VD_CHECK
public ComplexEigenDecomposition(RealMatrix matrix)
This constructor uses the default values DEFAULT_EIGENVECTORS_EQUALITY
,
DEFAULT_EPSILON
and DEFAULT_EPSILON_AV_VD_CHECK
matrix
- real matrix.public ComplexEigenDecomposition(RealMatrix matrix, double eigenVectorsEquality, double epsilon, double epsilonAVVDCheck)
The eigenVectorsEquality
threshold is used to ensure the L∞-normalized
eigenvectors found using inverse iteration are different from each other.
if \(min(|e_i-e_j|,|e_i+e_j|)\) is smaller than this threshold, the algorithm
considers it has found again an already known vector, so it drops it and attempts
a new inverse iteration with a different start vector. This value should be
much larger than epsilon
which is used for convergence
matrix
- real matrix.eigenVectorsEquality
- threshold below which eigenvectors are considered equalepsilon
- Epsilon used for internal tests (e.g. is singular, eigenvalue ratio, etc.)epsilonAVVDCheck
- Epsilon criteria for final AV=VD checkpublic Complex[] getEigenvalues()
public FieldVector<Complex> getEigenvector(int i)
i
- which eigen vector.public boolean hasComplexEigenvalues()
public double getDeterminant()
public FieldMatrix<Complex> getV()
public FieldMatrix<Complex> getD()
public FieldMatrix<Complex> getVT()
protected void findEigenValues(RealMatrix matrix)
matrix
- real matrix to compute eigen values.protected void findEigenVectors(FieldMatrix<Complex> matrix)
matrix
- real matrix to compute eigen vectors.protected void checkDefinition(RealMatrix matrix)
matrix
- matrix to be decomposed.Copyright © 2016–2020 Hipparchus.org. All rights reserved.