Skip to content

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

Description

@htiek

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions