Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set random seed using RcppParallel and RcppArmadillo to permutation #205

Open
xiangpin opened this issue Oct 25, 2023 · 1 comment

Comments

@xiangpin
Copy link

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.

@jwood000
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants