ROOT   Reference Guide
Searching...
No Matches
ROOT::Math::Random< Engine > Class Template Reference
template<class Engine>
class ROOT::Math::Random< Engine >

Documentation for the Random class.

Definition at line 42 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.

unsigned int Binomial (unsigned int ntot, double prob)
discrete distributions

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

double ChiSquare (double nu)
chi-square

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

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

double Exp (double tau)
Exponential distribution.

double FDist (double nu1, double nu2)
F-distribution.

RandomFunctions< Engine, EngineBaseType > & Functions ()

double Gamma (double a, double b)
Gamma distribution.

double Gaus (double mean=0, double sigma=1)

uint64_t Integer ()

double Landau (double m=0, double s=1)
Landau distribution.

double Logistic (double a)
Logistic distribution.

double LogNormal (double zeta, double sigma)
Log-normal distribution.

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

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

double operator() ()

double Pareto (double a, double b)
Pareto distribution.

unsigned int Poisson (double mu)
Poisson distribution.

double Rayleigh (double sigma)
Rayleigh distribution.

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.

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

double tDist (double nu)
t student distribution

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

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>

◆ EngineBaseType

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

Definition at line 46 of file Random.h.

◆ RndmFunctions

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

Definition at line 47 of file Random.h.

◆ Random() [1/2]

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

Definition at line 49 of file Random.h.

◆ Random() [2/2]

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

Definition at line 54 of file Random.h.

◆ Beta()

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

Beta distribution.

Definition at line 120 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 182 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 164 of file Random.h.

◆ ChiSquare()

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

chi-square

Definition at line 130 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 169 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 84 of file Random.h.

◆ Exp()

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

Exponential distribution.

Definition at line 106 of file Random.h.

◆ FDist()

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

F-distribution.

Definition at line 150 of file Random.h.

◆ Functions()

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

Definition at line 217 of file Random.h.

◆ Gamma()

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

Gamma distribution.

Definition at line 115 of file Random.h.

◆ Gaus()

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

Definition at line 110 of file Random.h.

◆ Integer()

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

Definition at line 93 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 160 of file Random.h.

◆ Logistic()

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

Logistic distribution.

Definition at line 140 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 125 of file Random.h.

◆ MaxInt()

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

Definition at line 97 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 200 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 195 of file Random.h.

◆ operator()()

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

Definition at line 89 of file Random.h.

◆ Pareto()

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

Pareto distribution.

Definition at line 145 of file Random.h.

◆ Poisson()

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

Poisson distribution.

Definition at line 188 of file Random.h.

◆ Rayleigh()

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

Rayleigh distribution.

Definition at line 135 of file Random.h.

◆ Rndm()

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

Definition at line 61 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 70 of file Random.h.

◆ Rng()

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

Definition at line 101 of file Random.h.

◆ SetSeed()

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

Definition at line 221 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 174 of file Random.h.

◆ tDist()

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

t student distribution

Definition at line 155 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 77 of file Random.h.

◆ Uniform() [1/2]

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

Definition at line 206 of file Random.h.

◆ Uniform() [2/2]

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

Definition at line 209 of file Random.h.

◆ Uniform2()

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

Definition at line 212 of file Random.h.

◆ fEngine

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

Definition at line 225 of file Random.h.

◆ fFunctions

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

Definition at line 226 of file Random.h.

• math/mathcore/inc/Math/Random.h