Skip to main content

Crate libmat_rs

Crate libmat_rs 

Source
Expand description

Rust bindings for libmat, an stb-style single-header linear algebra library in pure C.

§Usage

use libmat_rs::Mat;

let a = Mat::from_slice(2, 2, &[1.0, 2.0, 3.0, 4.0]);
let b = Mat::eye(2);
let c = a.mul(&b);
assert!(c.equals(&a));

§Storage

Matrices use column-major storage (BLAS-compatible). When constructing from a slice, values are laid out column by column.

Structs§

Eigen
Result of an eigendecomposition.
Mat
A matrix backed by libmat’s C implementation.