|
tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
|
Cholesky decomposition for symmetric positive-definite matrices. More...
#include "config.h"#include "utilities/expected.h"#include "matrix_traits.h"#include "math/math_utils.h"#include "simple_type_traits.h"

Go to the source code of this file.
Namespaces | |
| namespace | matrix_algorithms |
Functions | |
| template<typename MatrixType > | |
| Expected< MatrixType, MatrixStatus > | matrix_algorithms::cholesky (const MatrixType &A, typename MatrixType::value_type tol=typename MatrixType::value_type(PRECISION_TOLERANCE)) |
| Compute the Cholesky decomposition of a symmetric positive-definite matrix. | |
| template<typename MatrixType > | |
| MatrixType | matrix_algorithms::cholesky_or_die (const MatrixType &A) |
| Cholesky decomposition — abort on failure. | |
Cholesky decomposition for symmetric positive-definite matrices.
Computes the lower-triangular factor L such that A = L · Lᵀ. Returns the result wrapped in Expected so that callers can distinguish success from well-defined failure modes (not symmetric, not positive definite) without exceptions or dynamic allocation.
For a symmetric positive-definite matrix A of size N×N, the Cholesky decomposition computes a lower-triangular matrix L such that A = LLᵀ.
Complexity: O(N³/3) multiplications, O(N) square roots.
The tolerance parameter tol controls the diagonal threshold: