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
a49e357f4c
Added additional constraints to list instantiation
2026-08-13 11:33:19 -04:00
Cynopolis
ea29ea27f2
Removed some unused variables
2026-08-11 11:19:56 -04:00
Cynopolis
48b016d8b7
Merge pull request 'Updating the readme' ( #7 ) from update-readme into main
...
Reviewed-on: #7
2025-06-30 19:05:53 +00:00
Cynopolis
8e4595f2ef
Updated readme
Merge-Checker / build_and_test (pull_request) Successful in 1m10s
2025-06-30 14:52:48 -04:00
Cynopolis
99c0d3ed70
Merge pull request 'Adjusted timing test repetition and added QR decomposition' ( #6 ) from Minor-cicd-fixes into main
...
Merge-Checker / build_and_test (pull_request) Successful in 1m13s
Reviewed-on: #6
2025-06-10 23:06:02 +00:00
Cynopolis
80c4ebfece
Put time usage back
Merge-Checker / build_and_test (pull_request) Successful in 1m18s
2025-06-07 11:08: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
2a7eb93ebe
Merge pull request 'Working on adding efficient eigenvector and value calculations' ( #2 ) from eigenvector-and-values into main
...
Reviewed-on: #2
2025-06-06 22:32:18 +00: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
bec70facb2
Fixed clangd type hints in the matrix.cpp file
Merge-Checker / build_and_test (pull_request) Failing after 26s
2025-06-03 09:08:23 -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
1715d2b46c
Merge pull request 'Add a merge checker script' ( #1 ) from Testing-merge-checker into main
...
Reviewed-on: #1
2025-05-29 20:36:30 +00:00
Cynopolis
296f233b28
Updated README
Merge-Checker / build_and_test (pull_request) Successful in 23s
2025-05-29 16:35:52 -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
8a15459fc8
Adding a merge checker script
2025-05-21 17:46:49 -04:00
Cynopolis
dee19b54ad
Added a ToEulerAngle function
2025-04-09 18:41:45 -04:00
Cynopolis
4b802458ef
Changed matrix unit tests to reflect new syntax
2025-02-09 20:53:37 -05:00
Cynopolis
e92fc6e5a0
Made the dot product public
2025-02-09 19:03:32 -05:00
Cynopolis
b21236e5db
Fixed quaternion equals operator
2025-02-09 11:32:46 -05:00
Cynopolis
b897b13880
Merge branch 'main' of https://github.com/Cynopolis/Vector3D
2025-02-09 11:18:03 -05:00
Cynopolis
1a0af95fe7
Reworked how getting a submatrix works
2025-02-09 11:17:45 -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
2385446ac5
Reworked some of the matrix interface
2025-02-08 18:06:43 -05:00
Cynopolis
713809a82b
Fixed library json file so platformio can build again
2025-02-08 00:08:36 -05:00
Cynopolis
55ff4aa693
Finished implimenting quaternion basics
2025-02-07 23:40:56 -05:00
Cynopolis
aa8056240a
Fixed quaternion multiplication
2025-02-07 19:19:06 -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
3b023d2104
Multiplication was completely broken actually
2025-02-06 21:56:54 -05:00
Cynopolis
9726ebbca0
Fixed typo and missing include
2025-02-04 22:06:34 -05:00
Cynopolis
ab2d9f002b
Added scalar addition / subtraction
2025-02-04 14:33:29 -05:00
Cynopolis
437d209200
Added a scalar divisor operator
2025-02-03 15:21:22 -05:00
Cynopolis
cccadc5d21
consted some vector functions
2025-02-03 12:46:26 -05:00
Cynopolis
519c953fcb
Added inline to explicit template specialization functions
2025-02-03 12:34:37 -05:00
Cynopolis
c1a1f994ea
Fixed some cmake errors
2025-02-03 12:23:13 -05:00
Cynopolis
fee5486ea2
Refactored folder layout
2025-02-03 12:20:30 -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
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
Cynopolis
62ba7d8b3e
Finished implimenting all of the matrix math functions
2024-12-09 22:59:54 -05:00
Cynopolis
ac8c70d5a4
Started working on the matrix library
2024-12-09 17:48:50 -05:00
Cynopolis
f5ca6832bc
Initial commit
2024-12-04 17:52:32 -05:00