Functions | |
const Op< mat, op_rand > | rand (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_rand > | rand (const u32 n_elem) |
Generate a vector with all elements set to random values in the [0,1] interval (uniform distribution). | |
const OpCube< cube, op_rand > | rand (const u32 n_rows, const u32 n_cols, const u32 n_slices) |
Generate a dense cube with all elements set to random values in the [0,1] interval (uniform distribution). |
Generate a dense matrix with all elements set to random values in the [0,1] interval (uniform distribution).
Definition at line 38 of file fn_rand.hpp.
Referenced by op_shuffle::apply(), op_rand::direct_rand(), and op_randn::randn().
00039 { 00040 arma_extra_debug_sigprint(); 00041 00042 arma_type_check<is_Mat<mat_type>::value == false>::apply(); 00043 00044 return Op<mat_type,op_rand>(n_rows, n_cols, 'j'); 00045 }
Generate a vector with all elements set to random values in the [0,1] interval (uniform distribution).
Definition at line 64 of file fn_rand.hpp.
00065 { 00066 arma_extra_debug_sigprint(); 00067 00068 arma_type_check< (is_Col<vec_type>::value == false) && (is_Row<vec_type>::value == false) >::apply(); 00069 00070 if(is_Row<vec_type>::value == true) 00071 { 00072 return Op<vec_type,op_rand>(1, n_elem, 'j'); 00073 } 00074 else 00075 { 00076 return Op<vec_type,op_rand>(n_elem, 1, 'j'); 00077 } 00078 }
const OpCube< cube_type, op_rand > rand | ( | const u32 | n_rows, | |
const u32 | n_cols, | |||
const u32 | n_slices | |||
) | [inline] |
Generate a dense cube with all elements set to random values in the [0,1] interval (uniform distribution).
Definition at line 103 of file fn_rand.hpp.
00104 { 00105 arma_extra_debug_sigprint(); 00106 00107 arma_type_check<is_Cube<cube_type>::value == false>::apply(); 00108 00109 return OpCube<cube_type,op_rand>(n_rows, n_cols, n_slices); 00110 }