public final class UDDecompositionImpl extends Object implements UDDecomposition, Decomposition
The UD-decomposition of matrix A is a set of three matrices: U, D and Ut such that A = U×D×Ut. U is a upper triangular matrix and D is an diagonal matrix.
See Flavien Mercier (DCT/SB/OR)Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD
Default threshold below which diagonal elements are considered null and matrix not positive definite.
|
static double |
DEFAULT_RELATIVE_SYMMETRY_THRESHOLD
Default threshold above which off-diagonal elements are considered too different and matrix not symmetric.
|
Constructor and Description |
---|
UDDecompositionImpl()
Calling this constructor is equivalent to call
UDDecompositionImpl(RealMatrix, double, double) with the
thresholds set to the default values DEFAULT_RELATIVE_SYMMETRY_THRESHOLD and
DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD . |
UDDecompositionImpl(double relativeSymmetryThreshold,
double absolutePositivityThreshold)
Constructor used to set the relative & absolute thresholds.
|
UDDecompositionImpl(RealMatrix matrix)
Calling this constructor is equivalent to call
UDDecompositionImpl(RealMatrix, double, double) with the
thresholds set to the default values DEFAULT_RELATIVE_SYMMETRY_THRESHOLD and
DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD . |
UDDecompositionImpl(RealMatrix matrix,
double relativeSymmetryThreshold,
double absolutePositivityThreshold)
Constructor used to set the relative & absolute thresholds.
|
Modifier and Type | Method and Description |
---|---|
void |
checkDecompositionPerformed()
Check decomposition has been performed.
|
void |
decompose(RealMatrix matrix)
Run the decomposition process on the input matrix.
|
RealMatrix |
getD()
get the D matrix
|
double |
getDeterminant()
get the determinant
|
DecompositionSolver |
getSolver()
Get a solver of the linear equation A × X = B for matrices A.
|
RealMatrix |
getU()
Get the U matrix
|
RealMatrix |
getUT()
get the UT matrix
|
public static final double DEFAULT_RELATIVE_SYMMETRY_THRESHOLD
public static final double DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD
public UDDecompositionImpl()
UDDecompositionImpl(RealMatrix, double, double)
with the
thresholds set to the default values DEFAULT_RELATIVE_SYMMETRY_THRESHOLD
and
DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD
.
Once the decomposition object is built, the method decompose(RealMatrix)
needs to be called on the expected matrix to run the decomposition process before calling
any others methods. Otherwise the data won't be initialize.
public UDDecompositionImpl(double relativeSymmetryThreshold, double absolutePositivityThreshold)
Once the decomposition object is built, the method decompose(RealMatrix)
needs to be called on the expected matrix to run the decomposition process before calling
any others methods. Otherwise the data won't be initialize.
relativeSymmetryThreshold
- threshold above which off-diagonal elements are considered too different and matrix not symmetricabsolutePositivityThreshold
- threshold below which diagonal elements are considered null and matrix not positive definitepublic UDDecompositionImpl(RealMatrix matrix)
UDDecompositionImpl(RealMatrix, double, double)
with the
thresholds set to the default values DEFAULT_RELATIVE_SYMMETRY_THRESHOLD
and
DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD
.
The decomposition is directly computed on the input matrix. There is no need to run the method
decompose(RealMatrix)
separately.
matrix
- The matrix to decompose.UDDecompositionImpl(double, double)
,
DEFAULT_RELATIVE_SYMMETRY_THRESHOLD
,
DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD
public UDDecompositionImpl(RealMatrix matrix, double relativeSymmetryThreshold, double absolutePositivityThreshold)
The decomposition is directly computed on the input matrix. There is no need to run the method
decompose(RealMatrix)
separately.
matrix
- The matrix to decompose.relativeSymmetryThreshold
- threshold above which off-diagonal elements are considered too different and matrix not symmetricabsolutePositivityThreshold
- threshold below which diagonal elements are considered null and matrix not positive definitepublic void decompose(RealMatrix matrix)
Calculates the UD-decomposition of the given matrix.
decompose
in interface Decomposition
matrix
- The matrix to decompose.public RealMatrix getU()
getU
in interface UDDecomposition
public RealMatrix getD()
getD
in interface UDDecomposition
public RealMatrix getUT()
getUT
in interface UDDecomposition
public double getDeterminant()
getDeterminant
in interface UDDecomposition
public DecompositionSolver getSolver()
UDDecomposition
getSolver
in interface Decomposition
getSolver
in interface UDDecomposition
UDDecomposition.getSolver()
public void checkDecompositionPerformed()
ArithmeticException
- thrown if decomposition has not been performed yetCopyright © 2021 CNES. All rights reserved.