rngV {MiscMath} | R Documentation |
Vectorized Congruential Random Number Generator
Description
Basic vectorized implementation of the linear congruential generator for simulating uniform random numbers on the interval (0, 1).
Usage
rngV(n, seed, par)
Arguments
n |
numeric: number of variates to generate. |
seed |
numeric: initial seed. |
par |
an integer vector containing parameters for the generator: a, cc, m, L. |
Value
a vector of n uniform random numbers
References
Anderson, S.L. (1990) Random number generators on vector supercomputers and other advanced architectures. SIAM Review, 32(2):221-251.
Examples
x <- rngV(1000, 6976, c(171, 0, 30269, 10))
summary(x)
[Package MiscMath version 1.1 Index]