Learn R Programming

rlecuyer (version 0.3-8)

AdvanceState: Advance the state of a stream

Description

.lec.AdvanceState advances the state of a stream by \(n\) steps (see bellow).

Usage

.lec.AdvanceState (name, e, c)

Value

None.

Arguments

name

name of the stream.

e, c

if \(e > 0\) then \(n = 2^e + c\); if \(e < 0\) then \(n = -2^{-e} + c\); if \(e = 0\) then \(n = c.\)

Details

.lec.AdvanceState is a wrapper function for the C function RngStream_AdvanceState (L'Ecuyer et al, 2002).

References

P. L'Ecuyer, R. Simard, E.J.Chen and W.D.Kelton: An Object-Oriented Random-Number Package With Many Long Streams and Substreams; Operations Research, vol. 50, nr. 6, 2002.