search for: sample_wrapper

Displaying 5 results from an estimated 5 matches for "sample_wrapper".

2020 Jul 30
2
Seeding non-R RNG with numbers from R's RNG stream
...rnal RNG stream to seed an RNG external to R? Many thanks in advance. This relates to a Stackoverflow question here: https://stackoverflow.com/questions/63165955/is-there-a-best-practice-for-using-non-r-rngs-in-rcpp-code Pseudocode of a trivial facsimile of my current approach is below. --Tommy sample_wrapper <- function() { # initialize a variable to pass to C++ init_var <- runif(1) # get current state of RNG stream # first entry of .Random.seed is an integer representing the algorithm used # second entry is current position in RNG stream # subsequent entries are pseudorandom numbers...
2020 Jul 30
3
Seeding non-R RNG with numbers from R's RNG stream
...his relates to a Stackoverflow question here: > > > https://stackoverflow.com/questions/63165955/is-there-a-best-practice-for-using-non-r-rngs-in-rcpp-code > > > > Pseudocode of a trivial facsimile of my current approach is below. > > > > --Tommy > > > > sample_wrapper <- function() { > > # initialize a variable to pass to C++ > > init_var <- runif(1) > > > > # get current state of RNG stream > > # first entry of .Random.seed is an integer representing the > algorithm used > > # second entry is current p...
2020 Jul 30
0
Seeding non-R RNG with numbers from R's RNG stream
...Many thanks in advance. > > This relates to a Stackoverflow question here: > https://stackoverflow.com/questions/63165955/is-there-a-best-practice-for-using-non-r-rngs-in-rcpp-code > > Pseudocode of a trivial facsimile of my current approach is below. > > --Tommy > > sample_wrapper <- function() { > # initialize a variable to pass to C++ > init_var <- runif(1) > > # get current state of RNG stream > # first entry of .Random.seed is an integer representing the algorithm used > # second entry is current position in RNG stream > # su...
2020 Jul 30
0
Seeding non-R RNG with numbers from R's RNG stream
...here: > > > https://stackoverflow.com/questions/63165955/is-there-a-best-practice-for-using-non-r-rngs-in-rcpp-code > > > > Pseudocode of a trivial facsimile of my current approach is below. > > > > --Tommy > > > > sample_wrapper <- function() { > >? ? # initialize a variable to pass to C++ > >? ? init_var <- runif(1) > > > >? ? # get current state of RNG stream > >? ? # first entry of .Random.seed is an integer representing the > algorithm used > &...
2020 Jul 30
2
Seeding non-R RNG with numbers from R's RNG stream
...https://stackoverflow.com/questions/63165955/is-there-a-best-practice-for-using-non-r-rngs-in-rcpp-code > > > > > > Pseudocode of a trivial facsimile of my current approach is below. > > > > > > --Tommy > > > > > > sample_wrapper <- function() { > > > # initialize a variable to pass to C++ > > > init_var <- runif(1) > > > > > > # get current state of RNG stream > > > # first entry of .Random.seed is an integer representing the > >...