matriz

Crates.iomatriz
lib.rsmatriz
version0.0.2
sourcesrc
created_at2023-03-10 12:19:56.471077
updated_at2023-05-09 23:54:07.186188
descriptionZero allocation Rust linear algebra library
homepage
repositoryhttps://github.com/reu/matriz
max_upload_size
id806403
size21,078
Rodrigo Navarro (reu)

documentation

README

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);
Commit count: 9

cargo fmt