@@ -213,25 +213,19 @@ function make_seed(n::Integer)
213
213
end
214
214
end
215
215
216
- function make_seed (filename:: AbstractString , n:: Integer )
217
- read! (filename, Array {UInt32} (Int (n)))
218
- end
219
-
220
216
# # srand()
221
217
222
218
"""
223
- srand([rng=GLOBAL_RNG], [ seed] ) -> rng
224
- srand([rng=GLOBAL_RNG], filename, n=4 ) -> rng
219
+ srand([rng=GLOBAL_RNG], seed) -> rng
220
+ srand([rng=GLOBAL_RNG]) -> rng
225
221
226
222
Reseed the random number generator. If a `seed` is provided, the RNG will give a
227
223
reproducible sequence of numbers, otherwise Julia will get entropy from the system. For
228
- `MersenneTwister`, the `seed` may be a non-negative integer, a vector of `UInt32` integers
229
- or a filename, in which case the seed is read from a file (`4n` bytes are read from the file,
230
- where `n` is an optional argument). `RandomDevice` does not support seeding.
224
+ `MersenneTwister`, the `seed` may be a non-negative integer or a vector of `UInt32` integers.
225
+ `RandomDevice` does not support seeding.
231
226
"""
232
227
srand (r:: MersenneTwister ) = srand (r, make_seed ())
233
228
srand (r:: MersenneTwister , n:: Integer ) = srand (r, make_seed (n))
234
- srand (r:: MersenneTwister , filename:: AbstractString , n:: Integer = 4 ) = srand (r, make_seed (filename, n))
235
229
236
230
237
231
function dsfmt_gv_srand ()
@@ -250,11 +244,6 @@ function srand(seed::Union{Integer, Vector{UInt32}})
250
244
dsfmt_gv_srand ()
251
245
end
252
246
253
- function srand (filename:: AbstractString , n:: Integer = 4 )
254
- srand (GLOBAL_RNG, filename, n)
255
- dsfmt_gv_srand ()
256
- end
257
-
258
247
# # Global RNG
259
248
260
249
const GLOBAL_RNG = MersenneTwister (0 )
0 commit comments