Displaying 4 results from an estimated 4 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...
2024 Jul 15
1
Minor inconsistencies in tools:::funAPI()
...compact (but still brittle) way to match function
declarations in C header files is shown at the end of this message. I
have confirmed that compared to tools:::getFunsHdr, the only extraneous
symbols that it finds in preprocessed headers are "R_SetWin32",
"user_unif_rand", "user_unif_init", "user_unif_nseed",
"user_unif_seedloc" "user_norm_rand", which are special-cased in
tools:::getFunsHdr, and the only symbols it doesn't find are "select"
and "delztg" in R_ext/Lapack.h, which we should not be finding.
# "Bird's...
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...
2024 Jul 29
1
Minor inconsistencies in tools:::funAPI()
...rittle) way to match function
> declarations in C header files is shown at the end of this message. I
> have confirmed that compared to tools:::getFunsHdr, the only extraneous
> symbols that it finds in preprocessed headers are "R_SetWin32",
> "user_unif_rand", "user_unif_init", "user_unif_nseed",
> "user_unif_seedloc" "user_norm_rand", which are special-cased in
> tools:::getFunsHdr, and the only symbols it doesn't find are "select"
> and "delztg" in R_ext/Lapack.h, which we should not be finding.
>...