Package org.ojalgo.matrix.decomposition
Class DynamicEvD<N extends java.lang.Comparable<N>>
- java.lang.Object
-
- org.ojalgo.matrix.decomposition.AbstractDecomposition<N>
-
- org.ojalgo.matrix.decomposition.GenericDecomposition<N>
-
- org.ojalgo.matrix.decomposition.EigenvalueDecomposition<N>
-
- org.ojalgo.matrix.decomposition.DynamicEvD<N>
-
- All Implemented Interfaces:
Eigenvalue<N>
,MatrixDecomposition<N>
,MatrixDecomposition.Determinant<N>
,MatrixDecomposition.Hermitian<N>
,MatrixDecomposition.Ordered<N>
,MatrixDecomposition.Values<N>
,Provider2D
,Provider2D.Determinant<N>
,Provider2D.Eigenpairs
,DeterminantTask<N>
,MatrixTask<N>
,Structure1D
,Structure2D
- Direct Known Subclasses:
DynamicEvD.R064
abstract class DynamicEvD<N extends java.lang.Comparable<N>> extends EigenvalueDecomposition<N>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
DynamicEvD.R064
-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.decomposition.Eigenvalue
Eigenvalue.Eigenpair, Eigenvalue.Factory<N extends java.lang.Comparable<N>>, Eigenvalue.Generalisation, Eigenvalue.Generalised<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
MatrixDecomposition.Determinant<N extends java.lang.Comparable<N>>, MatrixDecomposition.EconomySize<N extends java.lang.Comparable<N>>, MatrixDecomposition.Factory<D extends MatrixDecomposition<?>>, MatrixDecomposition.Hermitian<N extends java.lang.Comparable<N>>, MatrixDecomposition.Ordered<N extends java.lang.Comparable<N>>, MatrixDecomposition.Pivoting<N extends java.lang.Comparable<N>>, MatrixDecomposition.RankRevealing<N extends java.lang.Comparable<N>>, MatrixDecomposition.Solver<N extends java.lang.Comparable<N>>, MatrixDecomposition.Values<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.matrix.Provider2D
Provider2D.Condition, Provider2D.Determinant<N extends java.lang.Comparable<N>>, Provider2D.Eigenpairs, Provider2D.Hermitian, Provider2D.Inverse<M>, Provider2D.Rank, Provider2D.Solution<M>, Provider2D.Symmetric, Provider2D.Trace<N extends java.lang.Comparable<N>>
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.LongIndex, Structure1D.LoopCallback
-
Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure2D
Structure2D.IntRowColumn, Structure2D.Logical<S extends Structure2D,B extends Structure2D.Logical<S,B>>, Structure2D.LongRowColumn, Structure2D.ReducibleTo1D<R extends Structure1D>, Structure2D.Reshapable, Structure2D.RowColumnKey<R,C>, Structure2D.RowColumnMapper<R,C>
-
-
Field Summary
Fields Modifier and Type Field Description private EigenvalueDecomposition<N>
myGeneralDelegate
private boolean
myHermitian
private EigenvalueDecomposition<N>
myHermitianDelegate
-
Fields inherited from interface org.ojalgo.matrix.decomposition.Eigenvalue
C128, DESCENDING_NORM, H256, Q128, R064, R128
-
Fields inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
TYPICAL
-
-
Constructor Summary
Constructors Modifier Constructor Description private
DynamicEvD(PhysicalStore.Factory<N,? extends DecompositionStore<N>> factory)
protected
DynamicEvD(PhysicalStore.Factory<N,? extends DecompositionStore<N>> factory, EigenvalueDecomposition<N> hermitianDelegate, EigenvalueDecomposition<N> generalDelegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkAndDecompose(MatrixStore<N> matrix)
Absolutely must check if the matrix is hermitian or not.protected boolean
doDecompose(Access2D.Collectable<N,? super PhysicalStore<N>> matrix, boolean valuesOnly)
N
getDeterminant()
A matrix' determinant is the product of its eigenvalues.ComplexNumber
getTrace()
A matrix' trace is the sum of the diagonal elements.boolean
isHermitian()
If [A] is hermitian then [V][D][V]-1 becomes [Q][D][Q]H...boolean
isOrdered()
The eigenvalues in D (and the eigenvectors in V) are not necessarily ordered.protected MatrixStore<N>
makeD()
protected Array1D<ComplexNumber>
makeEigenvalues()
protected MatrixStore<N>
makeV()
void
reset()
Delete computed results, and resets attributes to default values-
Methods inherited from class org.ojalgo.matrix.decomposition.EigenvalueDecomposition
calculateDeterminant, computeValuesOnly, decompose, getColDim, getD, getEigenvalues, getMaxDim, getMinDim, getRowDim, getV, setD, setEigenvalues, setV, sort
-
Methods inherited from class org.ojalgo.matrix.decomposition.GenericDecomposition
aggregator, allocate, collect, copy, function, makeArray, makeDiagonal, makeEye, makeHouseholder, makeIdentity, makeRotation, makeRotation, makeZero, makeZero, scalar, wrap
-
Methods inherited from class org.ojalgo.matrix.decomposition.AbstractDecomposition
checkSolvability, computed, countColumns, countRows, getDimensionalEpsilon, isAspectRatioNormal, isComputed, isSolvable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ojalgo.matrix.decomposition.Eigenvalue
getEigenpair, getEigenpairs, getEigenvalues, getEigenvectors, reconstruct
-
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition
isComputed
-
Methods inherited from interface org.ojalgo.matrix.decomposition.MatrixDecomposition.Determinant
toDeterminantProvider
-
Methods inherited from interface org.ojalgo.structure.Structure2D
count, countColumns, countRows, firstInColumn, firstInRow, isEmpty, isFat, isScalar, isSquare, isTall, isVector, limitOfColumn, limitOfRow, size
-
-
-
-
Field Detail
-
myGeneralDelegate
private final EigenvalueDecomposition<N extends java.lang.Comparable<N>> myGeneralDelegate
-
myHermitian
private boolean myHermitian
-
myHermitianDelegate
private final EigenvalueDecomposition<N extends java.lang.Comparable<N>> myHermitianDelegate
-
-
Constructor Detail
-
DynamicEvD
private DynamicEvD(PhysicalStore.Factory<N,? extends DecompositionStore<N>> factory)
-
DynamicEvD
protected DynamicEvD(PhysicalStore.Factory<N,? extends DecompositionStore<N>> factory, EigenvalueDecomposition<N> hermitianDelegate, EigenvalueDecomposition<N> generalDelegate)
-
-
Method Detail
-
checkAndDecompose
public boolean checkAndDecompose(MatrixStore<N> matrix)
Description copied from interface:MatrixDecomposition.Hermitian
Absolutely must check if the matrix is hermitian or not. Then, depending on the result different paths can be chosen - compute or not / choose different algorithms...- Parameters:
matrix
- A matrix to check and then (maybe) decompose- Returns:
- true if the hermitian check passed and decomposition succeeded; false if not
-
getDeterminant
public N getDeterminant()
Description copied from interface:MatrixDecomposition.Determinant
A matrix' determinant is the product of its eigenvalues.
- Returns:
- The matrix' determinant
-
getTrace
public ComplexNumber getTrace()
Description copied from interface:Eigenvalue
A matrix' trace is the sum of the diagonal elements. It is also the sum of the eigenvalues. This method should return the sum of the eigenvalues.- Returns:
- The matrix' trace
-
isHermitian
public boolean isHermitian()
Description copied from interface:Eigenvalue
If [A] is hermitian then [V][D][V]-1 becomes [Q][D][Q]H...
-
isOrdered
public boolean isOrdered()
Description copied from interface:Eigenvalue
The eigenvalues in D (and the eigenvectors in V) are not necessarily ordered. This is a property of the algorithm/implementation, not the data.- Returns:
- true if they are ordered
-
reset
public void reset()
Description copied from interface:MatrixDecomposition
Delete computed results, and resets attributes to default values- Specified by:
reset
in interfaceMatrixDecomposition<N extends java.lang.Comparable<N>>
- Overrides:
reset
in classEigenvalueDecomposition<N extends java.lang.Comparable<N>>
-
doDecompose
protected boolean doDecompose(Access2D.Collectable<N,? super PhysicalStore<N>> matrix, boolean valuesOnly)
- Specified by:
doDecompose
in classEigenvalueDecomposition<N extends java.lang.Comparable<N>>
-
makeD
protected MatrixStore<N> makeD()
- Specified by:
makeD
in classEigenvalueDecomposition<N extends java.lang.Comparable<N>>
-
makeEigenvalues
protected Array1D<ComplexNumber> makeEigenvalues()
- Specified by:
makeEigenvalues
in classEigenvalueDecomposition<N extends java.lang.Comparable<N>>
-
makeV
protected MatrixStore<N> makeV()
- Specified by:
makeV
in classEigenvalueDecomposition<N extends java.lang.Comparable<N>>
-
-