35#include <gsl/gsl_rng.h>
101 void set_seed(
unsigned long long seed);
115 long long get_irand(
long long lo,
long long hi)
const;
123 float get_frand(
double lo=0.0,
double hi=1.0)
const;
158 explicit Randnum(
const gsl_rng_type * _t);
165 const static gsl_rng_type *
T;
The wrapper class for gsl's random number generater.
static unsigned long long _seed
void print_generator_type() const
print out all possible random number generator type in gsl
void set_seed(unsigned long long seed)
Set the seed for the random number generator.
static const gsl_rng_type * T
static Randnum * Instance()
static Randnum * _instance
Randnum()
The default constructor will use the gsl default random number generator gal_rng_mt19937.
long long get_irand(long long lo, long long hi) const
This function returns a random integer from lo to hi inclusive.
unsigned long long get_seed()
Get the current random number seed.
float get_gauss_rand(float mean, float sigma) const
Return a Gaussian random number.
float get_frand(double lo=0.0, double hi=1.0) const
This function returns a random float from lo inclusive to hi.
float get_frand_pos(double lo=0.0, double hi=1.0) const
This function returns a random float from lo to hi.