search for: init_var

Displaying 6 results from an estimated 6 matches for "init_var".

2020 Jul 30
2
Seeding non-R RNG with numbers from R's RNG stream
...elates 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 seed_pos <- .Random.seed[2] seed <- .Random.seed[seed_pos +...
2020 Jul 30
3
Seeding non-R RNG with numbers from R's RNG stream
...165955/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
0
Seeding non-R RNG with numbers from R's RNG stream
...ttps://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 > seed_pos <- .Random.seed[2] &g...
2020 Jul 30
0
Seeding non-R RNG with numbers from R's RNG stream
...g-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 pseu...
2020 Jul 30
2
Seeding non-R RNG with numbers from R's RNG stream
...> > > > 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 > > >...
2006 Jun 19
3
Strange behavior of :through association.
...s.rb:876:in `new'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations.rb:876:in `hosts'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/associations.rb:871:in `hosts'' #{RAILS_ROOT}/app/controllers/tinklo_controller.rb:17:in `init_vars'' #{RAILS_ROOT}/app/controllers/tinklo_controller.rb:3:in `index'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `send'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/base.rb:910:in `perform_action_without_filters...