14 #ifndef RANDOMNUMBERS_INCLUDED
15 #define RANDOMNUMBERS_INCLUDED
66 virtual double get() = 0;
68 void gauss(
double& rand1,
double& rand2);
91 virtual void read_file(
const std::string&) = 0;
92 virtual void write_file(
const std::string&) = 0;
95 virtual void reset(
unsigned long seed) = 0;
142 template<
typename InnerGenerator>
147 typedef RandomNumbers *(*ProductCreator_int)(
const int& iseed);
148 typedef RandomNumbers *(*ProductCreator_file)(
const std::string& filename);
155 ProductCreator_int p = Factory_int::Find(subtype);
157 return p ? (*p)(iseed) : 0;
162 ProductCreator_file p = Factory_file::Find(subtype);
164 return p ? (*p)(filename) : 0;
167 #ifdef USE_FACTORY_AUTOREGISTER
169 static bool init_factory();
RandomNumbers * m_rand_gauss
void set_parameter_verboselevel(const Bridge::VerboseLevel vl)
virtual void uniform_lex_global(Field &)
uniform random number defined on global lattice.
Container of Field-type object.
virtual void U1_lex_global(Field &)
U(1) random number defined on global lattice.
RandomNumbers & operator=(const RandomNumbers &)
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.
Bridge::VerboseLevel m_vl
virtual void gauss_eo_global(Field &)
gaussian noise for even-odd perconditioned field (S.UEDA)
rand_gauss_even(Field &f, RandomNumbers *rand_gauss)
size_t block_size() const
size_t block_size() const
Common parameter class: provides parameters as singleton.
virtual void reset(unsigned long seed)=0
reset state with new seed.
void operator()(const bool do_fill)
virtual void read_file(const std::string &)=0
save and load random number status.
void operator()(const bool do_fill)
Base class of random number generators.
virtual void lex_global(const std::string &, Field &)
virtual void Z2_lex_global(Field &)
Z(2) random number defined on global lattice.
void generate_global(Field &f)
RandomNumbers * m_rand_gauss
std::string IdentifierType
Factory template class.
rand_gauss_odd(Field &f, RandomNumbers *rand_gauss)
void gauss(double &rand1, double &rand2)