| Line 2... |
Line 2... |
| 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 2011-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 Pierre L'Ecuyer's RngStreams}
|
| 7 |
\alias{nextRNGStream}
|
8 |
\alias{nextRNGStream}
|
| 8 |
\alias{nextRNGSubStream}
|
9 |
\alias{nextRNGSubStream}
|
| 9 |
\alias{clusterSetRNGStream}
|
10 |
\alias{clusterSetRNGStream}
|
| 10 |
\alias{mc.reset.stream}
|
11 |
\alias{mc.reset.stream}
|
| 11 |
|
12 |
|
| 12 |
\title{Implementation of Pierre L'Ecuyer's RngStreams}
|
- |
|
| 13 |
\description{
|
13 |
\description{
|
| 14 |
This is an \R re-implementation of Pierre L'Ecuyer's \sQuote{RngStreams}
|
14 |
This is an \R re-implementation of Pierre L'Ecuyer's \sQuote{RngStreams}
|
| 15 |
multiple streams of pseudo-random numbers.
|
15 |
multiple streams of pseudo-random numbers.
|
| 16 |
}
|
16 |
}
|
| 17 |
\usage{
|
17 |
\usage{
|
| Line 54... |
Line 54... |
| 54 |
\code{clusterSetRNGStream} selects the \code{"L'Ecuyer-CMRG"} RNG and
|
54 |
\code{clusterSetRNGStream} selects the \code{"L'Ecuyer-CMRG"} RNG and
|
| 55 |
then distributes streams to the members of a cluster, optionally
|
55 |
then distributes streams to the members of a cluster, optionally
|
| 56 |
setting the seed of the streams by \code{set.seed(iseed)} (otherwise
|
56 |
setting the seed of the streams by \code{set.seed(iseed)} (otherwise
|
| 57 |
they are set from the current seed of the master process: after
|
57 |
they are set from the current seed of the master process: after
|
| 58 |
selecting the L'Ecuyer generator).
|
58 |
selecting the L'Ecuyer generator).
|
| 59 |
#ifdef unix
|
- |
|
| 60 |
|
59 |
|
| 61 |
Calling \code{mc.reset.stream()} after setting the L'Ecuyer random
|
60 |
When not on Windows, Calling \code{mc.reset.stream()} after setting
|
| 62 |
number generator and seed makes runs from
|
61 |
the L'Ecuyer random number generator and seed makes runs from
|
| 63 |
\code{\link{mcparallel}(mc.set.seed = TRUE)} reproducible. This is
|
62 |
\code{\link{mcparallel}(mc.set.seed = TRUE)} reproducible. This is
|
| 64 |
done internally in \code{\link{mclapply}} and \code{\link{pvec}}.
|
63 |
done internally in \code{\link{mclapply}} and \code{\link{pvec}}.
|
| 65 |
(Note that it does not set the seed in the master process, so does not
|
64 |
(Note that it does not set the seed in the master process, so does not
|
| 66 |
affect the fallback-to-serial versions of these functions.)
|
65 |
affect the fallback-to-serial versions of these functions.)
|
| 67 |
#endif
|
- |
|
| 68 |
}
|
66 |
}
|
| 69 |
\value{
|
67 |
\value{
|
| 70 |
For \code{nextRNGStream} and \code{nextRNGSubStream},
|
68 |
For \code{nextRNGStream} and \code{nextRNGSubStream},
|
| 71 |
a value which can be assigned to \code{.Random.seed}.
|
69 |
a value which can be assigned to \code{.Random.seed}.
|
| 72 |
}
|
70 |
}
|