From b838211d054d7d59e74a9a3abbb84ea29e34ebd4 Mon Sep 17 00:00:00 2001 From: Hocky Yudhiono Date: Sat, 16 Mar 2024 11:17:21 +0800 Subject: [PATCH] Expose random engine and change to 64 bits --- include/tcframe/spec/random/Random.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/tcframe/spec/random/Random.hpp b/include/tcframe/spec/random/Random.hpp index 8c699e5..dde4234 100644 --- a/include/tcframe/spec/random/Random.hpp +++ b/include/tcframe/spec/random/Random.hpp @@ -4,6 +4,8 @@ #include using std::mt19937; +using std::mt19937_64; +using std::random_shuffle; using std::uniform_real_distribution; using std::uniform_int_distribution; @@ -47,8 +49,12 @@ class Random { std::shuffle(first, last, engine); } + mt19937_64 *getEngine() { + return &engine; + } + private: - mt19937 engine; + mt19937_64 engine; }; }