RcppParallel
RcppParallel copied to clipboard
How to set random seed using RcppParallel and RcppArmadillo to permutation
Good Day
I am using RcppParallel and the shuffle function of RcppArmadillo to shuffle vec, But the result is not repeatable even I used the set.seed of R or the withr::with_seed or arma::set_seed in the C++ codes. To be reproducible, is there a function like set.seed of R base to do this? Thank you.
Dealing with RNG's in parallel is a non-trivial tasks. As such, I would look at the library dqrng here: https://github.com/daqana/dqrng