8 #ifndef __RANDOMPOOL_HPP_
9 #define __RANDOMPOOL_HPP_
11 #include "MersenneTwister.hpp"
21 static const size_t size = 1000000;
34 double Get(
double range = 1);
37 #endif // __RANDOMPOOL_HPP_
void Generate(void)
Generates a random number.
size_t counter
current random number index
Definition: RandomPool.hpp:24
double Get(double range=1)
static const size_t size
default size of the pool
Definition: RandomPool.hpp:21
RandomPool & operator=(RandomPool const &)
the copy constructor
static RandomPool * instance
static instance of the class
Definition: RandomPool.hpp:19
MTRand generator
random number generator
Definition: RandomPool.hpp:23
double numbers[size]
the pool of random numbers
Definition: RandomPool.hpp:25
A random pool of numbers using Mersenne twister - Singleton Class.
Definition: RandomPool.hpp:14
RandomPool()
Default constructor.