11#include <promeki/config.h>
12#if PROMEKI_ENABLE_CORE
18PROMEKI_NAMESPACE_BEGIN
66 static Error trueRandom(uint8_t *buf,
size_t bytes);
72 static Random &global();
83 explicit Random(uint64_t seed);
89 void seed(uint64_t seed);
97 int randomInt(
int min,
int max);
105 int64_t randomInt64(int64_t min, int64_t max);
113 double randomDouble(
double min,
double max);
121 float randomFloat(
float min,
float max);
129 double randomNormalDouble(
double mean,
double stddev);
137 float randomNormalFloat(
float mean,
float stddev);
148 double randomExponentialDouble(
double lambda);
155 Buffer randomBytes(
size_t count);
172 using result_type = std::mt19937_64::result_type;
175 static constexpr result_type min() {
return std::mt19937_64::min(); }
178 static constexpr result_type max() {
return std::mt19937_64::max(); }
181 result_type operator()() {
return _engine(); }
184 std::mt19937_64 _engine;