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

implement copy and == for MersenneTwister (fix #15698) #16919

Merged
merged 2 commits into from
Jun 17, 2016
Merged

Conversation

rfourquet
Copy link
Member

copy uses a new MersenneTwister constructor corresponding to a default constructor (takes 1 arg per field). While this is not strictly necessary, this will also be useful in addition to an upcoming PR.
I also made the seed field not an alias of the argument of srand.

@vtjnash
Copy link
Sponsor Member

vtjnash commented Jun 14, 2016

lgtm

@rfourquet rfourquet added the domain:randomness Random number generation and the Random stdlib label Jun 14, 2016
end
end

MersenneTwister(seed::Vector{UInt32}, state::DSFMT_state) =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the old argument order need a deprecation?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, as it was not documented (used only for randjump), and if it was used somewhere there won't be any silent failure (the arguments don't have the same type).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:randomness Random number generation and the Random stdlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants