30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
80 std::uniform_int_distribution<T> dist(min, max);
81 return dist(m_engine);
93 std::uniform_real_distribution<T> dist(min, max);
94 return dist(m_engine);
106 std::normal_distribution<T> dist(mean, stddev);
107 return dist(m_engine);
117 std::bernoulli_distribution dist(p);
118 return dist(m_engine);
131 std::mt19937 m_engine;
134 #ifndef DOXYGEN_SHOULD_SKIP_THIS
A random engine.
Definition: Random.h:43
T computeNormalFloat(T mean, T stddev)
Compute a float with a normal (Gaussian) distribution.
Definition: Random.h:105
T computeUniformFloat(T min, T max)
Compute a float with a uniform distribution.
Definition: Random.h:92
Random(std::uint_fast32_t seed)
Constructor with simple initialization.
Definition: Random.h:65
bool computeBernoulli(double p)
Compute a boolean with a Bernoulli distribution.
Definition: Random.h:116
Random()
Default constructor with complex initialization.
std::mt19937 & getEngine()
Get the underlying engine.
Definition: Random.h:126
T computeUniformInteger(T min, T max)
Compute an integer with a uniform distribution.
Definition: Random.h:79
#define GF_API
Definition: Portability.h:35