rngSetSeed-package {rngSetSeed} | R Documentation |
Seeding the Default RNG with a Numeric Vector
Description
The function setVectorSeed(vseed)
is provided, which allows to
initialize the R base Mersenne-Twister random number generator using
a numeric vector vseed
of an arbitrary nonzero length. The
transformation of vseed
into the initial state of Mersenne-Twister
is computed using AES (Advanced Encryption Standard). The precise
algorithm is described in generateInitialization
.
The directory "rngSetSeed/tests" contains tests, which
- (1)
compare the generated random numbers to stored precomuted ones,
- (2)
compare the initial states obtained using AES in C-level functions with initial states obtained using a (slow) implementation of AES in R-level functions included for test purposes.
See Also
setVectorSeed, generateInitialization.
[Package rngSetSeed version 0.3-3 Index]