#linear-algebra #matrix #linear #algebra #matrix-vector #vector

no-std matriz

Zero allocation Rust linear algebra library

2 releases

0.0.2 May 9, 2023
0.0.1 Mar 10, 2023

#1700 in Math

MIT license

20KB
588 lines

Matriz

Typesafe and simple linear algebra library, with no-std support.

Disclaimer: this library is intendend for educational porpouses. For production grade implementations just go with nalgebra.

Usage

Key feature is that matrices dimensions are encoded on the type, and transformations generate proper typed results.

use matriz::Matrix;

#[rustfmt::skip]
let m1 = Matrix::from_rows([
    [1, -2, 4],
    [5,  0, 3],
]);

#[rustfmt::skip]
let m2 = Matrix::from_rows([
    [ 1],
    [ 5],
    [-1],
]);

let output = Matrix::from_rows([
    [-13],
    [  2],
]);

assert_eq!(m1 * m2, output);

No runtime deps