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

Make the global RNG a Julia global variable instead of a libdSFMT variable #8399

Closed
wants to merge 4 commits into from

Commits on Sep 17, 2014

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

    MersenneTwister's constructor making an instance with an Uint32 seed
    were 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 Sep 17, 2014
    Configuration menu
    Copy the full SHA
    aeeebc2 View commit details
    Browse the repository at this point in the history
  2. make srand behave as the manual pretended

    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 Sep 17, 2014
    Configuration menu
    Copy the full SHA
    fad8b9d View commit details
    Browse the repository at this point in the history
  3. add more methods rand(rng, ...)

    And similarly for rand!, randbool.
    Fixes JuliaLang#8360.
    rfourquet committed Sep 17, 2014
    Configuration menu
    Copy the full SHA
    8f8e43d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7126d7f View commit details
    Browse the repository at this point in the history