I am using the random number generator from the Armadillo C++ library from R. Armadillo allows high-perfomance computation of matrices and vectors. However, I can't see which random number generator it is actually implementing.
What is the random number generator that Rcpp Armadillo uses exactly?
"For C++98, the system library RNG is used." - The system library RNG is
std::rand()
, although it seems as though RcppArmadillo uses the RNG from R as a fallback (when C++11 is not selected so the C++11-based RNG is unavailable) which avoids using the older C++98-basedstd::rand()
.1"For C++11, the RNG included in its library is used." - This is referring to the C++11
<random>
library.On the other hand, also consider this comment in RcppArmadilloForward.h:
which turns on the R RNGs as an engine for RcppArmadillo.
1 R-bloggers | RcppArmadillo 0.4.450.1.0