rearrange

This commit is contained in:
conrad
2022-05-26 16:51:43 +10:00
parent 4a69f4f191
commit b21af3e932
+4 -4
View File
@@ -42,8 +42,6 @@ randi(const uword n_rows, const uword n_cols, const distr_param& param = distr_p
arma_debug_check( (n_rows != 1), "randi(): incompatible size" );
}
obj_type out(n_rows, n_cols, arma_nozeros_indicator());
int a;
int b;
@@ -66,6 +64,8 @@ randi(const uword n_rows, const uword n_cols, const distr_param& param = distr_p
arma_debug_check( (a > b), "randi(): incorrect distribution parameters: a must be less than b" );
obj_type out(n_rows, n_cols, arma_nozeros_indicator());
arma_rng::randi<eT>::fill(out.memptr(), out.n_elem, a, b);
return out;
@@ -198,8 +198,6 @@ randi(const uword n_rows, const uword n_cols, const uword n_slices, const distr_
typedef typename cube_type::elem_type eT;
cube_type out(n_rows, n_cols, n_slices, arma_nozeros_indicator());
int a;
int b;
@@ -222,6 +220,8 @@ randi(const uword n_rows, const uword n_cols, const uword n_slices, const distr_
arma_debug_check( (a > b), "randi(): incorrect distribution parameters: a must be less than b" );
cube_type out(n_rows, n_cols, n_slices, arma_nozeros_indicator());
arma_rng::randi<eT>::fill(out.memptr(), out.n_elem, a, b);
return out;