14 #ifndef RANDOMNUMBERS_SFMT_INCLUDED
15 #define RANDOMNUMBERS_SFMT_INCLUDED
29 #define ENABLE_SFMT_JUMP
30 #include <SFMT-jump-alt.h>
41 RandomNumbers_SFMT(
const int s);
42 RandomNumbers_SFMT(
const std::string& filename) {
read_file(filename); }
44 ~RandomNumbers_SFMT() {}
47 void get_block(
double *v,
const size_t n);
50 void read_file(
const std::string& filename);
52 void reset(
unsigned long seed);
54 #ifdef ENABLE_SFMT_JUMP
62 void generate_global_jump(
Field& f);
68 static RandomNumbers *create_object_with_int(
const int& iseed)
70 return new RandomNumbers_SFMT(iseed);
73 static RandomNumbers *create_object_with_file(
const std::string& filename)
75 return new RandomNumbers_SFMT(filename);
79 static bool register_factory()
81 bool init1 = RandomNumbers::Factory_int::Register(
"SFMT", create_object_with_int);
82 bool init2 = RandomNumbers::Factory_file::Register(
"SFMT", create_object_with_file);
84 return init1 && init2;
virtual void uniform_lex_global(Field &)
uniform random number defined on global lattice.
Container of Field-type object.
virtual void write_file(const std::string &)=0
static const std::string class_name
virtual void gauss_lex_global(Field &)
gaussian random number defined on global lattice.
virtual void reset(unsigned long seed)=0
reset state with new seed.
virtual void read_file(const std::string &)=0
save and load random number status.
Base class of random number generators.