From 9cfb49b766b1dd8cba7a9e9114e4520910284ae6 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, 6 insertions(+), 2 deletions(-) diff --git a/include/tcframe/spec/random/Random.hpp b/include/tcframe/spec/random/Random.hpp index 132c9208..914f0c96 100644 --- a/include/tcframe/spec/random/Random.hpp +++ b/include/tcframe/spec/random/Random.hpp @@ -3,7 +3,7 @@ #include #include -using std::mt19937; +using std::mt19937_64; using std::random_shuffle; using std::uniform_real_distribution; using std::uniform_int_distribution; @@ -48,8 +48,12 @@ class Random { random_shuffle(first, last, [this](unsigned int idx) { return nextInt(idx); }); } + mt19937_64 *getEngine() { + return &engine; + } + private: - mt19937 engine; + mt19937_64 engine; }; }