RandomLib
1.10
|
The exponential distribution for MPFR (the log method). More...
#include <RandomLib/MPFRExponentialL.hpp>
Public Member Functions | |
MPFRExponentialL () | |
~MPFRExponentialL () | |
int | operator() (mpfr_t val, gmp_randstate_t r, mpfr_rnd_t round) const |
The exponential distribution for MPFR (the log method).
This class is DEPRECATED. It is included for illustrative purposes only. The MPFRExponential class provides a much more efficient method for sampling from the exponential distribution.
This is an adaption of ExponentialDistribution to MPFR. The changes are
This class uses mutable private objects. So a single MPFRExponentialL object cannot safely be used by multiple threads. In a multi-processing environment, each thread should use a thread-specific MPFRExponentialL object.
Definition at line 42 of file MPFRExponentialL.hpp.
|
inline |
Initialize the MPFRExponentialL object.
Definition at line 51 of file MPFRExponentialL.hpp.
|
inline |
Destroy the MPFRExponentialL object.
Definition at line 60 of file MPFRExponentialL.hpp.
|
inline |
Sample from the exponential distribution with mean 1.
[out] | val | the sample from the exponential distribution |
[in,out] | r | a GMP random generator. |
[in] | round | the rounding direction. |
Definition at line 75 of file MPFRExponentialL.hpp.