Logo ROOT   6.19/01
Reference Guide
ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine > Class Template Reference

template<class EngineType>
class ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >

Specialized implementation of the Random functions based on the GSL library.

These will work onlmy with a GSLRandomEngine type

Definition at line 41 of file GSLRandomFunctions.h.

Public Member Functions

 RandomFunctions ()
 
 RandomFunctions (EngineType &rng)
 
double Beta (double a, double b)
 Beta distribution. More...
 
unsigned int Binomial (unsigned int ntot, double prob)
 Binomial distribution. More...
 
double BreitWigner (double mean=0., double gamma=1)
 Breit Wigner distribution. More...
 
double ChiSquare (double nu)
 Chi square distribution. More...
 
void Circle (double &x, double &y, double r=1)
 generate random numbers in a 2D circle of radious 1 More...
 
EngineType & Engine ()
 
double Exp (double tau)
 Exponential distribution. More...
 
double FDist (double nu1, double nu2)
 F distrbution. More...
 
double Gamma (double a, double b)
 Gamma distribution. More...
 
double Gaus (double mean=0, double sigma=1)
 Gaussian distribution. More...
 
double GausBM (double mean=0, double sigma=1)
 Gaussian distribution (Box-Muller method) More...
 
double GausR (double mean=0, double sigma=1)
 Gaussian distribution (Ratio Method) More...
 
void Gaussian2D (double sigmaX, double sigmaY, double rho, double &x, double &y)
 Bivariate Gaussian distribution with correlation. More...
 
double GaussianTail (double a, double sigma=1)
 Gaussian Tail distribution. More...
 
double GausZig (double mean, double sigma)
 
double Landau (double mean=0, double sigma=1)
 Landau distribution. More...
 
double Logistic (double a)
 Logistic distribution. More...
 
double LogNormal (double zeta, double sigma)
 Log Normal distribution. More...
 
std::vector< unsigned int > Multinomial (unsigned int ntot, const std::vector< double > &p)
 Multinomial distribution. More...
 
unsigned int NegativeBinomial (double n, double prob)
 Negative Binomial distribution First parameter is n, second is probability To be consistent with Random::Binomial. More...
 
double Pareto (double a, double b)
 Pareto distribution. More...
 
unsigned int Poisson (double mu)
 Poisson distribution. More...
 
double Rayleigh (double sigma)
 Rayleigh distribution. More...
 
void Sphere (double &x, double &y, double &z, double r=1)
 generate random numbers in a 3D sphere of radious 1 More...
 
double tDist (double nu)
 t student distribution More...
 
- Public Member Functions inherited from ROOT::Math::RandomFunctions< EngineType, DefaultEngineType >
 RandomFunctions (EngineType &rng)
 
 ~RandomFunctions ()
 destructor (no op) we do not mantain the engine) More...
 
double Beta (double, double)
 
int Binomial (int ntot, double prob)
 Generate binomial numbers. More...
 
double BreitWigner (double mean, double gamma)
 Return a number distributed following a BreitWigner function with mean and gamma. More...
 
double ChiSquare (double)
 
void Circle (double &x, double &y, double r)
 Generates random vectors, uniformly distributed over a circle of given radius. More...
 
double Exp (double tau)
 Returns an exponential deviate. More...
 
double FDist (double, double)
 
double Gamma (double, double)
 methods which are only for GSL random generators More...
 
double Gaus (double mean, double sigma)
 generate Gaussian number using defqault method More...
 
double GausACR (double mean, double sigma)
 generate random numbers according to the Accemptance-Complemet-Ratio method More...
 
double GausBM (double mean, double sigma)
 generate Gaussian number using Box-Muller method More...
 
double Landau (double mu, double sigma)
 Generate a random number following a Landau distribution with location parameter mu and scale parameter sigma: Landau( (x-mu)/sigma ) More...
 
double Logistic (double)
 
double LogNormal (double, double)
 
std::vector< unsigned int > MultiNomial (unsigned int, const std::vector< double > &)
 
unsigned int NegativeBinomial (double, double)
 
double operator() ()
 non-virtual method More...
 
double Pareto (double, double)
 
int Poisson (double mean)
 Generates a random integer N according to a Poisson law. More...
 
double PoissonD (double mean)
 
void Rannor (double &a, double &b)
 Generate numbers distributed following a gaussian with mean=0 and sigma=1. More...
 
double Rayleigh (double)
 
void Sphere (double &x, double &y, double &z, double r)
 Generates random vectors, uniformly distributed over the surface of a sphere of given radius. More...
 
double tDist (double)
 
double Uniform (double a, double b)
 generate random numbers following a Uniform distribution in the [a,b] interval More...
 
double Uniform (double a)
 generate random numbers following a Uniform distribution in the [0,a] interval More...
 

Additional Inherited Members

- Protected Member Functions inherited from ROOT::Math::RandomFunctions< EngineType, DefaultEngineType >
double Rndm_impl ()
 Internal impelmentation to return random number Since this one is not a virtual function is faster than Rndm. More...
 
EngineType & Rng ()
 

#include <Math/GSLRandomFunctions.h>

Inheritance diagram for ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >:
[legend]

Constructor & Destructor Documentation

◆ RandomFunctions() [1/2]

template<class EngineType >
ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::RandomFunctions ( )
inline

Definition at line 48 of file GSLRandomFunctions.h.

◆ RandomFunctions() [2/2]

template<class EngineType >
ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::RandomFunctions ( EngineType &  rng)
inline

Definition at line 50 of file GSLRandomFunctions.h.

Member Function Documentation

◆ Beta()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Beta ( double  a,
double  b 
)
inline

Beta distribution.

Definition at line 128 of file GSLRandomFunctions.h.

◆ Binomial()

template<class EngineType >
unsigned int ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Binomial ( unsigned int  ntot,
double  prob 
)
inline

Binomial distribution.

Definition at line 209 of file GSLRandomFunctions.h.

◆ BreitWigner()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::BreitWigner ( double  mean = 0.,
double  gamma = 1 
)
inline

Breit Wigner distribution.

Definition at line 107 of file GSLRandomFunctions.h.

◆ ChiSquare()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::ChiSquare ( double  nu)
inline

Chi square distribution.

Definition at line 142 of file GSLRandomFunctions.h.

◆ Circle()

template<class EngineType >
void ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Circle ( double &  x,
double &  y,
double  r = 1 
)
inline

generate random numbers in a 2D circle of radious 1

Definition at line 183 of file GSLRandomFunctions.h.

◆ Engine()

template<class EngineType >
EngineType& ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Engine ( )
inline

Definition at line 53 of file GSLRandomFunctions.h.

◆ Exp()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Exp ( double  tau)
inline

Exponential distribution.

Definition at line 101 of file GSLRandomFunctions.h.

◆ FDist()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::FDist ( double  nu1,
double  nu2 
)
inline

F distrbution.

Definition at line 149 of file GSLRandomFunctions.h.

◆ Gamma()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Gamma ( double  a,
double  b 
)
inline

Gamma distribution.

Definition at line 121 of file GSLRandomFunctions.h.

◆ Gaus()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Gaus ( double  mean = 0,
double  sigma = 1 
)
inline

Gaussian distribution.

Default method (use Ziggurat)

Definition at line 66 of file GSLRandomFunctions.h.

◆ GausBM()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::GausBM ( double  mean = 0,
double  sigma = 1 
)
inline

Gaussian distribution (Box-Muller method)

Definition at line 73 of file GSLRandomFunctions.h.

◆ GausR()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::GausR ( double  mean = 0,
double  sigma = 1 
)
inline

Gaussian distribution (Ratio Method)

Definition at line 80 of file GSLRandomFunctions.h.

◆ Gaussian2D()

template<class EngineType >
void ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Gaussian2D ( double  sigmaX,
double  sigmaY,
double  rho,
double &  x,
double &  y 
)
inline

Bivariate Gaussian distribution with correlation.

Definition at line 94 of file GSLRandomFunctions.h.

◆ GaussianTail()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::GaussianTail ( double  a,
double  sigma = 1 
)
inline

Gaussian Tail distribution.

Definition at line 87 of file GSLRandomFunctions.h.

◆ GausZig()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::GausZig ( double  mean,
double  sigma 
)
inline

Definition at line 55 of file GSLRandomFunctions.h.

◆ Landau()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Landau ( double  mean = 0,
double  sigma = 1 
)
inline

Landau distribution.

Definition at line 114 of file GSLRandomFunctions.h.

◆ Logistic()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Logistic ( double  a)
inline

Logistic distribution.

Definition at line 169 of file GSLRandomFunctions.h.

◆ LogNormal()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::LogNormal ( double  zeta,
double  sigma 
)
inline

Log Normal distribution.

Definition at line 135 of file GSLRandomFunctions.h.

◆ Multinomial()

template<class EngineType >
std::vector<unsigned int> ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Multinomial ( unsigned int  ntot,
const std::vector< double > &  p 
)
inline

Multinomial distribution.

Definition at line 225 of file GSLRandomFunctions.h.

◆ NegativeBinomial()

template<class EngineType >
unsigned int ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::NegativeBinomial ( double  n,
double  prob 
)
inline

Negative Binomial distribution First parameter is n, second is probability To be consistent with Random::Binomial.

Definition at line 218 of file GSLRandomFunctions.h.

◆ Pareto()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Pareto ( double  a,
double  b 
)
inline

Pareto distribution.

Definition at line 176 of file GSLRandomFunctions.h.

◆ Poisson()

template<class EngineType >
unsigned int ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Poisson ( double  mu)
inline

Poisson distribution.

Definition at line 202 of file GSLRandomFunctions.h.

◆ Rayleigh()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Rayleigh ( double  sigma)
inline

Rayleigh distribution.

Definition at line 162 of file GSLRandomFunctions.h.

◆ Sphere()

template<class EngineType >
void ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::Sphere ( double &  x,
double &  y,
double &  z,
double  r = 1 
)
inline

generate random numbers in a 3D sphere of radious 1

Definition at line 192 of file GSLRandomFunctions.h.

◆ tDist()

template<class EngineType >
double ROOT::Math::RandomFunctions< EngineType, ROOT::Math::GSLRandomEngine >::tDist ( double  nu)
inline

t student distribution

Definition at line 156 of file GSLRandomFunctions.h.


The documentation for this class was generated from the following file: