25 #include <queso/RngCXX11.h>
27 #ifdef QUESO_HAVE_CXX11
34 m_rng((unsigned int)m_seed)
53 std::uniform_real_distribution<double> d(0.0, 1.0);
60 std::normal_distribution<double> d(0.0, stdDev);
67 std::gamma_distribution<double> d1(alpha, 1.0);
68 std::gamma_distribution<double> d2(beta, 1.0);
81 std::gamma_distribution<double> d(a, b);
87 #endif // QUESO_HAVE_CXX11
virtual void resetSeed(int newSeed)
Resets the seed with value newSeed.
double gaussianSample(double stdDev) const
RngCXX11()
Default Constructor: it should not be used.
Class for random number generation (base class for either GSL or Boost RNG).
double gammaSample(double a, double b) const
Samples a value from a Gamma distribution. Support: [0,infinity).
double uniformSample() const
Samples a value from a uniform distribution. Support: [0,1) or [a,b).
void resetSeed(int newSeed)
Resets the seed with value newSeed.
std::mt19937 m_rng
The internal random number generator. Mersenne Twister generator.
double betaSample(double alpha, double beta) const
Samples a value from a Beta distribution. Support: [0,1].