TCPSPSuite
randomizer.hpp
1 #ifndef RANDOMIZER_H
2 #define RANDOMIZER_H
3 
4 #include <mutex>
5 #include <random>
6 #include "datastructures/maybe.hpp"
7 
8 class Randomizer {
9 public:
10  Randomizer(Maybe<int> global_seed);
11  int get_random();
12  int get_global_seed();
13 
14 private:
15  std::mutex lock;
16 
17  int global_seed;
18  std::mt19937 rng;
19  std::uniform_int_distribution<int> uni;
20 };
21 
22 #endif