ROOT  6.06/08
Reference Guide
Public Types | Public Member Functions | Private Attributes | List of all members
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 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...
 
std::string Type () const
 Return the type (name) of the used generator. More...
 
unsigned int EngineSize () const
 Return the size of the generator state. More...
 
double operator() ()
 
unsigned int Integer ()
 
Engine & Rng ()
 
double Exp (double tau)
 Exponential distribution. More...
 
double Gaus (double mean=0, double sigma=1)
 
double Gamma (double a, double b)
 
double LogNormal (double zeta, double sigma)
 Log-normal distribution. More...
 
double ChiSquare (double nu)
 chi-square More...
 
double FDist (double nu1, double nu2)
 F-distribution. More...
 
double tDist (double nu)
 t student distribution More...
 
double Landau (double m=0, double s=1)
 Landau distribution. More...
 
double BreitWigner (double mean=0., double gamma=1)
 Breit Wigner distribution. More...
 
void Circle (double &x, double &y, double r=1)
 generate random numbers in a 2D circle of radious 1 More...
 
void Sphere (double &x, double &y, double &z, double r=1)
 generate random numbers in a 3D sphere of radious 1 More...
 
unsigned int Binomial (unsigned int ntot, double prob)
 discrete distributions More...
 
unsigned int Poisson (double mu)
 Poisson 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...
 
std::vector< unsigned int > Multinomial (unsigned int ntot, const std::vector< double > &p)
 Multinomial distribution. More...
 
double Uniform (double a, double b)
 
double Uniform (double a=1.0)
 
double Uniform2 (double a, double b)
 
RandomFunctions< Engine, EngineBaseType > & Functions ()
 
void SetSeed (int seed)
 

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

§ Binomial()

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

discrete distributions

Binomial distribution

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

§ ChiSquare()

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

chi-square

Definition at line 118 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 142 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 100 of file Random.h.

§ FDist()

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

F-distribution.

Definition at line 123 of file Random.h.

§ Functions()

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

Definition at line 190 of file Random.h.

§ Gamma()

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

Definition at line 108 of file Random.h.

§ Gaus()

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

Definition at line 104 of file Random.h.

Referenced by unuranSimple().

§ Integer()

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

Definition at line 91 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 133 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 113 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 173 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 168 of file Random.h.

§ operator()()

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

Definition at line 87 of file Random.h.

§ Poisson()

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

Poisson distribution.

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

Referenced by main(), and testQuasiRandom().

§ Rng()

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

Definition at line 95 of file Random.h.

§ SetSeed()

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

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

§ tDist()

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

t student distribution

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

§ Uniform() [2/2]

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

Definition at line 182 of file Random.h.

§ Uniform2()

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

Definition at line 185 of file Random.h.

Member Data Documentation

§ fEngine

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

§ fFunctions

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

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