mercredi 20 janvier 2016

Portable C++11 random number distributions

I'm looking for a set of portable distributions for the standard C++11 engines like std::mt19937.

The engine implementations perform consistently (i.e. same sequence generated on different platforms – tested with Clang and MSVC), but the distributions seem to be implemented differently on the different platforms.

So, even though the engines produce the same sequence, it seems that a distribution (for example, std::normal_distribution<double>) does not use the same number of samples on the different platforms which is not acceptable in my case.

Is there maybe a 3rd party lib I can use that follows the C++11 random templates, but that will deliver consistent values across popular platforms (Looking at support across GCC, MSVC and Clang/llvm).

I need uniform, normal, poison and Rayleigh.




Aucun commentaire:

Enregistrer un commentaire