31 #ifndef ROOT_Math_GSLRndmEngines 32 #define ROOT_Math_GSLRndmEngines 117 double Rndm()
const {
return (*
this)(); }
130 template<
class Iterator>
132 for ( Iterator itr = begin; itr != end; ++itr ) {
141 void RandomArray(
double * begin,
double * end)
const;
146 std::string
Name()
const;
151 unsigned int Size()
const;
156 void SetSeed(
unsigned int seed)
const;
168 double Gaussian(
double sigma)
const;
187 void Gaussian2D(
double sigmaX,
double sigmaY,
double rho,
double &
x,
double &
y)
const;
197 double Cauchy(
double a)
const;
207 double Gamma(
double a,
double b)
const;
212 double LogNormal(
double zeta,
double sigma)
const;
222 double FDist(
double nu1,
double nu2)
const;
227 double tDist(
double nu)
const;
232 void Dir2D(
double &x,
double &y)
const;
237 void Dir3D(
double &x,
double &y,
double &z)
const;
242 unsigned int Poisson(
double mu)
const;
247 unsigned int Binomial(
double p,
unsigned int n)
const;
257 std::vector<unsigned int>
Multinomial(
unsigned int ntot,
const std::vector<double> & p )
const;
Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 1 (I...
GSLRandomEngine & operator=(const GSLRandomEngine &eng)
Assignment operator : make a deep copy of the contained GSL generator.
Namespace for new ROOT classes and functions.
double Gamma(double a, double b) const
Gamma distribution.
void SetType(GSLRngWrapper *r)
internal method used by the derived class to set the type of generators
Lagged Fibonacci generator by Ziff see here
double tDist(double nu) const
t student distribution
MINSTD generator (Park and Miller) see here
void RandomArray(Iterator begin, Iterator end) const
Generate an array of random numbers.
Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 2 (I...
double Rndm() const
Generate a random number between ]0,1] 0 is excluded and 1 is included.
double FDist(double nu1, double nu2) const
F distrbution.
unsigned int Poisson(double mu) const
Poisson distribution.
Mersenne-Twister generator gsl_rng_mt19937 from here
unsigned int NegativeBinomial(double p, double n) const
Negative Binomial distribution.
void Dir3D(double &x, double &y, double &z) const
generate random numbers in a 3D sphere of radious 1
void Terminate()
delete pointer to contained rng
double ChiSquare(double nu) const
Chi square distribution.
GSLRandomEngine Base class for all GSL random engines, normally user instantiate the derived classes ...
GSLRngWrapper class to wrap gsl_rng structure.
unsigned int Size() const
return the state size of generator
GSLRngRanLuxD2 GSLRngRanLux48
double GaussianZig(double sigma) const
Gaussian distribution - Ziggurat method.
double Landau() const
Landau distribution.
GSLRngRanLuxS2 GSLRngRanLux2
double Exponential(double mu) const
Exponential distribution.
std::vector< unsigned int > Multinomial(unsigned int ntot, const std::vector< double > &p) const
Multinomial distribution.
Second generation of Ranlux generator for single precision with luxury level of 1 (It throws away 202...
virtual ~GSLRandomEngine()
call Terminate()
RANMAR generator see here
double LogNormal(double zeta, double sigma) const
Log Normal distribution.
Old Ranlux generator (James, Luscher) (default luxury level, p = 223) (This is eequivalent to TRandom...
void Gaussian2D(double sigmaX, double sigmaY, double rho, double &x, double &y) const
Bivariate Gaussian distribution with correlation.
5-th order multiple recursive generator (L'Ecuyer, Blouin and Coutre) see here
unsigned int Binomial(double p, unsigned int n) const
Binomial distribution.
double GaussianTail(double a, double sigma) const
Gaussian Tail distribution.
double operator()() const
Generate a random number between ]0,1] 0 is excluded and 1 is included.
Second generation of Ranlux generator for Single precision with luxury level of 2 (It throws away 397...
Combined multiple recursive generator (L'Ecuyer) see here
unsigned int RndmInt(unsigned int max) const
Generate an integer number between [0,max-1] (including 0 and max-1) if max is larger than available ...
void SetSeed(unsigned int seed) const
set the random generator seed
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Namespace for new Math classes and functions.
std::string Name() const
return name of generator
double Cauchy(double a) const
Cauchy distribution.
double GaussianRatio(double sigma) const
Gaussian distribution - Ratio method.
GSLRngRanLuxS1 GSLRngRanLux1
Tausworthe generator by L'Ecuyer see here
void Initialize()
initialize the generator If no rng is present the default one based on Mersenne and Twister is create...
double Gaussian(double sigma) const
Gaussian distribution - default method is Box-Muller (polar method)
BSD rand() generator gsl_rmg_rand from here
GSLRandomEngine()
default constructor.
void Dir2D(double &x, double &y) const
generate random numbers in a 2D circle of radious 1