|
tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
|
Determinant computation with compile-time dispatch. More...

Go to the source code of this file.
Namespaces | |
| namespace | matrix_algorithms |
Functions | |
| template<typename T , my_size_t N> | |
| T | matrix_algorithms::determinant (const FusedMatrix< T, N, N > &A) |
| Compute the determinant of a square matrix. | |
Determinant computation with compile-time dispatch.
Small sizes (1×1, 2×2, 3×3, 4×4) use unrolled cofactor expansion — O(1), works on any scalar type including integers.
Generic path (N>4) uses LU decomposition: det(A) = sign · Π U(i,i) Returns zero for singular matrices. Requires floating-point.
Complexity: O(1) for N≤4, O(2N³/3) for N>4.