fn_randperm.hpp (armadillo-10.8.2.tar.xz) | : | fn_randperm.hpp (armadillo-11.0.0.tar.xz) | ||
---|---|---|---|---|
skipping to change at line 31 | skipping to change at line 31 | |||
template<typename obj_type> | template<typename obj_type> | |||
inline | inline | |||
void | void | |||
internal_randperm_helper(obj_type& x, const uword N, const uword N_keep) | internal_randperm_helper(obj_type& x, const uword N, const uword N_keep) | |||
{ | { | |||
arma_extra_debug_sigprint(); | arma_extra_debug_sigprint(); | |||
typedef typename obj_type::elem_type eT; | typedef typename obj_type::elem_type eT; | |||
// see op_sort_index_bones.hpp for the definition of arma_sort_index_packet | // see op_sort_index_bones.hpp for the definition of arma_sort_index_packet | |||
// and the associated comparison functor | ||||
typedef arma_sort_index_packet<int> packet; | typedef arma_sort_index_packet<int> packet; | |||
std::vector<packet> packet_vec(N); | std::vector<packet> packet_vec(N); | |||
for(uword i=0; i < N; ++i) | for(uword i=0; i < N; ++i) | |||
{ | { | |||
packet_vec[i].val = int(arma_rng::randi<int>()); | packet_vec[i].val = int(arma_rng::randi<int>()); | |||
packet_vec[i].index = i; | packet_vec[i].index = i; | |||
} | } | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 1 lines changed or added |