Class SwitchingEigenDecomposition_FDRM
java.lang.Object
org.ejml.dense.row.decomposition.eig.SwitchingEigenDecomposition_FDRM
- All Implemented Interfaces:
DecompositionInterface<FMatrixRMaj>
,EigenDecomposition<FMatrixRMaj>
,EigenDecomposition_F32<FMatrixRMaj>
@Generated("org.ejml.dense.row.decomposition.eig.SwitchingEigenDecomposition_DDRM")
public class SwitchingEigenDecomposition_FDRM
extends Object
implements EigenDecomposition_F32<FMatrixRMaj>
Checks to see what type of matrix is being decomposed and calls different eigenvalue decomposition
algorithms depending on the results. This primarily checks to see if the matrix is symmetric or not.
-
Constructor Summary
ConstructorDescriptionSwitchingEigenDecomposition_FDRM
(int matrixSize) SwitchingEigenDecomposition_FDRM
(int matrixSize, boolean computeVectors, float tol) SwitchingEigenDecomposition_FDRM
(EigenDecomposition_F32<FMatrixRMaj> symmetricAlg, EigenDecomposition_F32<FMatrixRMaj> generalAlg, float tol) -
Method Summary
Modifier and TypeMethodDescriptionboolean
decompose
(FMatrixRMaj orig) Computes the decomposition of the input matrix.getEigenvalue
(int index) Returns an eigenvalue as a complex number.getEigenVector
(int index) Used to retrieve real valued eigenvectors.int
Returns the number of eigenvalues/eigenvectors.boolean
Checks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)
is modified during the decomposition process.
-
Constructor Details
-
SwitchingEigenDecomposition_FDRM
public SwitchingEigenDecomposition_FDRM(int matrixSize, boolean computeVectors, float tol) - Parameters:
tol
- Tolerance for a matrix being symmetric
-
SwitchingEigenDecomposition_FDRM
public SwitchingEigenDecomposition_FDRM(EigenDecomposition_F32<FMatrixRMaj> symmetricAlg, EigenDecomposition_F32<FMatrixRMaj> generalAlg, float tol) -
SwitchingEigenDecomposition_FDRM
public SwitchingEigenDecomposition_FDRM(int matrixSize)
-
-
Method Details
-
getNumberOfEigenvalues
public int getNumberOfEigenvalues()Description copied from interface:EigenDecomposition
Returns the number of eigenvalues/eigenvectors. This is the matrix's dimension.- Specified by:
getNumberOfEigenvalues
in interfaceEigenDecomposition<FMatrixRMaj>
- Returns:
- number of eigenvalues/eigenvectors.
-
getEigenvalue
Description copied from interface:EigenDecomposition_F32
Returns an eigenvalue as a complex number. For symmetric matrices the returned eigenvalue will always be a real number, which means the imaginary component will be equal to zero.
NOTE: The order of the eigenvalues is dependent upon the decomposition algorithm used. This means that they may or may not be ordered by magnitude. For example the QR algorithm will returns results that are partially ordered by magnitude, but this behavior should not be relied upon.
- Specified by:
getEigenvalue
in interfaceEigenDecomposition_F32<FMatrixRMaj>
- Parameters:
index
- Index of the eigenvalue eigenvector pair.- Returns:
- An eigenvalue.
-
getEigenVector
Description copied from interface:EigenDecomposition
Used to retrieve real valued eigenvectors. If an eigenvector is associated with a complex eigenvalue then null is returned instead.
- Specified by:
getEigenVector
in interfaceEigenDecomposition<FMatrixRMaj>
- Parameters:
index
- Index of the eigenvalue eigenvector pair.- Returns:
- If the associated eigenvalue is real then an eigenvector is returned, null otherwise.
-
decompose
Description copied from interface:DecompositionInterface
Computes the decomposition of the input matrix. Depending on the implementation the input matrix might be stored internally or modified. If it is modified then the functionDecompositionInterface.inputModified()
will return true and the matrix should not be modified until the decomposition is no longer needed.- Specified by:
decompose
in interfaceDecompositionInterface<FMatrixRMaj>
- Parameters:
orig
- The matrix which is being decomposed. Modification is implementation dependent.- Returns:
- Returns if it was able to decompose the matrix.
-
inputModified
public boolean inputModified()Description copied from interface:DecompositionInterface
Checks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)
is modified during the decomposition process.- Specified by:
inputModified
in interfaceDecompositionInterface<FMatrixRMaj>
- Returns:
- true if the input matrix to decompose() is modified.
-