forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial work on a framework for having multiple RNGs in the future.
Make RNG state available through rand. julia> r = Rng_MT(uint32(0)); julia> rand(r) 0.030581026769374464 julia> srand(r, uint32(0)) julia> rand(r) 0.030581026769374464 Also, iteration is possible for Rng objects. julia> r = Rng_MT(uint32(0), 5); julia> for i = r; println(i); end 0.030581026769374464 0.2131403200670121 0.29900252501600133 0.38113885304462825 0.8634883970635943
- Loading branch information
Viral B. Shah
committed
Sep 25, 2012
1 parent
484e2d2
commit 68049d4
Showing
2 changed files
with
65 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters