Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more methods working with a non-global RNG #8854

Merged
merged 3 commits into from
Nov 1, 2014
Merged

more methods working with a non-global RNG #8854

merged 3 commits into from
Nov 1, 2014

Commits on Oct 30, 2014

  1. make the seed of a MersenneTwister be always a Vector{Uint32}

    MersenneTwister's constructor making an instance with an Uint32 seed
    was removed in commit 4fb4622. But a subsequent call to
    srand(r::MersenneTwister, seed) would only accept an Uint32 as a seed,
    and would always make r.seed an Uint32; this was not consistent.
    rfourquet committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    bd5544c View commit details
    Browse the repository at this point in the history
  2. add more methods srand(::MersenneTwister, ...)

    The srand methods working on a MersenneTwister instance did not catch
    up with those working on the global RNG. They are now made similar
    thanks to the make_seed function, which implements the different
    logics.
    Also, the manual is more precise on the types of valid seeds.
    rfourquet committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    876d2dd View commit details
    Browse the repository at this point in the history
  3. add more methods rand(rng, ...)

    And similarly for rand!, randbool.
    Fixes #8360.
    rfourquet committed Oct 30, 2014
    Configuration menu
    Copy the full SHA
    a1e4bac View commit details
    Browse the repository at this point in the history