CluE
1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
randomness.h
Go to the documentation of this file.
1
#ifndef RANDOMNESS_H
2
#define RANDOMNESS_H
3
4
#include <random>
5
#include <time.h>
6
7
#include "
randomgenerator.h
"
8
9
namespace
CluE
10
{
16
class
Randomness
17
{
18
private
:
19
// TODO Use mt19937_64 ?
20
static
std::mt19937
mt19937Generator
;
21
22
public
:
23
static
RandomGenerator
getRandomGenerator
()
24
{
25
return
RandomGenerator
(&
mt19937Generator
);
26
}
27
28
static
void
initialize
(uint_fast32_t seed)
29
{
30
mt19937Generator
= std::mt19937(seed);
31
}
32
};
33
34
}
35
36
#endif
CluE::Randomness::mt19937Generator
static std::mt19937 mt19937Generator
Definition:
randomness.h:20
RandomGenerator
Encapsulates an STL random generator.
Definition:
randomgenerator.h:7
CluE::Randomness::initialize
static void initialize(uint_fast32_t seed)
Definition:
randomness.h:28
CluE::Randomness::getRandomGenerator
static RandomGenerator getRandomGenerator()
Definition:
randomness.h:23
CluE::Randomness
Random number generator.
Definition:
randomness.h:16
randomgenerator.h
src
misc
randomness.h
Generated on Wed May 7 2014 20:30:01 for CluE by
1.8.7