This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

where are the implementations for <random>?


Hello,

I thought that with the facilities from <random> we had good and
well-defined ones -- but alas, only recently I realised that only say
the Mersenne twister is well-defined in the standard, but roughly
everything else is up to the implementer.

Since reproducibility is crucial for us (as with most scientific
applications), thus we need to implement ourselves the algorithms for

1. std::seed_seq
2. std::uniform_int_distribution
3. std::bernoulli_distribution (only for default p=0.5).

Easiest would be to copy (and specialise) the gcc-implementations.
I searched for it in the source-code, but couldn't find it:

Where do I find the implementations for <random> ?

Thanks for your help!

Oliver


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]