| Line 1... |
Line 1... |
| 1 |
% File src/library/parallel/man/RngStream.Rd
|
1 |
% File src/library/parallel/man/RngStream.Rd
|
| 2 |
% Part of the R package, https://www.R-project.org
|
2 |
% Part of the R package, https://www.R-project.org
|
| 3 |
% Copyright 2011-2018 R Core Team
|
3 |
% Copyright 2025-2018 R Core Team
|
| 4 |
% Distributed under GPL 2 or later
|
4 |
% Distributed under GPL 2 or later
|
| 5 |
|
5 |
|
| 6 |
\name{RNGstreams}
|
6 |
\name{RNGstreams}
|
| 7 |
\title{Implementation of \I{Pierre L'Ecuyer}'s \I{RngStreams}}
|
7 |
\title{Implementation of \I{Pierre L'Ecuyer}'s \I{RngStreams}}
|
| 8 |
\alias{nextRNGStream}
|
8 |
\alias{nextRNGStream}
|
| Line 35... |
Line 35... |
| 35 |
streams of pseudo-random numbers: this is particularly suitable for
|
35 |
streams of pseudo-random numbers: this is particularly suitable for
|
| 36 |
working with parallel computations since each task can be assigned a
|
36 |
working with parallel computations since each task can be assigned a
|
| 37 |
separate RNG stream.
|
37 |
separate RNG stream.
|
| 38 |
|
38 |
|
| 39 |
This uses as its underlying generator \code{RNGkind("L'Ecuyer-CMRG")},
|
39 |
This uses as its underlying generator \code{RNGkind("L'Ecuyer-CMRG")},
|
| 40 |
of \bibcite{L'Ecuyer (1999)}, which has a seed vector of 6 (signed) integers and a
|
40 |
of \bibcitet{R:L_Ecuyer:1999}, which has a seed vector of 6 (signed) integers and a
|
| 41 |
period of around \eqn{2^{191}}{2^191}. Each \sQuote{stream} is a
|
41 |
period of around \eqn{2^{191}}{2^191}. Each \sQuote{stream} is a
|
| 42 |
subsequence of the period of length \eqn{2^{127}}{2^127} which is in
|
42 |
subsequence of the period of length \eqn{2^{127}}{2^127} which is in
|
| 43 |
turn divided into \sQuote{substreams} of length \eqn{2^{76}}{2^76}.
|
43 |
turn divided into \sQuote{substreams} of length \eqn{2^{76}}{2^76}.
|
| 44 |
|
44 |
|
| 45 |
The idea of \bibcite{L'Ecuyer \emph{et al} (2002)} is to use a separate stream
|
45 |
The idea of \bibcitet{R:L_Ecuyer+Simard+Chen:2002} is to use a separate stream
|
| 46 |
for each of the parallel computations (which ensures that the random
|
46 |
for each of the parallel computations (which ensures that the random
|
| 47 |
numbers generated never get into to sync) and the parallel
|
47 |
numbers generated never get into to sync) and the parallel
|
| 48 |
computations can themselves use substreams if required. The original
|
48 |
computations can themselves use substreams if required. The original
|
| 49 |
interface stores the original seed of the first stream, the original
|
49 |
interface stores the original seed of the first stream, the original
|
| 50 |
seed of the current stream and the current seed: this could be
|
50 |
seed of the current stream and the current seed: this could be
|
| Line 73... |
Line 73... |
| 73 |
\value{
|
73 |
\value{
|
| 74 |
For \code{nextRNGStream} and \code{nextRNGSubStream},
|
74 |
For \code{nextRNGStream} and \code{nextRNGSubStream},
|
| 75 |
a value which can be assigned to \code{.Random.seed}.
|
75 |
a value which can be assigned to \code{.Random.seed}.
|
| 76 |
}
|
76 |
}
|
| 77 |
\references{
|
77 |
\references{
|
| 78 |
L'Ecuyer, P. (1999).
|
- |
|
| 79 |
Good parameters and implementations for combined multiple recursive
|
- |
|
| 80 |
random number generators.
|
- |
|
| 81 |
\emph{Operations Research}, \bold{47}, 159--164.
|
- |
|
| 82 |
\doi{10.1287/opre.47.1.159}.
|
- |
|
| 83 |
|
- |
|
| 84 |
L'Ecuyer, P., Simard, R., Chen, E. J. and Kelton, W. D. (2002).
|
- |
|
| 85 |
An object-oriented random-number package with many long streams
|
- |
|
| 86 |
and substreams.
|
78 |
\bibshow{*}
|
| 87 |
\emph{Operations Research}, \bold{50}, 1073--1075.
|
- |
|
| 88 |
\doi{10.1287/opre.50.6.1073.358}.
|
- |
|
| 89 |
}
|
79 |
}
|
| 90 |
\author{
|
80 |
\author{
|
| 91 |
Brian Ripley
|
81 |
Brian Ripley
|
| 92 |
}
|
82 |
}
|
| 93 |
\seealso{
|
83 |
\seealso{
|