powered by
Basic vectorized implementation of the linear congruential generator for simulating uniform random numbers on the interval (0, 1).
rngV(n, seed, par)
a vector of n uniform random numbers
numeric: number of variates to generate.
numeric: initial seed.
an integer vector containing parameters for the generator: a, cc, m, L.
Anderson, S.L. (1990) Random number generators on vector supercomputers and other advanced architectures. SIAM Review, 32(2):221-251.
x <- rngV(1000, 6976, c(171, 0, 30269, 10)) summary(x)
Run the code above in your browser using DataLab