Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches

Mersenne-Twister generator gsl_rng_mt19937 from here.

Definition at line 341 of file GSLRndmEngines.h.

Public Types

typedef GSLRandomEngine BaseType

Public Member Functions

 GSLRngMT ()
void Initialize ()
 initialize the generator If no rng is present the default one based on Mersenne and Twister is created
unsigned long IntRndm () const
 Generate an integer number between [0,max_generator-1] (including 0 and max-1) if max is larger than available range of algorithm an error message is printed and zero is returned.
unsigned long MaxInt () const
 return the maximum integer +1 a generator can handle
unsigned long MinInt () const
 return the minimum integer a generator can handle typically this value is 0
std::string Name () const
 return name of generator
double operator() () const
 Generate a random number between ]0,1] 0 is excluded and 1 is included.
void RandomArray (double *begin, double *end) const
 Generate an array of random numbers The iterators points to the random numbers.
template<class Iterator>
void RandomArray (Iterator begin, Iterator end) const
 Generate an array of random numbers.
double Rndm () const
 Generate a random number between ]0,1] 0 is excluded and 1 is included.
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 range of algorithm an error message is printed and zero is returned.
void SetSeed (unsigned int seed) const
 set the random generator seed
unsigned int Size () const
 return the state size of generator
void Terminate ()
 delete pointer to contained rng

Random Distributions

Implemented using the GSL Random number Distributions

double Gaussian (double sigma) const
 Gaussian distribution - default method is Box-Muller (polar method).
double GaussianZig (double sigma) const
 Gaussian distribution - Ziggurat method.
double GaussianRatio (double sigma) const
 Gaussian distribution - Ratio method.
double GaussianTail (double a, double sigma) const
 Gaussian Tail distribution.
void Gaussian2D (double sigmaX, double sigmaY, double rho, double &x, double &y) const
 Bivariate Gaussian distribution with correlation.
void GaussianND (size_t dim, const double *pars, const double *covmat, double *genpars, double *lmat=nullptr) const
 Multivariate Gaussian distribution.
double Exponential (double mu) const
 Exponential distribution.
double Cauchy (double a) const
 Cauchy distribution.
double Landau () const
 Landau distribution.
double Gamma (double a, double b) const
 Gamma distribution.
double Beta (double a, double b) const
 Beta distribution.
double LogNormal (double zeta, double sigma) const
 Log Normal distribution.
double ChiSquare (double nu) const
 Chi square distribution.
double FDist (double nu1, double nu2) const
 F distribution.
double tDist (double nu) const
 t student distribution
double Rayleigh (double sigma) const
 Rayleigh distribution.
double Logistic (double a) const
 Logistic distribution.
double Pareto (double a, double b) const
 Pareto distribution.
void Dir2D (double &x, double &y) const
 generate random numbers in a 2D circle of radious 1
void Dir3D (double &x, double &y, double &z) const
 generate random numbers in a 3D sphere of radious 1
unsigned int Poisson (double mu) const
 Poisson distribution.
unsigned int Binomial (double p, unsigned int n) const
 Binomial distribution.
unsigned int NegativeBinomial (double p, double n) const
 Negative Binomial distribution.
std::vector< unsigned intMultinomial (unsigned int ntot, const std::vector< double > &p) const
 Multinomial distribution.
GSLRngWrapperfRng
unsigned int fCurTime
void SetType (GSLRngWrapper *r)
 internal method used by the derived class to set the type of generators
GSLRngWrapperEngine ()
 internal method to return the engine Used by class like GSLMCIntegrator to set the engine

#include <Math/GSLRndmEngines.h>

Inheritance diagram for ROOT::Math::GSLRngMT:
ROOT::Math::GSLRandomEngine

Member Typedef Documentation

◆ BaseType

Constructor & Destructor Documentation

◆ GSLRngMT()

ROOT::Math::GSLRngMT::GSLRngMT ( )

Definition at line 395 of file GSLRndmEngines.cxx.

Member Function Documentation

◆ Beta()

double ROOT::Math::GSLRandomEngine::Beta ( double a,
double b ) const
inherited

Beta distribution.

Definition at line 293 of file GSLRndmEngines.cxx.

◆ Binomial()

unsigned int ROOT::Math::GSLRandomEngine::Binomial ( double p,
unsigned int n ) const
inherited

Binomial distribution.

Definition at line 366 of file GSLRndmEngines.cxx.

◆ Cauchy()

double ROOT::Math::GSLRandomEngine::Cauchy ( double a) const
inherited

Cauchy distribution.

Definition at line 281 of file GSLRndmEngines.cxx.

◆ ChiSquare()

double ROOT::Math::GSLRandomEngine::ChiSquare ( double nu) const
inherited

Chi square distribution.

Definition at line 311 of file GSLRndmEngines.cxx.

◆ Dir2D()

void ROOT::Math::GSLRandomEngine::Dir2D ( double & x,
double & y ) const
inherited

generate random numbers in a 2D circle of radious 1

Definition at line 348 of file GSLRndmEngines.cxx.

◆ Dir3D()

void ROOT::Math::GSLRandomEngine::Dir3D ( double & x,
double & y,
double & z ) const
inherited

generate random numbers in a 3D sphere of radious 1

Definition at line 354 of file GSLRndmEngines.cxx.

◆ Engine()

GSLRngWrapper * ROOT::Math::GSLRandomEngine::Engine ( )
inlineprotectedinherited

internal method to return the engine Used by class like GSLMCIntegrator to set the engine

Definition at line 321 of file GSLRndmEngines.h.

◆ Exponential()

double ROOT::Math::GSLRandomEngine::Exponential ( double mu) const
inherited

Exponential distribution.

Definition at line 275 of file GSLRndmEngines.cxx.

◆ FDist()

double ROOT::Math::GSLRandomEngine::FDist ( double nu1,
double nu2 ) const
inherited

F distribution.

Definition at line 318 of file GSLRndmEngines.cxx.

◆ Gamma()

double ROOT::Math::GSLRandomEngine::Gamma ( double a,
double b ) const
inherited

Gamma distribution.

Definition at line 299 of file GSLRndmEngines.cxx.

◆ Gaussian()

double ROOT::Math::GSLRandomEngine::Gaussian ( double sigma) const
inherited

Gaussian distribution - default method is Box-Muller (polar method).

Definition at line 215 of file GSLRndmEngines.cxx.

◆ Gaussian2D()

void ROOT::Math::GSLRandomEngine::Gaussian2D ( double sigmaX,
double sigmaY,
double rho,
double & x,
double & y ) const
inherited

Bivariate Gaussian distribution with correlation.

Definition at line 235 of file GSLRndmEngines.cxx.

◆ GaussianND()

void ROOT::Math::GSLRandomEngine::GaussianND ( size_t dim,
const double * pars,
const double * covmat,
double * genpars,
double * lmat = nullptr ) const
inherited

Multivariate Gaussian distribution.

Definition at line 241 of file GSLRndmEngines.cxx.

◆ GaussianRatio()

double ROOT::Math::GSLRandomEngine::GaussianRatio ( double sigma) const
inherited

Gaussian distribution - Ratio method.

Definition at line 221 of file GSLRndmEngines.cxx.

◆ GaussianTail()

double ROOT::Math::GSLRandomEngine::GaussianTail ( double a,
double sigma ) const
inherited

Gaussian Tail distribution.

Definition at line 228 of file GSLRndmEngines.cxx.

◆ GaussianZig()

double ROOT::Math::GSLRandomEngine::GaussianZig ( double sigma) const
inherited

Gaussian distribution - Ziggurat method.

Definition at line 209 of file GSLRndmEngines.cxx.

◆ Initialize()

void ROOT::Math::GSLRandomEngine::Initialize ( )
inherited

initialize the generator If no rng is present the default one based on Mersenne and Twister is created

Definition at line 124 of file GSLRndmEngines.cxx.

◆ IntRndm()

unsigned long ROOT::Math::GSLRandomEngine::IntRndm ( ) const
inlineinherited

Generate an integer number between [0,max_generator-1] (including 0 and max-1) if max is larger than available range of algorithm an error message is printed and zero is returned.

Definition at line 133 of file GSLRndmEngines.h.

◆ Landau()

double ROOT::Math::GSLRandomEngine::Landau ( ) const
inherited

Landau distribution.

Definition at line 287 of file GSLRndmEngines.cxx.

◆ Logistic()

double ROOT::Math::GSLRandomEngine::Logistic ( double a) const
inherited

Logistic distribution.

Definition at line 336 of file GSLRndmEngines.cxx.

◆ LogNormal()

double ROOT::Math::GSLRandomEngine::LogNormal ( double zeta,
double sigma ) const
inherited

Log Normal distribution.

Definition at line 305 of file GSLRndmEngines.cxx.

◆ MaxInt()

unsigned long ROOT::Math::GSLRandomEngine::MaxInt ( ) const
inherited

return the maximum integer +1 a generator can handle

Definition at line 157 of file GSLRndmEngines.cxx.

◆ MinInt()

unsigned long ROOT::Math::GSLRandomEngine::MinInt ( ) const
inherited

return the minimum integer a generator can handle typically this value is 0

Definition at line 152 of file GSLRndmEngines.cxx.

◆ Multinomial()

std::vector< unsigned int > ROOT::Math::GSLRandomEngine::Multinomial ( unsigned int ntot,
const std::vector< double > & p ) const
inherited

Multinomial distribution.

Definition at line 379 of file GSLRndmEngines.cxx.

◆ Name()

std::string ROOT::Math::GSLRandomEngine::Name ( ) const
inherited

return name of generator

Definition at line 191 of file GSLRndmEngines.cxx.

◆ NegativeBinomial()

unsigned int ROOT::Math::GSLRandomEngine::NegativeBinomial ( double p,
double n ) const
inherited

Negative Binomial distribution.

Definition at line 372 of file GSLRndmEngines.cxx.

◆ operator()()

double ROOT::Math::GSLRandomEngine::operator() ( ) const
inherited

Generate a random number between ]0,1] 0 is excluded and 1 is included.

Definition at line 140 of file GSLRndmEngines.cxx.

◆ Pareto()

double ROOT::Math::GSLRandomEngine::Pareto ( double a,
double b ) const
inherited

Pareto distribution.

Definition at line 342 of file GSLRndmEngines.cxx.

◆ Poisson()

unsigned int ROOT::Math::GSLRandomEngine::Poisson ( double mu) const
inherited

Poisson distribution.

Definition at line 360 of file GSLRndmEngines.cxx.

◆ RandomArray() [1/2]

void ROOT::Math::GSLRandomEngine::RandomArray ( double * begin,
double * end ) const
inherited

Generate an array of random numbers The iterators points to the random numbers.

Definition at line 162 of file GSLRndmEngines.cxx.

◆ RandomArray() [2/2]

template<class Iterator>
void ROOT::Math::GSLRandomEngine::RandomArray ( Iterator begin,
Iterator end ) const
inlineinherited

Generate an array of random numbers.

The iterators points to the random numbers

Definition at line 142 of file GSLRndmEngines.h.

◆ Rayleigh()

double ROOT::Math::GSLRandomEngine::Rayleigh ( double sigma) const
inherited

Rayleigh distribution.

Definition at line 330 of file GSLRndmEngines.cxx.

◆ Rndm()

double ROOT::Math::GSLRandomEngine::Rndm ( ) const
inlineinherited

Generate a random number between ]0,1] 0 is excluded and 1 is included.

Definition at line 120 of file GSLRndmEngines.h.

◆ RndmInt()

unsigned long ROOT::Math::GSLRandomEngine::RndmInt ( unsigned long max) const
inherited

Generate an integer number between [0,max-1] (including 0 and max-1) if max is larger than available range of algorithm an error message is printed and zero is returned.

Definition at line 147 of file GSLRndmEngines.cxx.

◆ SetSeed()

void ROOT::Math::GSLRandomEngine::SetSeed ( unsigned int seed) const
inherited

set the random generator seed

Definition at line 170 of file GSLRndmEngines.cxx.

◆ SetType()

void ROOT::Math::GSLRandomEngine::SetType ( GSLRngWrapper * r)
inlineprotectedinherited

internal method used by the derived class to set the type of generators

Definition at line 315 of file GSLRndmEngines.h.

◆ Size()

unsigned int ROOT::Math::GSLRandomEngine::Size ( ) const
inherited

return the state size of generator

Definition at line 199 of file GSLRndmEngines.cxx.

◆ tDist()

double ROOT::Math::GSLRandomEngine::tDist ( double nu) const
inherited

t student distribution

Definition at line 324 of file GSLRndmEngines.cxx.

◆ Terminate()

void ROOT::Math::GSLRandomEngine::Terminate ( )
inherited

delete pointer to contained rng

Definition at line 131 of file GSLRndmEngines.cxx.

Member Data Documentation

◆ fCurTime

unsigned int ROOT::Math::GSLRandomEngine::fCurTime
mutableprivateinherited

Definition at line 328 of file GSLRndmEngines.h.

◆ fRng

GSLRngWrapper* ROOT::Math::GSLRandomEngine::fRng
privateinherited

Definition at line 327 of file GSLRndmEngines.h.


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