Package org.hipparchus.linear
Class ComplexEigenDecomposition
- java.lang.Object
-
- org.hipparchus.linear.ComplexEigenDecomposition
-
- Direct Known Subclasses:
OrderedComplexEigenDecomposition
public class ComplexEigenDecomposition extends Object
Given a matrix A, it computes a complex eigen decomposition A = VDV^{T}. It checks the definition in runtime using AV = VD. Complex Eigen Decomposition, it differs from the EigenDecomposition since it computes the eigen vectors as complex eigen vectors (if applicable). 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.pdf
-
-
Constructor Summary
Constructors Constructor Description ComplexEigenDecomposition(RealMatrix matrix)
Constructor for decomposition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
ComplexEigenDecomposition
public ComplexEigenDecomposition(RealMatrix matrix)
Constructor for decomposition.- Parameters:
matrix
- real matrix.
-
-
Method Detail
-
getEigenvalues
public Complex[] getEigenvalues()
Getter of the eigen values.- Returns:
- igen values.
-
getEigenvector
public FieldVector<Complex> getEigenvector(int i)
Getter of the eigen vectors.- Parameters:
i
- which eigen vector.- Returns:
- eigen vector.
-
hasComplexEigenvalues
public boolean hasComplexEigenvalues()
Confirm if there are complex eigen values.- Returns:
- true if there are complex eigen values.
-
getDeterminant
public double getDeterminant()
Computes the determinant.- Returns:
- the determinant.
-
getV
public FieldMatrix<Complex> getV()
Getter V.- Returns:
- V.
-
getD
public FieldMatrix<Complex> getD()
Getter D.- Returns:
- D.
-
getVT
public FieldMatrix<Complex> getVT()
Getter VT.- Returns:
- VT.
-
findEigenValues
protected void findEigenValues(RealMatrix matrix)
Compute eigen values using the Schur transform.- Parameters:
matrix
- real matrix to compute eigen values.
-
findEigenVectors
protected void findEigenVectors(FieldMatrix<Complex> matrix)
Compute the eigen vectors using the inverse power method.- Parameters:
matrix
- real matrix to compute eigen vectors.
-
checkDefinition
protected void checkDefinition(RealMatrix matrix)
Check definition of the decomposition in runtime.- Parameters:
matrix
- matrix to be decomposed.
-
-