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
compare the generated random numbers to stored precomuted ones,
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.
setVectorSeed, generateInitialization.