Fn_rand


Functions

const Op< mat, op_randrand (const u32 n_rows, const u32 n_cols)
 Generate a dense matrix with all elements set to random values in the [0,1] interval (uniform distribution).
const Op< colvec, op_randrand (const u32 n_elem)
 Generate a vector with all elements set to random values in the [0,1] interval (uniform distribution).

Function Documentation

const Op< mat_type, op_rand > rand ( const u32  n_rows,
const u32  n_cols 
) [inline]

Generate a dense matrix with all elements set to random values in the [0,1] interval (uniform distribution).

Definition at line 26 of file fn_rand.hpp.

Referenced by op_rand::direct_rand(), and op_randn::randn().

00027   {
00028   arma_extra_debug_sigprint();
00029   
00030   return Op<mat, op_rand>(n_rows, n_cols, 'j');
00031   }

const Op< vec_type, op_rand > rand ( const u32  n_elem  )  [inline]

Generate a vector with all elements set to random values in the [0,1] interval (uniform distribution).

Definition at line 52 of file fn_rand.hpp.

00053   {
00054   arma_extra_debug_sigprint();
00055   
00056   return Op<colvec, op_rand>(n_elem, 1, 'j');
00057   }