UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::FDenseMatrixSolver Class Reference

#include <DenseMatrix.h>

Static Public Member Functions

template<int32 T_E>
static bool CholeskyFactorize (TDenseMatrix< T_E > &A)
 
template<int32 T_EA, int32 T_EB, int32 T_EX>
static void SolveCholeskyFactorized (const TDenseMatrix< T_EA > &G, const TDenseMatrix< T_EB > &B, TDenseMatrix< T_EX > &X)
 
template<int32 T_EA, int32 T_EB, int32 T_EX>
static bool SolvePositiveDefinite (const TDenseMatrix< T_EA > &A, const TDenseMatrix< T_EB > &B, TDenseMatrix< T_EX > &X)
 

Detailed Description

Methods to solves sets of Linear equations stored as AX = B where A is an NxN matrix, and X.B are Nx1 column vectors.

Member Function Documentation

◆ CholeskyFactorize()

template<int32 T_E>
static bool Chaos::FDenseMatrixSolver::CholeskyFactorize ( TDenseMatrix< T_E > &  A)
inlinestatic

Overwrite A with its Cholesky Factor (A must be Positive Definite). See "Matrix Computations, 4th Edition" Section 4.2, Golub & Van Loan.

The Cholesky Factor of A is G (Gt its transpose), where A = GGt. G is lower triangular.

◆ SolveCholeskyFactorized()

template<int32 T_EA, int32 T_EB, int32 T_EX>
static void Chaos::FDenseMatrixSolver::SolveCholeskyFactorized ( const TDenseMatrix< T_EA > &  G,
const TDenseMatrix< T_EB > &  B,
TDenseMatrix< T_EX > &  X 
)
inlinestatic

This solves AX = B, where A is positive definite and has been Cholesky Factorized to produce G, where A = GGt, G is lower triangular.

This is a helper method for SolvePositiveDefinite, or useful if you need to reuse the Cholesky Factor and therefore calculated it yourself.

See also
SolvePositiveDefinite

◆ SolvePositiveDefinite()

template<int32 T_EA, int32 T_EB, int32 T_EX>
static bool Chaos::FDenseMatrixSolver::SolvePositiveDefinite ( const TDenseMatrix< T_EA > &  A,
const TDenseMatrix< T_EB > &  B,
TDenseMatrix< T_EX > &  X 
)
inlinestatic

Solve AX = B, for positive-definite NxN matrix A, and Nx1 column vectors B and X.

For positive definite A, A = GGt, where G is the Cholesky factor and lower triangular. We can solve GGtX = B by first solving GY = B, and then GtX = Y.

E.g., this can be used to solve constraint equations of the form J.I.Jt.X = B where J is a Jacobian (Jt its transpose), I is an Inverse mas matrix, and B the residual. In this case, I is symmetric positive definite, and therefore so is JIJt.


The documentation for this class was generated from the following file: