|
tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
|
Solve Ax = b for general or symmetric positive-definite A. More...
#include "config.h"#include "utilities/expected.h"#include "matrix_traits.h"#include "algorithms/decomposition/lu.h"#include "algorithms/solvers/triangular_solve.h"#include "algorithms/solvers/cholesky_solve.h"
Go to the source code of this file.
Namespaces | |
| namespace | matrix_algorithms |
Functions | |
| template<typename T , my_size_t N> | |
| Expected< FusedVector< T, N >, MatrixStatus > | matrix_algorithms::lu_solve (const FusedMatrix< T, N, N > &A, const FusedVector< T, N > &b) |
| Solve Ax = b via LU decomposition with partial pivoting. | |
| template<typename T , my_size_t N> | |
| Expected< FusedVector< T, N >, MatrixStatus > | matrix_algorithms::solve (const FusedMatrix< T, N, N > &A, const FusedVector< T, N > &b) |
| Solve Ax = b with automatic algorithm selection. | |
Solve Ax = b for general or symmetric positive-definite A.
Provides:
Complexity: O(2N³/3) for LU + O(N²) for substitutions.
The Cholesky attempt is not wasted work — if A is SPD, Cholesky is ~2× cheaper than LU. If A is not SPD, the failure is detected quickly (symmetry check is O(N²), positive-definiteness fails at the first non-positive diagonal during factorization).