 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 43 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 radius 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 radius 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
random generator engine

RndmFunctions fFunctions
! random functions object

#include <Math/Random.h>

## ◆ EngineBaseType

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

Definition at line 47 of file Random.h.

## ◆ RndmFunctions

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

Definition at line 48 of file Random.h.

## ◆ Random() [1/2]

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

Definition at line 50 of file Random.h.

## ◆ Random() [2/2]

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

Definition at line 55 of file Random.h.

## ◆ Beta()

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

Beta distribution.

Definition at line 121 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 183 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 165 of file Random.h.

## ◆ ChiSquare()

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

chi-square

Definition at line 131 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 radius 1

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

## ◆ Exp()

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

Exponential distribution.

Definition at line 107 of file Random.h.

## ◆ FDist()

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

F-distribution.

Definition at line 151 of file Random.h.

## ◆ Functions()

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

Definition at line 218 of file Random.h.

## ◆ Gamma()

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

Gamma distribution.

Definition at line 116 of file Random.h.

## ◆ Gaus()

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

Definition at line 111 of file Random.h.

## ◆ Integer()

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

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

## ◆ Logistic()

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

Logistic distribution.

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

## ◆ MaxInt()

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

Definition at line 98 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 201 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 196 of file Random.h.

## ◆ operator()()

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

Definition at line 90 of file Random.h.

## ◆ Pareto()

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

Pareto distribution.

Definition at line 146 of file Random.h.

## ◆ Poisson()

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

Poisson distribution.

Definition at line 189 of file Random.h.

## ◆ Rayleigh()

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

Rayleigh distribution.

Definition at line 136 of file Random.h.

## ◆ Rndm()

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

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

## ◆ Rng()

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

Definition at line 102 of file Random.h.

## ◆ SetSeed()

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

Definition at line 222 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 radius 1

Definition at line 175 of file Random.h.

## ◆ tDist()

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

t student distribution

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

## ◆ Uniform() [1/2]

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

Definition at line 207 of file Random.h.

## ◆ Uniform() [2/2]

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

Definition at line 210 of file Random.h.

## ◆ Uniform2()

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

Definition at line 213 of file Random.h.

## ◆ fEngine

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

random generator engine

Definition at line 226 of file Random.h.

## ◆ fFunctions

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

! random functions object

Definition at line 227 of file Random.h.

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