Fn_randn

Functions

arma_inline const eOp< mat,
eop_randn
randn (const u32 n_rows, const u32 n_cols)
 Generate a dense matrix with all elements set to random values with a gaussian distribution (zero mean, unit variance).
arma_inline const eOpCube
< cube, eop_cube_randn
randn (const u32 n_rows, const u32 n_cols, const u32 n_slices)
arma_inline const eOp< colvec,
eop_randn
randn (const u32 n_elem)
 Generate a vector with all elements set to random values with a gaussian distribution (zero mean, unit variance).

Function Documentation

arma_inline const eOp< mat_type, eop_randn > randn ( const u32  n_rows,
const u32  n_cols 
) [inline]

Generate a dense matrix with all elements set to random values with a gaussian distribution (zero mean, unit variance).

Definition at line 48 of file fn_randn.hpp.

00049   {
00050   arma_extra_debug_sigprint();
00051   
00052   arma_type_check<is_Mat<mat_type>::value == false>::apply();
00053   
00054   return eOp<mat_type, eop_randn>(n_rows, n_cols);
00055   }

arma_inline const eOpCube< cube_type, eop_cube_randn > randn ( const u32  n_rows,
const u32  n_cols,
const u32  n_slices 
) [inline]

Definition at line 62 of file fn_randn.hpp.

00063   {
00064   arma_extra_debug_sigprint();
00065   
00066   arma_type_check<is_Cube<cube_type>::value == false>::apply();
00067   
00068   return eOpCube<cube_type, eop_cube_randn>(n_rows, n_cols, n_slices);
00069   }

arma_inline const eOp< vec_type, eop_randn > randn ( const u32  n_elem  )  [inline]

Generate a vector with all elements set to random values with a gaussian distribution (zero mean, unit variance).

Definition at line 88 of file fn_randn.hpp.

00089   {
00090   arma_extra_debug_sigprint();
00091   
00092   arma_type_check< (is_Col<vec_type>::value == false) && (is_Row<vec_type>::value == false) >::apply();
00093   
00094   if(is_Row<vec_type>::value == true)
00095     {
00096     return eOp<vec_type, eop_randn>(1, n_elem);
00097     }
00098   else
00099     {
00100     return eOp<vec_type, eop_randn>(n_elem, 1);
00101     }
00102   }