The uniform distribution for MPFR. More...
|void||operator() (MPFRRandom< bits > &t, gmp_randstate_t r) const|
|int||operator() (mpfr_t val, gmp_randstate_t r, mpfr_rnd_t round) const|
The uniform distribution for MPFR.
This is just a thin layer on top of MPFRRandom to provide random numbers uniformly distributed in [0,1].
This class uses a mutable private object. So a single MPFRUniform object cannot safely be used by multiple threads. In a multi-processing environment, each thread should use a thread-specific MPFRUniform object.
|bits||the number of bits in each digit.|
Sample from the uniform distribution in [0,1] returning a MPFRRandom. This function takes an unused GMP random generator as a parameter, in order to parallel the usage of MPFRExponential and MPFRNormal.
|[out]||t||the MPFRRandom result.|
|[in,out]||r||a GMP random generator (unused).|
Sample from the uniform distribution in [0,1].
|[out]||val||the sample from the uniform distribution|
|[in,out]||r||a GMP random generator.|
|[in]||round||the rounding direction.|