pub fn tabulate<F>(num_rows: N, num_cols: M, f: F) -> Self
        where F: Fn(usize, usize) -> T
    {

        let nrows = num_rows.as_nat();
        let ncols = num_cols.as_nat();

        unsafe {
            Self::from_rows_unsafe(num_rows,
                                   num_cols,
                                   (0..nrows).map(|row| {
                                       (0..ncols)
                                           .zip(iter::repeat(row))
                                           .map(|(col, row)| f(row, col))
                                   }))
        }
    }
/// Creates a matrix by the tabulating the given function over row and
/// column indices.
Creates a matrix by the tabulating the given function over row and
column indices.
Creates a matrix by the tabulating the given function over row and column indices .
pub fn tabulate<F>(num_rows: N, num_cols: M, f: F) -> Self
        where F: Fn(usize, usize) -> T
    {
        let nrows = num_rows.as_nat();
        let ncols = num_cols.as_nat();
        unsafe {
            Self::from_rows_unsafe(num_rows,
                                   num_cols,
                                   (0..nrows).map(|row| {
                                       (0..ncols)
                                           .zip(iter::repeat(row))
                                           .map(|(col, row)| f(row, col))
                                   }))
        }
    }
pub fn tabulate < F > ( num_rows : N , num_cols : M , f : F ) -> Self where F : Fn ( usize , usize ) -> T { let nrows = num_rows . as_nat ( ) ; let ncols = num_cols . as_nat ( ) ; unsafe { Self :: from_rows_unsafe ( num_rows , num_cols , ( 0 .. nrows ) . map ( | row | { ( 0 .. ncols ) . zip ( iter :: repeat ( row ) ) . map ( | ( col , row ) | f ( row , col ) ) } ) ) } }
Creates a matrix by the tabulating the given function over row and
column indices.
Creates a matrix by the tabulating the given function over row and column indices .
num_rows
N
num_cols
M
f
F
num_rows
N
num_cols
M
f
F