blob: 386dc21393db96828161c90ec491f9a6013ff604 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#pragma once
#include <random>
namespace utility {
class Random {
public:
class Range {
public:
std::size_t get();
protected:
friend class Random;
Range(std::mt19937* const, const std::size_t, const std::size_t);
private:
std::mt19937* const generator_;
std::uniform_int_distribution<std::size_t> distribution_;
};
Random();
Range makeRange(const std::size_t, const std::size_t);
private:
std::random_device device_;
std::mt19937 generator_;
};
}
|