numra-linalg
Linear algebra for the Numra workspace — dense and sparse matrices, factorizations (LU / QR / Cholesky / SVD / eigen), and preconditioned Krylov solvers.
Backend-agnostic Matrix trait built on faer. Provides direct factorizations (dense and sparse), iterative Krylov solvers, and a small library of preconditioners.
Example
use ;
let mut a: = zeros;
a.set;
a.set;
a.set;
let b = vec!;
let x = a.solve.unwrap;
assert!;
assert!;
assert!;
What's in this crate
| Area | Items |
|---|---|
| Dense matrix | DenseMatrix, Matrix trait |
| Sparse matrix | SparseMatrix |
| LU | LUFactorization, LUSolver, SparseLU |
| QR | QRFactorization |
| Cholesky | CholeskyFactorization, SparseCholesky |
| SVD | SvdDecomposition, ThinSvdDecomposition |
| Eigen | EigenDecomposition, SymEigenDecomposition |
| Iterative Krylov solvers | cg, pcg, gmres, bicgstab, minres |
| Preconditioners | IdentityPreconditioner, Jacobi, Ssor, Ilu0 |
Composes with
numra-nonlinearfor Jacobian solves at each Newton stepnumra-odefor factorizations inside implicit Runge-Kutta and BDF stagesnumra-pdefor sparse Laplacian / Helmholtz operator assemblynumra-optimfor Hessian solves and QP / SQP subproblemsnumra-fitfor SVD-based polynomial regression
Install
[]
= "0.1"
Or via the umbrella crate:
[]
= "0.1"
Documentation
- API: https://docs.rs/numra-linalg
- Book: Matrices and vectors · Factorizations · Iterative solvers
- Source: https://github.com/moussaoutlook/numra-rs/tree/main/numra-linalg
License
Numra Academic & Research License (Non-Commercial). Academic and research use is free; commercial use requires a separate license — contact contact@spectralautomata.com. See LICENSE.