Function vector_shuffle¶
-
template<class vec_t, class data_t>
void o2scl::vector_shuffle(rng<> &r, size_t n, vec_t &data)¶ Shuffle the first
nelements of vectordata.Note
This function is based on the GSL function
gsl_ran_shuffle()inrandist/shuffle.c.Note
This function works only on vector types which guarantee adjacent storage, such as
vector<double>.Note
If
nis 0, this function silently does nothing.