/// Return a new matrix with each cell the result of applying the given
/// function to the original cell in its position.
Return a new matrix with each cell the result of applying the given
function to the original cell in its position.
Return a new matrix with each cell the result of applying the given function to the original cell in its position .
pub fn map<F, U>(&self, f: F) -> Matrix<N, M, U>
        where F: Fn(&T) -> U
    {
        unsafe {
            Matrix::from_rows_unsafe(self.num_rows.clone(),
                                     self.num_cols.clone(),
                                     self.iter_rows().map(|i| i.iter().map(|ref x| f(x))))
        }
    }
pub fn map < F , U > ( & self , f : F ) -> Matrix < N , M , U > where F : Fn ( & T ) -> U { unsafe { Matrix :: from_rows_unsafe ( self . num_rows . clone ( ) , self . num_cols . clone ( ) , self . iter_rows ( ) . map ( | i | i . iter ( ) . map ( | ref x | f ( x ) ) ) ) } }
Return a new matrix with each cell the result of applying the given
function to the original cell in its position.
Return a new matrix with each cell the result of applying the given function to the original cell in its position .
&self
f
F