search for: user_unif_init

Displaying 2 results from an estimated 2 matches for "user_unif_init".

2007 Sep 23
0
initial scrambling of seed in do_setseed / RNG_Init
...0 iterations of seed = (69069 * seed + 1) */ + seed = (1100682473U * seed + 2358491998U); switch(kind) { case WICHMANN_HILL: case MARSAGLIA_MULTICARRY: Let me add also the following remark. The help(Random.user) page says Optionally, the user can supply the entry point 'user_unif_init', which is called with an 'unsigned int' argument when 'RNGkind' (or 'set.seed') is called, and is intended to be used to initialize the user's RNG code. The argument is intended to be used to set the "seeds"; it is the 'seed' ar...
2009 Jul 30
3
user supplied random number generators
..._seedloc} can be supplied which are called with no arguments and should return pointers to the number of seeds and to an integer array of seeds. Calls to \code{GetRNGstate} and \code{PutRNGstate} will then copy this array to and from \code{.Random.seed}. And it offers as an example void user_unif_init(Int32 seed_in) { seed = seed_in; } int * user_unif_nseed() { return &nseed; } int * user_unif_seedloc() { return (int *) &seed; } First question: what is the lifetime of the buffers pointed to by the user_unif-* functions, and who is responsible for cleaning them up? In the help file...