Module jamml::initializers

source ·
Expand description

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

Creates a matrix for a column vector from &Vec v
Creates a m by n matrix of by using function f to determine each element.
Creates a m by m identity matrix of type T
Creates a m by n matrix of type T, where each element is x
Creates a m by n matrix of type T, where each element is T::one()
Creates a m by n matrix of random values between 1 and -1
Creates a m by n matrix of random values between val and -val
Creates a m by n matrix of random values between min and max
Creates a m by n matrix of type T, where each element is T::zero()