Feat sprs transition - #11
Merged
Merged
Conversation
Implements all SMat<T> methods for sprs::CsMatI<T,I,Iptr>: - svd_opa (CSR/CSC × forward/transposed, parallel chunked scatter) - compute_column_means - multiply_with_dense (4 branches, parallel) - multiply_with_dense_centered (correct dot-product formula, avoids product-of-sums bug) - multiply_transposed_by_dense - multiply_transposed_by_dense_centered 15 unit tests cover CSR and CSC paths for all 6 methods. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sMat All tests that used CsrMatrix (nalgebra) now use sprs::CsMat<f64> via TriMat construction, eliminating the todo!() panics from the unimplemented nalgebra SMat methods. Also fix u/vt dimension assertions in test_random_svd_computation: u is (nrows × rank), not transposed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove erroneous || (nrows < 1000 && ncols < 1000) condition from svd_opa that bypassed column masking for small matrices, causing panics when x was sized for masked columns but underlying matrix expected full column count. Fix test_masked_vs_physical_subset to use svd_dim_seed with identical seed for both masked and physical SVDs, ensuring deterministic comparison. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New src/lanczos/masked_sprs.rs with MaskedCsMatI<T,I,Iptr> (alias MaskedCsMat<T>): wraps a sprs::CsMatI reference with a column mask, implementing all SMat<T> methods without the small-matrix fast-path bypass that caused the original MaskedCSRMatrix bug. 17 unit tests cover both CSR and CSC paths for all 6 SMat methods plus an end-to-end SVD comparison against a physical sparse subset. Also fix setup_thread_pool() in randomized tests to tolerate a pre-initialized Rayon global pool (avoids Once poisoning race). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove setup_thread_pool()/build_global() which caused Once poisoning when other tests triggered Rayon's lazy global init first. Each test now builds its own local ThreadPool and uses pool.install() to scope parallel work, eliminating all shared global state between tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New ci.yml runs cargo test on every push/PR to master, providing the status check needed for branch protection rules. publish.yml now triggers only on release publication (not every master push), so crates.io publishing is intentional and release-gated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…matrix and dimension=1 support
…en LAS2 and randomized algorithms. Add reconstruction property tests.
…rs and parallelizing updates.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.