feat(linalg): add zero-dependency cholesky decomposition and unit tests#51
Conversation
Adds the pieces every other function in this library has, on top of the implementation and tests from #51 (Erfan Esmaeili): - docs/algorithms/linalg.md: math formulation, complexity row, when to/not to use (including the symmetry-not-checked caveat) - validation/c/val_runner.c: benchmark + correctness check, same textbook matrix as the unit tests - validation/results/linalg/cholesky_decompose.md: first validation pass (ARM64/Apple M4 Pro, ASan/UBSan clean, both precisions), flagged as needing the full platform sweep before it matches the rest of linalg - README.md and CHANGELOG.md updated to mention the function Verified before committing: clean build, 335/335 tests (329 base + 6 Cholesky), ASan/UBSan clean, strict -Wall -Wextra -Werror clean in both float32 and float64.
|
Thank you for this, genuinely solid work. Correct Cholesky-Banachiewicz factorization, verified against the textbook example, and the L·L^T reconstruction test are a really nice touch; they check the actual math rather than just a hardcoded expected output. Compiles cleanly under our strictest flags (-Wall -Wextra -Werror -pedantic-errors) in both float32 and float64, and passes under AddressSanitizer and UndefinedBehaviorSanitizer with zero issues. Merged into dev. I added the benchmark, docs page, and validation entry for every function in this library (see #52), and added you to CONTRIBUTORS.md. Sending it out for validation across the rest of our hardware next (Raspberry Pi, ESP32, Windows), then it ships in the next release with your name on the commit. Would genuinely welcome more contributions if you're interested; CONTRIBUTING.md has the pattern we follow. |
Reference Issues/PRs
What does this implement/fix? Explain your changes.
Implements the Cholesky Decomposition algorithm (A = L * L^T) for real symmetric positive-definite matrices within the core linear algebra module.
Key changes:
numx_cholesky_decomposetosrc/linalg.cutilizing a row-major execution layout.Any other comments?