1

Since C++11, the C++ standard library contains high-quality facilities for random number generation, divided into engines (things that produce random bits) and random distributions and algorithms that are driven by a user-provided engine.

Some of the engines are deterministic, so that with a given seed they are specified to produce a particular sequence of random bits. But this is not enough to produce portable software that has the same pseudo-random behaviour everywhere given the same random seed. The details of the random distributions (e.g. uniform_int_distribution, chi_squared_distribution, etc.) and of algorithms (such as shuffle) are not specified, and thus may produce different results on different platforms.

I would like random distributions and algorithms that are deterministic and reproducible, ideally using a C++11 random number engine as the source of randomness. Does a library like that exist?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.