|
ROOT
Reference Guide |
|
Go to the documentation of this file.
31 #ifndef ROOT_Math_GSLRndmEngines
32 #define ROOT_Math_GSLRndmEngines
43 class GSLMCIntegrator;
120 double Rndm()
const {
return (*
this)(); }
127 unsigned long RndmInt(
unsigned long max)
const;
141 template<
class Iterator>
143 for ( Iterator itr = begin; itr != end; ++itr ) {
152 void RandomArray(
double * begin,
double * end)
const;
157 std::string
Name()
const;
162 unsigned int Size()
const;
168 unsigned long MinInt()
const;
174 unsigned long MaxInt()
const;
179 void SetSeed(
unsigned int seed)
const;
210 void Gaussian2D(
double sigmaX,
double sigmaY,
double rho,
double &
x,
double &
y)
const;
230 double Gamma(
double a,
double b)
const;
235 double Beta(
double a,
double b)
const;
250 double FDist(
double nu1,
double nu2)
const;
255 double tDist(
double nu)
const;
270 double Pareto(
double a,
double b)
const;
275 void Dir2D(
double &
x,
double &
y)
const;
280 void Dir3D(
double &
x,
double &
y,
double &z)
const;
285 unsigned int Poisson(
double mu)
const;
290 unsigned int Binomial(
double p,
unsigned int n)
const;
300 std::vector<unsigned int>
Multinomial(
unsigned int ntot,
const std::vector<double> & p )
const;
GSLRandomEngine()
default constructor.
unsigned long RndmInt(unsigned long max) const
Generate an integer number between [0,max-1] (including 0 and max-1) if max is larger than available ...
std::string Name() const
return name of generator
Second generation of Ranlux generator for single precision with luxury level of 1 (It throws away 202...
void SetSeed(unsigned int seed) const
set the random generator seed
Lagged Fibonacci generator by Ziff see here
unsigned int Binomial(double p, unsigned int n) const
Binomial distribution.
GSLRngRanLuxD2 GSLRngRanLux48
double Pareto(double a, double b) const
Pareto distribution.
double Gamma(double a, double b) const
Gamma distribution.
GSLRngWrapper class to wrap gsl_rng structure.
unsigned int NegativeBinomial(double p, double n) const
Negative Binomial distribution.
std::vector< unsigned int > Multinomial(unsigned int ntot, const std::vector< double > &p) const
Multinomial distribution.
BSD rand() generator gsl_rmg_rand from here
unsigned int Poisson(double mu) const
Poisson distribution.
Second generation of Ranlux generator for Single precision with luxury level of 2 (It throws away 397...
double tDist(double nu) const
t student distribution
void RandomArray(Iterator begin, Iterator end) const
Generate an array of random numbers.
void Dir2D(double &x, double &y) const
generate random numbers in a 2D circle of radious 1
double Logistic(double a) const
Logistic distribution.
void Gaussian2D(double sigmaX, double sigmaY, double rho, double &x, double &y) const
Bivariate Gaussian distribution with correlation.
unsigned int Size() const
return the state size of generator
double Beta(double a, double b) const
Beta distribution.
5-th order multiple recursive generator (L'Ecuyer, Blouin and Coutre) see here
double FDist(double nu1, double nu2) const
F distrbution.
void SetType(GSLRngWrapper *r)
internal method used by the derived class to set the type of generators
void Terminate()
delete pointer to contained rng
void Dir3D(double &x, double &y, double &z) const
generate random numbers in a 3D sphere of radious 1
double Landau() const
Landau distribution.
double Gaussian(double sigma) const
Gaussian distribution - default method is Box-Muller (polar method)
double Cauchy(double a) const
Cauchy distribution.
double Rndm() const
Generate a random number between ]0,1] 0 is excluded and 1 is included.
double operator()() const
Generate a random number between ]0,1] 0 is excluded and 1 is included.
GSLRngRanLuxS2 GSLRngRanLux2
Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 1 (I...
MINSTD generator (Park and Miller) see here
double ChiSquare(double nu) const
Chi square distribution.
double Exponential(double mu) const
Exponential distribution.
GSLRandomEngine & operator=(const GSLRandomEngine &eng)
Assignment operator : make a deep copy of the contained GSL generator.
double GaussianZig(double sigma) const
Gaussian distribution - Ziggurat method.
GSLRngWrapper * Engine()
internal method to return the engine Used by class like GSLMCIntegrator to set the engine
Combined multiple recursive generator (L'Ecuyer) see here
void Initialize()
initialize the generator If no rng is present the default one based on Mersenne and Twister is create...
unsigned long MaxInt() const
return the maximum integer +1 a generator can handle
GSLRngRanLuxS1 GSLRngRanLux1
unsigned long MinInt() const
return the minimum integer a generator can handle typically this value is 0
double GaussianTail(double a, double sigma) const
Gaussian Tail distribution.
Double precision (48 bits) version of Second generation of Ranlux generator with luxury level of 2 (I...
double LogNormal(double zeta, double sigma) const
Log Normal distribution.
Tausworthe generator by L'Ecuyer see here
double Rayleigh(double sigma) const
Rayleigh distribution.
Mersenne-Twister generator gsl_rng_mt19937 from here
MixMax generator based on ROOT::Math::MixMaxEngine of N=240.
RANMAR generator see here
GSLRandomEngine Base class for all GSL random engines, normally user instantiate the derived classes ...
virtual ~GSLRandomEngine()
call Terminate()
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Namespace for new Math classes and functions.
Old Ranlux generator (James, Luscher) (default luxury level, p = 223) (This is eequivalent to TRandom...
double GaussianRatio(double sigma) const
Gaussian distribution - Ratio method.
unsigned long IntRndm() const
Generate an integer number between [0,max_generator-1] (including 0 and max-1) if max is larger than ...