convolician 0.1.0

Fast, easy matrix gradients
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
mod random_matrix;
mod central_difference;

use std::error::Error;
use std::time::Instant;

// macro_rules!

pub fn run(rows: usize, cols: usize) -> Result<(), Box<dyn Error>> {
    print!("generating random matrix...");
    let m = random_matrix::generate(rows, cols);
    println!("done.");

    let before = Instant::now();
    let d_x = central_difference::central_difference_x(&m);
    println!("Time elapsed to calculate Dx and Dy: {:.2?}", before.elapsed());
    Ok(())
}