ROOT logo
ROOT » MATH » MATHMORE » ROOT::Math::Random<ROOT::Math::GSLRngRanLuxS2>

class ROOT::Math::Random<ROOT::Math::GSLRngRanLuxS2>


     User class for MathMore random numbers template on the Engine type.
     The API of this class followed that of the class ROOT::TRandom.
     It must be implemented using as Engine one of the derived classes of
     ROOT::Math::GSLRandomEngine, like ROOT::Math::GSLRngMT

     @ingroup Random


Function Members (Methods)

public:
~Random<ROOT::Math::GSLRngRanLuxS2>()
unsigned intBinomial(unsigned int ntot, double prob)
doubleBreitWigner(double mean = 0., double gamma = 1)
doubleChiSquare(double nu)
voidCircle(double& x, double& y, double r = 1)
unsigned intEngineSize() const
doubleExp(double tau)
doubleFDist(double nu1, double nu2)
doubleGamma(double a, double b)
doubleGaus(double mean = 0, double sigma = 1)
doubleGausBM(double mean = 0, double sigma = 1)
doubleGausR(double mean = 0, double sigma = 1)
voidGaussian2D(double sigmaX, double sigmaY, double rho, double& x, double& y)
doubleGaussianTail(double a, double sigma = 1)
doubleLandau(double mean = 0, double sigma = 1)
doubleLogNormal(double zeta, double sigma)
vector<unsigned int>Multinomial(unsigned int ntot, const vector<double>& p)
unsigned intNegativeBinomial(double n, double prob)
ROOT::Math::Random<ROOT::Math::GSLRngRanLuxS2>&operator=(const ROOT::Math::Random<ROOT::Math::GSLRngRanLuxS2>&)
unsigned intPoisson(double mu)
ROOT::Math::Random<ROOT::Math::GSLRngRanLuxS2>Random<ROOT::Math::GSLRngRanLuxS2>()
ROOT::Math::Random<ROOT::Math::GSLRngRanLuxS2>Random<ROOT::Math::GSLRngRanLuxS2>(unsigned int seed)
ROOT::Math::Random<ROOT::Math::GSLRngRanLuxS2>Random<ROOT::Math::GSLRngRanLuxS2>(const ROOT::Math::GSLRngRanLuxS2& e)
ROOT::Math::Random<ROOT::Math::GSLRngRanLuxS2>Random<ROOT::Math::GSLRngRanLuxS2>(const ROOT::Math::Random<ROOT::Math::GSLRngRanLuxS2>&)
doubleRndm()
voidRndmArray(int n, double* array)
voidSetSeed(unsigned int seed)
voidSphere(double& x, double& y, double& z, double r = 1)
doubletDist(double nu)
stringType() const
doubleUniform(double x = 1.0)

Data Members

private:
ROOT::Math::GSLRngRanLuxS2fEngine

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

fEngine. SetSeed(unsigned int seed)
double Uniform(double x = 1.0)
       Generate random numbers between ]0,1]
       0 is excluded and 1 is included

double Rndm()
       Generate random numbers between ]0,1]
       0 is excluded and 1 is included
       Function to preserve ROOT Trandom compatibility

void RndmArray(int n, double* array)
       Generate an array of random numbers between ]0,1]
       0 is excluded and 1 is included
       Function to preserve ROOT Trandom compatibility

std::string Type() const
       Return the type (name) of the used generator

unsigned int EngineSize() const
       Return the size of the generator state

double Gaus(double mean = 0, double sigma = 1)
 Random  Distributions
     Use naming and signatures compatible with ROOT TRandom


       Gaussian distribution. Default method (use Ziggurat)

double GausBM(double mean = 0, double sigma = 1)
       Gaussian distribution (Box-Muller method)

double GausR(double mean = 0, double sigma = 1)
       Gaussian distribution (Ratio Method)

double GaussianTail(double a, double sigma = 1)
       Gaussian Tail distribution

void Gaussian2D(double sigmaX, double sigmaY, double rho, double& x, double& y)
       Bivariate Gaussian distribution with correlation

double Exp(double tau)
       Exponential distribution

double BreitWigner(double mean = 0., double gamma = 1)
       Breit Wigner distribution

double Landau(double mean = 0, double sigma = 1)
       Landau distribution

double Gamma(double a, double b)
       Gamma distribution

double LogNormal(double zeta, double sigma)
       Log Normal distribution

double ChiSquare(double nu)
       Chi square distribution

double FDist(double nu1, double nu2)
       F distrbution

double tDist(double nu)
       t student distribution

void Circle(double& x, double& y, double r = 1)
       generate random numbers in a 2D circle of radious 1

void Sphere(double& x, double& y, double& z, double r = 1)
       generate random numbers in a 3D sphere of radious 1

unsigned int Poisson(double mu)
       Poisson distribution

unsigned int Binomial(unsigned int ntot, double prob)
       Binomial distribution

unsigned int NegativeBinomial(double n, double prob)
       Negative Binomial distribution
       First parameter is n, second is probability
       To be consistent with Random::Binomial

std::vector<unsigned int> Multinomial(unsigned int ntot, const vector<double>& p)
       Multinomial distribution