[][src]Module jamml::initializers

Provides functions to create matricies

let x = column_mat(&vec![1, 2, 3]);
let y = vec![vec![1],
             vec![2],
             vec![3]];

assert_eq!(x, y);

Functions

column_mat

Creates a matrix for a column vector from &Vec v

fn_mat

Creates a m by n matrix of by using function f to determine each element.

identity_mat

Creates a m by m identity matrix of type T

n_mat

Creates a m by n matrix of type T, where each element is x

one_mat

Creates a m by n matrix of type T, where each element is T::one()

one_to_minus_one_mat

Creates a m by n matrix of random values between 1 and -1

ranged_rand_around_mat

Creates a m by n matrix of random values between val and -val

ranged_rand_mat

Creates a m by n matrix of random values between min and max

zero_mat

Creates a m by n matrix of type T, where each element is T::zero()