Cynopolis
c9a9492fcf
Add QR eigen library: implicit Wilkinson-shifted QR for symmetric matrices
...
Merge-Checker / build_and_test (pull_request) Failing after 28m10s
- src/QR.hpp / src/QR.cpp: fully templated QR::EigenQR (N >= 2), no heap
allocation (3*N^2 float working buffers on stack). Givens tridiagonalization
(bottom-up) + implicit Wilkinson-shifted QR with bulge chasing, relative
deflation, exact-zero peeling, closed-form 2x2 termination.
- Matrix::EigenQR now delegates to QR::EigenQR (old unshifted body removed);
eigenvalues sorted descending, eigenvectors in columns of the output.
- unit-tests/qr-build-blocks-tests.cpp: 8 building-block test cases
(215 assertions) with scipy/numpy references.
- unit-tests/qr-reference-values.py: numpy/scipy reference generator mirroring
every building block and the full pipeline (eigh, n=3..8).
- CMake: new 'qr' static library; Matrix links against it;
qr-build-blocks-tests target enabled.
2026-08-25 14:02:56 -04:00
Cynopolis
ab0cea104c
Templatize SVD on N: support any Matrix<R,C> with stack-only buffers
...
Replace the fixed 5x5 SVD implementation with template <uint8_t N>
building blocks over Matrix<N,N> working buffers (N = max(rows, cols)),
removing the 5x5 size limit. Public API (SVD::SVD) is unchanged and the
whole path stays heap-free: peak stack is ~11*N^2 floats, budgeted in
the SVD.hpp header doc.
Fixes found while porting/validating the templated rewrite:
- QL.Identity() was a no-op (static factory returns by value); init
the Householder accumulators with an explicit diagonal loop
- restore the QL column sign-flip in ExtractAndSortSingularValues for
negative unsolved W diagonal entries (Householder sign flips)
- T = B^T B tridiagonal formula: T[i][i] = d[i]^2 + e[i-1]^2 only
(e[i] contributes to T[i+1][i+1], not T[i][i])
- wide-matrix Vt assembly: Vt = QL^T must be filled over the full
m x m (m = columns of A), not just the top n x n
Tests:
- matrix-tests: add large-size instantiation cases beyond the old limit
(tall 7x5 N=7, square 6x6 N=6, wide 5x8 N=8 transpose path with full
orthogonal 8x8 Vt, tall 6x4 near rank-deficient N=6 deflation path),
all checked against numpy/scipy float32 references
- svd-build-blocks-tests: adapt Jacobi test to the Matrix<N,N> interface
- svd-reference-values.py: add the four new reference matrices
2026-08-20 10:22:49 -04:00
Cynopolis
f8221dd9db
Add 5x5 SVD end-to-end tests (scipy references)
...
- Full-rank random 5x5 (cond ~11.5)
- Rank-deficient 5x5 (exact rank 3, noise-level tail sigmas)
- Wide dynamic range 5x5 (cond ~9000, diagonal decay 50 -> 1e-3)
- Symmetric indefinite 5x5 (sigma = |eigenvalues|)
2026-08-19 15:42:15 -04:00
Cynopolis
ac4bef88fc
Fix SVD pipeline bugs; extract and unit-test bidiagonal block solvers
...
- Snapshot bidiagonal block before solving (W overwrite corrupted Ublock)
- Wide-matrix QL row extent fix (rowsQL = n when transposed)
- Vt output copy bound j<columns (was OOB write clobbering caller sigma)
- Rank-deficient blocks: residual singular values sigma_i = ||B*v_i||
instead of sqrt(eigs of B*B) (condition-number squaring); Gram-Schmidt
orthonormalization of U columns with rank-deficiency completion
- JacobiEigenSymmetric: return signed eigenvalues (removed fabsf)
- Fix 28 WithinRel(0.0f,.) matcher misuse -> WithinAbs in matrix-tests
- New unit tests: SolveBidiagonalBlock2x2 (7 scipy-referenced cases),
JacobiEigenSymmetric (3 cases), DeflateBidiagonal/BidiagonalIsDiagonal
2026-08-19 14:05:44 -04:00
Cynopolis
f12625b41e
Working on breaking up the steps into manageable chunks
2026-08-17 15:33:33 -04:00
Cynopolis
6f91c96de8
Small refactor of SVD implimentation
2026-08-14 11:02:25 -04:00
Cynopolis
5600b05b09
Working on an SVD implimentation
2026-08-14 09:19:56 -04:00
Cynopolis
ea29ea27f2
Removed some unused variables
2026-08-11 11:19:56 -04:00
Cynopolis
8b6f1de822
Updated timing test timings
Merge-Checker / build_and_test (pull_request) Successful in 1m17s
2025-06-07 11:03:55 -04:00
Cynopolis
719fc4d28a
Adjusted timing test repetition and added QR decomposition
Merge-Checker / build_and_test (pull_request) Has been cancelled
2025-06-07 10:58:59 -04:00
Cynopolis
c099dfe760
Throwing in the towel on eigenvectors for now
Merge-Checker / build_and_test (pull_request) Successful in 26s
2025-06-06 16:33:20 -04:00
Cynopolis
d84664b567
Improved on old unit tests
Merge-Checker / build_and_test (pull_request) Failing after 22s
2025-06-05 15:10:00 -04:00
Cynopolis
1091bbda32
Got QR decomposition fully working! (The unit tests were wrong)
Merge-Checker / build_and_test (pull_request) Successful in 37s
2025-06-03 10:01:52 -04:00
Cynopolis
75edad3d0a
Made my own equally wrong QR factorization
Merge-Checker / build_and_test (pull_request) Failing after 20s
2025-06-02 21:44:41 -04:00
Cynopolis
64820553c7
New norms and division by scalar
Merge-Checker / build_and_test (pull_request) Failing after 21s
2025-06-02 16:19:23 -04:00
Cynopolis
60a2b12b5f
Replaced normalize with EuclideanNorm
Merge-Checker / build_and_test (pull_request) Failing after 21s
2025-06-02 14:26:41 -04:00
Cynopolis
37556c7c81
Made unit tests a little better and fixed matrix multiplication errors for non-square amtrices
Merge-Checker / build_and_test (pull_request) Failing after 20s
2025-06-02 10:49:16 -04:00
Cynopolis
6fdab5be30
Added unit tests for eigen
Merge-Checker / build_and_test (pull_request) Successful in 23s
2025-05-30 15:26:19 -04:00
Cynopolis
d07ac43f7b
Added function comments
Merge-Checker / build_and_test (pull_request) Successful in 23s
2025-05-30 14:47:42 -04:00
Cynopolis
74afbfeab8
Added QR decomposition functions
Merge-Checker / build_and_test (pull_request) Successful in 24s
2025-05-30 09:07:26 -04:00
Cynopolis
32c2a5cef2
Added a check to see if the timing results have signifigantly changed
...
Update matrix-timing-tests timings [skip ci]
Fixing timing test runner
Update matrix-timing-tests timings
Removed the seperate benchmark action
2025-05-29 16:34:31 -04:00
Cynopolis
54d9699df8
Added a merge checker script that has to run before you can merge to main
...
Updated merge checker and seperated the matrix tests fro mthe timing tests
Added matrix test timings
Timings get auto-comitted
Update matrix-timing-tests timings [skip ci]
Updated readme
Update matrix-timing-tests timings [skip ci]
Fixing auto-checkout issues
updated readme
Update matrix-timing-tests timings [skip ci]
Split timing tests into its own job
Update matrix-timing-tests timings [skip ci]
2025-05-29 16:34:28 -04:00
Cynopolis
4b802458ef
Changed matrix unit tests to reflect new syntax
2025-02-09 20:53:37 -05:00
Cynopolis
b21236e5db
Fixed quaternion equals operator
2025-02-09 11:32:46 -05:00
Cynopolis
c8dce7d7d8
Fixed broken unit tests
2025-02-09 00:17:16 -05:00
Cynopolis
f51afb42e0
Refactored file layout because platformio failed to find things
2025-02-08 23:57:43 -05:00
Cynopolis
28c30c5ea7
Moved unit tests into their respective module's subfolders
2025-02-06 23:45:15 -05:00
Cynopolis
742749457c
Implimented the quaternion class and added unit tests
2025-02-06 23:44:55 -05:00
Cynopolis
6e480dce86
Added quaternion class
2025-02-06 23:16:51 -05:00
Cynopolis
39274eb964
Refactored the src dir layout
2025-02-06 22:02:50 -05:00
Cynopolis
4a25414b92
Got vector unit tests compiling
2025-02-03 11:59:49 -05:00
Cynopolis
ae4806510b
Added better support for casting vector3d to/from MAtrix
2025-02-03 10:10:31 -05:00
Quinn Henthorne
941758e8ea
Refactors the underlying data type to optimize performance
2024-12-13 17:04:46 -05:00
Quinn Henthorne
53f3766658
Added a template pack initializer
2024-12-13 16:37:40 -05:00
Quinn Henthorne
fb16c6f61b
Added timing tests for matrix math
2024-12-13 15:50:53 -05:00
Quinn Henthorne
6f5214b448
Finished adding unit tests and need to write timing tests
2024-12-13 11:04:16 -05:00
Quinn Henthorne
5bbdefa4cf
Fixed matrix inversion
2024-12-13 10:04:06 -05:00
Quinn Henthorne
8fa9d8c77c
Added overloaded operators for the rest of the major operators
2024-12-13 09:10:34 -05:00
Quinn Henthorne
7d7d89c676
Working on polishing functions
2024-12-11 17:30:47 -05:00
Quinn Henthorne
9cbaeb2c27
Got matrix multiplication working
2024-12-11 09:09:08 -05:00
Cynopolis
1fb211912d
Got first real unit test passing
2024-12-10 23:55:23 -05:00
Cynopolis
c04ee29e82
Got unit tests compiling
2024-12-10 22:42:02 -05:00
Quinn Henthorne
3233263ffc
Started adding the first real unit test
2024-12-10 17:06:07 -05:00
Quinn Henthorne
1ef741ea93
Got the matrix library compiling in the tests
2024-12-10 16:56:57 -05:00
Quinn Henthorne
ebdf279a5e
Added an example test case
2024-12-10 16:49:31 -05:00
Quinn Henthorne
175c0354f8
Added the hpps as static libraries
2024-12-10 16:42:02 -05:00