UduDecomposition<T>

Models & Types · AiDotNet.DecompositionMethods.MatrixDecomposition

Represents a UDU’ decomposition of a matrix, which factorizes a symmetric matrix A into UDU’, where U is an upper triangular matrix with ones on the diagonal, D is a diagonal matrix, and U’ is the transpose of U.

Inheritance: MatrixDecompositionBase<T> → UduDecomposition<T>

For Beginners

UDU’ decomposition is a way to break down a complex matrix into simpler parts. Think of it like factoring a number (e.g., 12 = 3 * 4). This decomposition is particularly useful for solving systems of linear equations and for numerical stability in calculations.

Constructors

Constructor Summary
UduDecomposition(Matrix<T> matrix, UduAlgorithmType algorithm) Initializes a new instance of the UduDecomposition class and performs the decomposition.

Properties

Property Summary
Matrix<T> U { get; set; } Gets the upper triangular matrix U from the decomposition.
Vector<T> D { get; set; } Gets the diagonal matrix D represented as a vector of its diagonal elements.

Methods

Method Summary
Matrix<T> Invert() Calculates the inverse of the original matrix A using the UDU’ decomposition.
ValueTuple<Matrix<T>, Vector<T>> GetFactors() Returns the U and D factors from the UDU’ decomposition.
Vector<T> Solve(Vector<T> b) Solves the linear system Ax = b using the UDU’ decomposition.