libmat 0.2.0

This library provides tools for linear algebra.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use libmat::mat::Matrix;
#[test]
fn one_idx() {
    let a = Matrix::<u32>::one(3);
    assert_eq!(a[0], [1, 0, 0]);
    assert_eq!(a[1], [0, 1, 0]);
    assert_eq!(a[2], [0, 0, 1]);
}

#[test]
fn double_idx() {
    let a = Matrix::<u32>::one(3);
    assert_eq!(a[0][0], 1);
    assert_eq!(a[0][1], 0);
    assert_eq!(a[1][1], 1);
}