[R-pkg-devel] R-extension requirement about third-party random number generators (RNG)
Kasper Daniel Hansen
k@@perd@n|e|h@n@en @end|ng |rom gm@||@com
Fri Sep 27 17:22:19 CEST 2024
John,
Your post does not have many details but why do you think that
instantiating 4 instances of the Mersenne Twister will keep the streams
independent? It is possible to get independent streams, but it will need
more work.
Best,
Kasper
On Fri, Sep 27, 2024 at 11:17 AM Dirk Eddelbuettel <edd using debian.org> wrote:
>
> On 27 September 2024 at 16:58, John Clarke wrote:
> | [...] -- the RNG state management strategy appears almost 'magical' to me
> | especially inside RCPP. It is possible, I just don't understand how to
> use it.
>
> See Section 6.3 of WRE: The pair of GetRNGstate() and PutRNGstate() is all
> there is in terms of an interface, and all we call (and old-school macros
> ensure it ends in the generated glue code Rcpp produces for you). Pretty
> much
> everything else around RNGSs is (quite) opaque (as Section 6.3 states) and
> Rcpp does not go there.
>
> Cheers, Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
--
Best,
Kasper
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list