14 #ifndef RANDOMNUMBERS_MT19937_INCLUDED
15 #define RANDOMNUMBERS_MT19937_INCLUDED
61 void reset(
unsigned long seed);
64 void init(
unsigned long s);
65 void init(
unsigned long s, std::vector<unsigned long>& key);
68 unsigned long twist(
unsigned long u,
unsigned long v)
const;
88 enum {
N=624,
M=397 };
96 static RandomNumbers *create_object_with_int(
const int& iseed)
101 static RandomNumbers *create_object_with_file(
const std::string& filename)
107 static bool register_factory()
109 bool init1 = RandomNumbers::Factory_int::Register(
"MT19937", create_object_with_int);
110 bool init2 = RandomNumbers::Factory_file::Register(
"MT19937", create_object_with_file);
112 return init1 && init2;
static const std::string class_name
unsigned long twist(unsigned long u, unsigned long v) const
double randDouble1() const
double randDouble3() const
void init(unsigned long s)
void write_file(const std::string &)
RandomNumbers_MT19937(int s)
unsigned long randInt32() const
void read_file(const std::string &)
save and load random number status.
void reset(unsigned long seed)
reset state with new seed.
double randDouble2() const
Base class of random number generators.