Logo ROOT  
Reference Guide
ROOT::Math::Random< Engine > Class Template Reference

template<class Engine>
class ROOT::Math::Random< Engine >

Documentation for the Random class.

Definition at line 39 of file Random.h.

Public Types

typedef Engine::BaseType EngineBaseType
 
typedef RandomFunctions< Engine, EngineBaseTypeRndmFunctions
 

Public Member Functions

 Random ()
 
 Random (unsigned int seed)
 
double Beta (double a, double b)
 Beta distribution. More...
 
unsigned int Binomial (unsigned int ntot, double prob)
 discrete distributions More...
 
double BreitWigner (double mean=0., double gamma=1)
 Breit Wigner distribution. More...
 
double ChiSquare (double nu)
 chi-square More...
 
void Circle (double &x, double &y, double r=1)
 generate random numbers in a 2D circle of radious 1 More...
 
unsigned int EngineSize () const
 Return the size of the generator state. More...
 
double Exp (double tau)
 Exponential distribution. More...
 
double FDist (double nu1, double nu2)
 F-distribution. More...
 
RandomFunctions< Engine, EngineBaseType > & Functions ()
 
double Gamma (double a, double b)
 Gamma distribution. More...
 
double Gaus (double mean=0, double sigma=1)
 
uint64_t Integer ()
 
double Landau (double m=0, double s=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 operator() ()
 
double Pareto (double a, double b)
 Pareto distribution. More...
 
unsigned int Poisson (double mu)
 Poisson distribution. More...
 
double Rayleigh (double sigma)
 Rayleigh distribution. More...
 
double Rndm ()
 
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. More...
 
Engine & Rng ()
 
void SetSeed (int seed)
 
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...
 
std::string Type () const
 Return the type (name) of the used generator. More...
 
double Uniform (double a, double b)
 
double Uniform (double a=1.0)
 
double Uniform2 (double a, double b)
 

Static Public Member Functions

static uint64_t MaxInt ()
 

Private Attributes

Engine fEngine
 
RndmFunctions fFunctions
 

#include <Math/Random.h>

Member Typedef Documentation

◆ EngineBaseType

template<class Engine >
typedef Engine::BaseType ROOT::Math::Random< Engine >::EngineBaseType

Definition at line 43 of file Random.h.

◆ RndmFunctions

template<class Engine >
typedef RandomFunctions<Engine, EngineBaseType> ROOT::Math::Random< Engine >::RndmFunctions

Definition at line 44 of file Random.h.

Constructor & Destructor Documentation

◆ Random() [1/2]

template<class Engine >
ROOT::Math::Random< Engine >::Random ( )
inline

Definition at line 46 of file Random.h.

◆ Random() [2/2]

template<class Engine >
ROOT::Math::Random< Engine >::Random ( unsigned int  seed)
inlineexplicit

Definition at line 51 of file Random.h.

Member Function Documentation

◆ Beta()

template<class Engine >
double ROOT::Math::Random< Engine >::Beta ( double  a,
double  b 
)
inline

Beta distribution.

Definition at line 117 of file Random.h.

◆ Binomial()

template<class Engine >
unsigned int ROOT::Math::Random< Engine >::Binomial ( unsigned int  ntot,
double  prob 
)
inline

discrete distributions

Binomial distribution

Definition at line 179 of file Random.h.

◆ BreitWigner()

template<class Engine >
double ROOT::Math::Random< Engine >::BreitWigner ( double  mean = 0.,
double  gamma = 1 
)
inline

Breit Wigner distribution.

Definition at line 161 of file Random.h.

◆ ChiSquare()

template<class Engine >
double ROOT::Math::Random< Engine >::ChiSquare ( double  nu)
inline

chi-square

Definition at line 127 of file Random.h.

◆ Circle()

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

generate random numbers in a 2D circle of radious 1

Definition at line 166 of file Random.h.

◆ EngineSize()

template<class Engine >
unsigned int ROOT::Math::Random< Engine >::EngineSize ( ) const
inline

Return the size of the generator state.

Definition at line 81 of file Random.h.

◆ Exp()

template<class Engine >
double ROOT::Math::Random< Engine >::Exp ( double  tau)
inline

Exponential distribution.

Definition at line 103 of file Random.h.

◆ FDist()

template<class Engine >
double ROOT::Math::Random< Engine >::FDist ( double  nu1,
double  nu2 
)
inline

F-distribution.

Definition at line 147 of file Random.h.

◆ Functions()

template<class Engine >
RandomFunctions< Engine, EngineBaseType > & ROOT::Math::Random< Engine >::Functions ( )
inline

Definition at line 214 of file Random.h.

◆ Gamma()

template<class Engine >
double ROOT::Math::Random< Engine >::Gamma ( double  a,
double  b 
)
inline

Gamma distribution.

Definition at line 112 of file Random.h.

◆ Gaus()

template<class Engine >
double ROOT::Math::Random< Engine >::Gaus ( double  mean = 0,
double  sigma = 1 
)
inline

Definition at line 107 of file Random.h.

◆ Integer()

template<class Engine >
uint64_t ROOT::Math::Random< Engine >::Integer ( )
inline

Definition at line 90 of file Random.h.

◆ Landau()

template<class Engine >
double ROOT::Math::Random< Engine >::Landau ( double  m = 0,
double  s = 1 
)
inline

Landau distribution.

Definition at line 157 of file Random.h.

◆ Logistic()

template<class Engine >
double ROOT::Math::Random< Engine >::Logistic ( double  a)
inline

Logistic distribution.

Definition at line 137 of file Random.h.

◆ LogNormal()

template<class Engine >
double ROOT::Math::Random< Engine >::LogNormal ( double  zeta,
double  sigma 
)
inline

Log-normal distribution.

Definition at line 122 of file Random.h.

◆ MaxInt()

template<class Engine >
static uint64_t ROOT::Math::Random< Engine >::MaxInt ( )
inlinestatic

Definition at line 94 of file Random.h.

◆ Multinomial()

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

Multinomial distribution.

Definition at line 197 of file Random.h.

◆ NegativeBinomial()

template<class Engine >
unsigned int ROOT::Math::Random< Engine >::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 192 of file Random.h.

◆ operator()()

template<class Engine >
double ROOT::Math::Random< Engine >::operator() ( )
inline

Definition at line 86 of file Random.h.

◆ Pareto()

template<class Engine >
double ROOT::Math::Random< Engine >::Pareto ( double  a,
double  b 
)
inline

Pareto distribution.

Definition at line 142 of file Random.h.

◆ Poisson()

template<class Engine >
unsigned int ROOT::Math::Random< Engine >::Poisson ( double  mu)
inline

Poisson distribution.

Definition at line 185 of file Random.h.

◆ Rayleigh()

template<class Engine >
double ROOT::Math::Random< Engine >::Rayleigh ( double  sigma)
inline

Rayleigh distribution.

Definition at line 132 of file Random.h.

◆ Rndm()

template<class Engine >
double ROOT::Math::Random< Engine >::Rndm ( )
inline

Definition at line 58 of file Random.h.

◆ RndmArray()

template<class Engine >
void ROOT::Math::Random< Engine >::RndmArray ( int  n,
double *  array 
)
inline

Generate an array of random numbers between ]0,1] 0 is excluded and 1 is included Function to preserve ROOT Trandom compatibility.

Definition at line 67 of file Random.h.

◆ Rng()

template<class Engine >
Engine & ROOT::Math::Random< Engine >::Rng ( )
inline

Definition at line 98 of file Random.h.

◆ SetSeed()

template<class Engine >
void ROOT::Math::Random< Engine >::SetSeed ( int  seed)
inline

Definition at line 218 of file Random.h.

◆ Sphere()

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

generate random numbers in a 3D sphere of radious 1

Definition at line 171 of file Random.h.

◆ tDist()

template<class Engine >
double ROOT::Math::Random< Engine >::tDist ( double  nu)
inline

t student distribution

Definition at line 152 of file Random.h.

◆ Type()

template<class Engine >
std::string ROOT::Math::Random< Engine >::Type ( ) const
inline

Return the type (name) of the used generator.

Definition at line 74 of file Random.h.

◆ Uniform() [1/2]

template<class Engine >
double ROOT::Math::Random< Engine >::Uniform ( double  a,
double  b 
)
inline

Definition at line 203 of file Random.h.

◆ Uniform() [2/2]

template<class Engine >
double ROOT::Math::Random< Engine >::Uniform ( double  a = 1.0)
inline

Definition at line 206 of file Random.h.

◆ Uniform2()

template<class Engine >
double ROOT::Math::Random< Engine >::Uniform2 ( double  a,
double  b 
)
inline

Definition at line 209 of file Random.h.

Member Data Documentation

◆ fEngine

template<class Engine >
Engine ROOT::Math::Random< Engine >::fEngine
private

Definition at line 222 of file Random.h.

◆ fFunctions

template<class Engine >
RndmFunctions ROOT::Math::Random< Engine >::fFunctions
private

Definition at line 223 of file Random.h.


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