| Crates.io | extended_matrix |
| lib.rs | extended_matrix |
| version | 0.9.9 |
| created_at | 2021-07-31 09:46:57.062407+00 |
| updated_at | 2026-01-01 20:37:12.427477+00 |
| description | A matrix calculation module. |
| homepage | |
| repository | https://github.com/RomanShushakov/extended_matrix |
| max_upload_size | |
| id | 429646 |
| size | 105,549 |
A small Rust crate I wrote while revisiting numerical linear algebra fundamentals.
The goal here is not to compete with established libraries, but to keep core matrix routines readable and easy to step through (Gaussian elimination, LU/LUP decomposition, determinant/inverse helpers, etc.). I’ve been using it as a supporting crate in my personal finite‑element / solver experiments, where it’s handy to have “plain” implementations I can inspect and tweak.
If you need production-grade performance, stability guarantees, and a broad ecosystem, you’ll likely want nalgebra, ndarray, or BLAS/LAPACK-backed solutions instead. This crate is more of a learning + building block.
Matrix, SquareMatrixeliminate_gep, substitute_gep, gauss_gep)lup_decomp, decompose_lup)CsrMatrix (lightweight CSR storage) — useful for experiments, not a full sparse toolkituse extended_matrix::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// 2x2 system: A x = b
let a = SquareMatrix::from_vec(vec![
vec![2.0, 1.0],
vec![5.0, 7.0],
])?;
let b = Vector::from_vec(vec![11.0, 13.0])?;
// Solve using Gaussian elimination (see the trait docs for variants)
let x = a.gauss_gep(b)?;
println!("x = {:?}", x);
Ok(())
}
Inside the square-matrix trait you’ll see methods suffixed with *_gep:
eliminate_gepsubstitute_gepgauss_gepIn this codebase, gep is used as a short label for the “Gaussian elimination process” style helpers: elimination + back-substitution, typically with some form of pivoting/row handling depending on the method.
MIT (see LICENSE).