17 #ifndef COM_BORA_SOFTWARE__BALAU_UTIL__RANDOM 18 #define COM_BORA_SOFTWARE__BALAU_UTIL__RANDOM 20 #include <Balau/Util/Impl/RandomImpl.hpp> 35 : generator(
std::random_device()())
36 , distribution(D(lower, Impl::inclusivise(upper))) {}
43 , distribution(D(lower, Impl::inclusivise(upper))) {}
49 return distribution(generator);
57 private: std::mt19937 generator;
58 private: D distribution;
242 #endif // COM_BORA_SOFTWARE__BALAU_UTIL__RANDOM
RandomNumberGenerator(T lower, T upper, unsigned int seed)
Create an explicitly seeded random number generator with a range of [lower, upper].
Definition: Random.hpp:41
T operator()()
Get the next random number.
Definition: Random.hpp:48
The random number generator implementation class.
Definition: Random.hpp:30
RandomNumberGenerator(T lower, T upper)
Create a randomly seeded random number generator with a range of [lower, upper].
Definition: Random.hpp:34