Repository navigation
4 math matrix - #12
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved overflow and scaling defects in complex arithmetic and matrix routines produce incorrect results or NaNs for finite inputs and can cause SVD rescaling to panic.
5 open issues
Compute complex logarithms without overflowing the magnitude · New Prevent overflow in complex division intermediate sums · New Handle subnormal scales in Frobenius norm normalization · New Avoid overflow when constructing reflectors from large inputs · New Avoid exponent overflow when complex magnitude is infinite · New
What changed in this PR
Adds matrix and complex-number support to the mathematics library, addressing issue #4 with arithmetic, decompositions, matrix properties, and matrix functions.
Changes:
- Introduces public matrix and complex-number APIs, including floating-point and exact-integer operations.
- Adds numerical algorithms and optimized multiplication, Cholesky, and triangular-solve kernels.
- Adds extensive tests, documentation, and package metadata updates.
| File | Description |
|---|---|
lib/tests/math/matrix/svd.rs |
Tests SVD, norms, rank, null spaces, and characteristic polynomials. |
lib/tests/math/matrix/product.rs |
Checks matrix products across shapes and block boundaries. |
lib/tests/math/matrix/nonsymmetric.rs |
Tests large and difficult nonsymmetric eigenproblems. |
lib/tests/math/matrix/mod.rs |
Registers matrix test modules. |
lib/tests/math/matrix/factor.rs |
Tests factorizations, solves, inverses, and determinants. |
lib/tests/math/matrix/factor_paths.rs |
Exercises factorization thresholds and numerical edge cases. |
lib/tests/math/matrix/exact.rs |
Tests exact-integer matrix algorithms. |
lib/tests/math/matrix/eigen.rs |
Tests Schur and eigendecompositions. |
lib/tests/math/matrix/common.rs |
Provides shared generators and numerical assertions. |
lib/tests/math/matrix/basic.rs |
Tests construction, arithmetic, access, and formatting. |
lib/tests/math/main.rs |
Registers complex and matrix test suites. |
lib/tests/math/complex/mod.rs |
Tests complex arithmetic, functions, and extreme values. |
lib/src/math/mod.rs |
Exports and documents the new math modules. |
lib/src/math/matrix/svd/secular.rs |
Implements the secular-equation SVD merge step. |
lib/src/math/matrix/svd/qr.rs |
Implements bidiagonal QR iteration and rotations. |
lib/src/math/matrix/svd.rs |
Exposes SVD and coordinates scaling and decomposition. |
lib/src/math/matrix/properties.rs |
Adds norms, condition numbers, rank, and related properties. |
lib/src/math/matrix/ops.rs |
Implements matrix arithmetic operators. |
lib/src/math/matrix/mod.rs |
Defines matrix storage, constructors, access, and formatting. |
lib/src/math/matrix/householder.rs |
Provides shared Householder reflection routines. |
lib/src/math/matrix/gemm/portable.rs |
Adds portable matrix multiplication kernels. |
lib/src/math/matrix/exact.rs |
Implements exact-integer matrix calculations. |
lib/src/math/matrix/eigen.rs |
Exposes general and Hermitian eigendecompositions. |
lib/src/math/matrix/cholesky/aarch64.rs |
Adds NEON Cholesky kernels. |
lib/src/math/matrix/blas/trsm/aarch64.rs |
Adds NEON triangular-solve kernels. |
lib/src/math/matrix/blas.rs |
Provides shared product, solve, and scratch-memory interfaces. |
lib/src/math/matrix/basic.rs |
Adds transposes, row and column operations, trace, and powers. |
lib/src/math/complex/ops.rs |
Implements complex arithmetic operators. |
lib/src/math/complex/mod.rs |
Defines complex numbers and their mathematical functions. |
lib/src/math/complex/float.rs |
Supplies the shared floating-point trait. |
lib/src/docs.rs |
Includes complex and matrix guides in documentation tests. |
lib/docs/math/complex.md |
Documents complex-number APIs and implementation details. |
lib/Cargo.toml |
Updates version and package metadata for the expanded library. |
lib/Cargo.lock |
Synchronizes the package version. |
Review effort: Balanced
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.

closes #4