fn_randn.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 arma_inline
00024 const eOp<mat, eop_randn>
00025 randn(const u32 n_rows, const u32 n_cols)
00026 {
00027 arma_extra_debug_sigprint();
00028
00029 return eOp<mat, eop_randn>(n_rows, n_cols);
00030 }
00031
00032
00033
00034 arma_inline
00035 const eOpCube<cube, eop_cube_randn>
00036 randn(const u32 n_rows, const u32 n_cols, const u32 n_slices)
00037 {
00038 arma_extra_debug_sigprint();
00039
00040 return eOpCube<cube, eop_cube_randn>(n_rows, n_cols, n_slices);
00041 }
00042
00043
00044
00045 template<typename mat_type>
00046 arma_inline
00047 const eOp<mat_type, eop_randn>
00048 randn(const u32 n_rows, const u32 n_cols)
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 }
00056
00057
00058
00059 template<typename cube_type>
00060 arma_inline
00061 const eOpCube<cube_type, eop_cube_randn>
00062 randn(const u32 n_rows, const u32 n_cols, const u32 n_slices)
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 }
00070
00071
00072
00073
00074 arma_inline
00075 const eOp<colvec, eop_randn>
00076 randn(const u32 n_elem)
00077 {
00078 arma_extra_debug_sigprint();
00079
00080 return eOp<colvec, eop_randn>(n_elem, 1);
00081 }
00082
00083
00084
00085 template<typename vec_type>
00086 arma_inline
00087 const eOp<vec_type, eop_randn>
00088 randn(const u32 n_elem)
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 }
00103
00104
00105
00106