org.apache.commons.math3.linear
Class UDDecompositionImpl

java.lang.Object
  extended by org.apache.commons.math3.linear.UDDecompositionImpl
All Implemented Interfaces:
UDDecomposition

public final class UDDecompositionImpl
extends Object
implements UDDecomposition

Calculates the UD decomposition of a matrix.

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)

Since:
1.0
Version:
$Id: UDDecompositionImpl.java 17583 2017-05-10 13:05:10Z bignon $
Author:
Denis Claude, Julie Anton
Concurrency :
immutable

Field Summary
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 Summary
UDDecompositionImpl(RealMatrix matrix)
          Compute the UD decomposition of the given matrix.
UDDecompositionImpl(RealMatrix inMatrix, double relativeSymmetryThreshold, double absolutePositivityThreshold)
          Compute the UD decomposition of the given matrix.
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RELATIVE_SYMMETRY_THRESHOLD

public static final double DEFAULT_RELATIVE_SYMMETRY_THRESHOLD
Default threshold above which off-diagonal elements are considered too different and matrix not symmetric.

See Also:
Constant Field Values

DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD

public static final double DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD
Default threshold below which diagonal elements are considered null and matrix not positive definite.

See Also:
Constant Field Values
Constructor Detail

UDDecompositionImpl

public UDDecompositionImpl(RealMatrix matrix)
Compute the UD decomposition of the given 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

Parameters:
matrix - the matrix to decompose
Since:
1.0
See Also:
UDDecompositionImpl(RealMatrix, double, double), DEFAULT_RELATIVE_SYMMETRY_THRESHOLD, DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD

UDDecompositionImpl

public UDDecompositionImpl(RealMatrix inMatrix,
                           double relativeSymmetryThreshold,
                           double absolutePositivityThreshold)
Compute the UD decomposition of the given matrix.

Parameters:
inMatrix - the matrix to decompose
relativeSymmetryThreshold - threshold above which off-diagonal elements are considered too different and matrix not symmetric
absolutePositivityThreshold - threshold below which diagonal elements are considered null and matrix not positive definite *
Since:
1.0
See Also:
DEFAULT_RELATIVE_SYMMETRY_THRESHOLD, *
Method Detail

getU

public RealMatrix getU()
get the U matrix

Specified by:
getU in interface UDDecomposition
Returns:
RealMatrix
Since:
1.0
Preconditions :

getD

public RealMatrix getD()
get the D matrix

Specified by:
getD in interface UDDecomposition
Returns:
RealMatrix
Since:
1.0
Preconditions :

getUT

public RealMatrix getUT()
get the UT matrix

Specified by:
getUT in interface UDDecomposition
Returns:
RealMatrix
Since:
1.0
Preconditions :

getDeterminant

public double getDeterminant()
get the determinant

Specified by:
getDeterminant in interface UDDecomposition
Returns:
double
Since:
1.0

getSolver

public DecompositionSolver getSolver()
Description copied from interface: UDDecomposition
Get a solver of the linear equation A × X = B for matrices A.

Specified by:
getSolver in interface UDDecomposition
Returns:
the UD solver
See Also:
UDDecomposition.getSolver()
Description :
gives the solver based on the UD decomposition


Copyright © 2017 CNES. All Rights Reserved.