| Line 81... |
Line 81... |
| 81 |
The two seeds are the Tausworthe and congruence long integers,
|
81 |
The two seeds are the Tausworthe and congruence long integers,
|
| 82 |
respectively. A one-to-one mapping to S's \code{.Random.seed[1:12]}
|
82 |
respectively. A one-to-one mapping to S's \code{.Random.seed[1:12]}
|
| 83 |
is possible but we will not publish one, not least as this generator
|
83 |
is possible but we will not publish one, not least as this generator
|
| 84 |
is \bold{not} exactly the same as that in recent versions of S-PLUS.}
|
84 |
is \bold{not} exactly the same as that in recent versions of S-PLUS.}
|
| 85 |
|
85 |
|
| 86 |
\item{\code{"Mersenne-Twister":}}{
|
86 |
\item{\code{"Mersenne-Twister"}:}{
|
| 87 |
From Matsumoto and Nishimura (1998). A twisted GFSR with period
|
87 |
From Matsumoto and Nishimura (1998). A twisted GFSR with period
|
| 88 |
\eqn{2^{19937} - 1}{2^19937 - 1} and equidistribution in 623
|
88 |
\eqn{2^{19937} - 1}{2^19937 - 1} and equidistribution in 623
|
| 89 |
consecutive dimensions (over the whole period). The \sQuote{seed} is a
|
89 |
consecutive dimensions (over the whole period). The \sQuote{seed} is a
|
| 90 |
624-dimensional set of 32-bit integers plus a current position in
|
90 |
624-dimensional set of 32-bit integers plus a current position in
|
| 91 |
that set.
|
91 |
that set.
|
| 92 |
}
|
92 |
}
|
| 93 |
|
93 |
|
| 94 |
\item{\code{"Knuth-TAOCP-2002":}}{
|
94 |
\item{\code{"Knuth-TAOCP-2002"}:}{
|
| 95 |
A 32-bit integer GFSR using lagged Fibonacci sequences with
|
95 |
A 32-bit integer GFSR using lagged Fibonacci sequences with
|
| 96 |
subtraction. That is, the recurrence used is
|
96 |
subtraction. That is, the recurrence used is
|
| 97 |
\deqn{X_j = (X_{j-100} - X_{j-37}) \bmod 2^{30}%
|
97 |
\deqn{X_j = (X_{j-100} - X_{j-37}) \bmod 2^{30}%
|
| 98 |
}{X[j] = (X[j-100] - X[j-37]) mod 2^30}
|
98 |
}{X[j] = (X[j-100] - X[j-37]) mod 2^30}
|
| 99 |
and the \sQuote{seed} is the set of the 100 last numbers (actually
|
99 |
and the \sQuote{seed} is the set of the 100 last numbers (actually
|
| 100 |
recorded as 101 numbers, the last being a cyclic shift of the
|
100 |
recorded as 101 numbers, the last being a cyclic shift of the
|
| 101 |
buffer). The period is around \eqn{2^{129}}{2^129}.
|
101 |
buffer). The period is around \eqn{2^{129}}{2^129}.
|
| 102 |
}
|
102 |
}
|
| 103 |
|
103 |
|
| 104 |
\item{\code{"Knuth-TAOCP":}}{
|
104 |
\item{\code{"Knuth-TAOCP"}:}{
|
| 105 |
An earlier version from Knuth (1997).
|
105 |
An earlier version from Knuth (1997).
|
| 106 |
|
106 |
|
| 107 |
The 2002 version was not backwards compatible with the earlier
|
107 |
The 2002 version was not backwards compatible with the earlier
|
| 108 |
version: the initialization of the GFSR from the seed was altered.
|
108 |
version: the initialization of the GFSR from the seed was altered.
|
| 109 |
\R did not allow you to choose consecutive seeds, the reported
|
109 |
\R did not allow you to choose consecutive seeds, the reported
|
| 110 |
\sQuote{weakness}, and already scrambled the seeds.
|
110 |
\sQuote{weakness}, and already scrambled the seeds.
|
| 111 |
|
111 |
|
| 112 |
Initialization of this generator is done in interpreted \R code
|
112 |
Initialization of this generator is done in interpreted \R code
|
| 113 |
and so takes a short but noticeable time.
|
113 |
and so takes a short but noticeable time.
|
| 114 |
}
|
114 |
}
|
| 115 |
\item{\code{"L'Ecuyer-CMRG":}}{
|
115 |
\item{\code{"L'Ecuyer-CMRG"}:}{
|
| 116 |
A \sQuote{combined multiple-recursive generator} from L'Ecuyer
|
116 |
A \sQuote{combined multiple-recursive generator} from L'Ecuyer
|
| 117 |
(1999), each element of which is a feedback multiplicative
|
117 |
(1999), each element of which is a feedback multiplicative
|
| 118 |
generator with three integer elements: thus the seed is a (signed)
|
118 |
generator with three integer elements: thus the seed is a (signed)
|
| 119 |
integer vector of length 6. The period is around
|
119 |
integer vector of length 6. The period is around
|
| 120 |
\eqn{2^{191}}{2^191}.
|
120 |
\eqn{2^{191}}{2^191}.
|
| Line 127... |
Line 127... |
| 127 |
This is not particularly interesting of itself, but provides the
|
127 |
This is not particularly interesting of itself, but provides the
|
| 128 |
basis for the multiple streams used in package \pkg{parallel}.
|
128 |
basis for the multiple streams used in package \pkg{parallel}.
|
| 129 |
% See \code{\link{RngStream}}.
|
129 |
% See \code{\link{RngStream}}.
|
| 130 |
}
|
130 |
}
|
| 131 |
|
131 |
|
| 132 |
\item{\code{"user-supplied":}}{
|
132 |
\item{\code{"user-supplied"}:}{
|
| 133 |
Use a user-supplied generator. See \code{\link{Random.user}} for
|
133 |
Use a user-supplied generator. See \code{\link{Random.user}} for
|
| 134 |
details.
|
134 |
details.
|
| 135 |
}
|
135 |
}
|
| 136 |
}
|
136 |
}
|
| 137 |
|
137 |
|