extended_matrix
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.
What’s inside
- Dense matrices and vectors
Matrix,SquareMatrix- basic arithmetic helpers and utilities
- Square-matrix algorithms
- Gaussian elimination helpers (
eliminate_gep,substitute_gep,gauss_gep) - LU / LUP decomposition (
lup_decomp,decompose_lup) - determinant and inverse routines built on top of decompositions
- Gaussian elimination helpers (
- Sparse matrix container
CsrMatrix(lightweight CSR storage) — useful for experiments, not a full sparse toolkit
Quick example
use *;
Notes on the “*_gep” naming
Inside the square-matrix trait you’ll see methods suffixed with *_gep:
eliminate_gepsubstitute_gepgauss_gep
In 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.
Project philosophy
- Prefer straightforward code over clever tricks.
- Keep algorithms explicit (so it’s easy to reason about numerical behavior).
- Use small, composable helpers (decomposition routines power determinant/inverse/solves).
License
MIT (see LICENSE).