Generate random numbers using C++14 <random>. See Random Number Generation in C++11 for an accurate explanation of the rationale behind this library.

The short story is that engines abstract the mechanism for generating randomness (algorithm, hardware device, hamster in a training wheel) and distributions abstract the implementation of the mathematical notion (uniform, normal, Poisson, etc.). The functions RANDOM.BOOL, RANDOM.INT, and RANDOM.DOUBLE are used to generate random variates of the appropriate type from a distribution and engine.

Last edited Jan 1, 2015 at 7:53 PM by keithalewis, version 7