|
RandomLib
1.10
|
The exponential distribution for MPFR. More...
#include <RandomLib/MPFRExponential.hpp>
Public Member Functions | |
| MPFRExponential () | |
| 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 exponential distribution for MPFR.
This is a transcription of ExactExponential (version 1.4) for use with MPFR.
This class uses mutable private objects. So a single MPFRExponential object cannot safely be used by multiple threads. In a multi-processing environment, each thread should use a thread-specific MPFRExponential object.
| bits | the number of bits in each digit. |
Definition at line 34 of file MPFRExponential.hpp.
|
inline |
Initialize the MPFRExponential object.
Definition at line 40 of file MPFRExponential.hpp.
|
inline |
Sample from the exponential distribution with mean 1 returning a MPFRRandom.
| [out] | t | the MPFRRandom result. |
| [in,out] | r | a GMP random generator. |
Definition at line 48 of file MPFRExponential.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 59 of file MPFRExponential.hpp.
1.8.6