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

Random library should be based on <random>, not rand #79

Open
htiek opened this issue Jul 17, 2024 · 0 comments
Open

Random library should be based on <random>, not rand #79

htiek opened this issue Jul 17, 2024 · 0 comments

Comments

@htiek
Copy link
Collaborator

htiek commented Jul 17, 2024

The random-number generation facilities we provide are based on rand, which is known to be a low-quality random source. We should switch to using C++11's <random> library to generate random numbers.

(Rationale: In prototyping an assignment that involves generating random objects, the resulting distributions when outcomes depend on correlations between calls to randomInteger are non-uniform. Switching to using std::mt19937 and uniform_int_distribution fixed the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant