37 #ifndef TF_RNG_H_VERSION 39 #define TF_RNG_H_VERSION \ 42 #include <tfxx/error.h> 45 #include <gsl/gsl_rng.h> 46 #include <gsl/gsl_randist.h> 82 const double&
mean=0.,
83 const char*
type=
"default");
90 void set(
const unsigned long int&
seed);
94 std::string
type()
const {
return std::string(
MR->type->name); }
127 const char* condition);
139 #endif // TF_RNG_H_VERSION (includeguard) RNGgaussian(const double &std=1., const double &mean=0., const char *type="default")
initialize random number generator
tfxx::error::Exception TBase
base class
virtual ~UTException()
provide explicit virtual destructor
UTException(const char *type, const char *file, const int &line, const char *condition)
Create with message, failed assertion, and code position.
double Mstd
store standard deviation and mean value
double mean() const
return mean
double value() const
returns a random number
unsigned long int seed() const
return last seed value
std::string type() const
return type of random number generator
const char * Mtype
pointer name string of requested RNG type
static void rng_list_types(std::ostream &os)
print list of random number generators to stream.
exception class for RNG indicating request for unkown type
unsigned long int Mseed
memorize last seed value
Provide random numbers with Gaussian distribution.This class is an interface to the GSL random number...
static const char * comment_gsl_rng_ranlux
comment on GSL RNGs
double operator()() const
returns a random number
double std() const
return standard deviation
Base class for exceptions.
gsl_rng * MR
pointer to RNG
Namespace containing all code of library libtfxx.