RandomLib
1.10
|
The normal distribution for MPFR. More...
#include <RandomLib/MPFRNormal.hpp>
Public Member Functions | |
MPFRNormal () | |
~MPFRNormal () | |
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 normal distribution for MPFR.
This is a transcription of ExactNormal (version 1.3) for use with MPFR.
This class uses mutable private objects. So a single MPFRNormal object cannot safely be used by multiple threads. In a multi-processing environment, each thread should use a thread-specific MPFRNormal object.
bits | the number of bits in each digit. |
Definition at line 33 of file MPFRNormal.hpp.
|
inline |
Initialize the MPFRNormal object.
Definition at line 39 of file MPFRNormal.hpp.
|
inline |
Destroy the MPFRNormal object.
Definition at line 43 of file MPFRNormal.hpp.
|
inline |
Sample from the normal distribution with mean 0 and variance 1 returning a MPFRRandom.
[out] | t | the MPFRRandom result. |
[in,out] | r | a GMP random generator. |
Definition at line 51 of file MPFRNormal.hpp.
|
inline |
Sample from the normal distribution with mean 0 and variance 1.
[out] | val | the sample from the normal distribution |
[in,out] | r | a GMP random generator. |
[in] | round | the rounding direction. |
Definition at line 62 of file MPFRNormal.hpp.