sukker 1.0.1

Matrices in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use kaffe::{Matrix, MatrixLinAlg, MatrixPredicates};

fn main() {
    let a = Matrix::randomize_range(1f32, 100f32, (3, 1024));
    let b = Matrix::randomize_range(5f32, 100f32, (3, 1024));

    let any: bool = a.any(|&e| e >= 50f32);
    let all: bool = b.all(|&e| e >= 25f32);
    let sw: f32 = a.sum_where(|&e| e <= 33f32);
    let cw: usize = b.count_where(|&e| e >= 42f32);
    let f: Option<(usize, usize)> = a.find(|&e| e >= 50f32);
    let fa: Option<Vec<(usize, usize)>> = b.find_all(|&e| e >= 50f32);
}