rearrange
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user