ROOT  6.06/09
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 41 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

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

Definition at line 45 of file Random.h.

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

Definition at line 46 of file Random.h.

Constructor & Destructor Documentation

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

Definition at line 48 of file Random.h.

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

Definition at line 53 of file Random.h.

Member Function Documentation

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

discrete distributions

Binomial distribution

Definition at line 157 of file Random.h.

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

Breit Wigner distribution.

Definition at line 139 of file Random.h.

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

chi-square

Definition at line 120 of file Random.h.

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 144 of file Random.h.

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

Return the size of the generator state.

Definition at line 83 of file Random.h.

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

Exponential distribution.

Definition at line 102 of file Random.h.

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

F-distribution.

Definition at line 125 of file Random.h.

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

Definition at line 192 of file Random.h.

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

Definition at line 110 of file Random.h.

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

Definition at line 106 of file Random.h.

Referenced by unuranSimple().

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

Definition at line 93 of file Random.h.

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

Landau distribution.

Definition at line 135 of file Random.h.

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

Log-normal distribution.

Definition at line 115 of file Random.h.

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 175 of file Random.h.

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 170 of file Random.h.

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

Definition at line 89 of file Random.h.

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

Poisson distribution.

Definition at line 163 of file Random.h.

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

Definition at line 60 of file Random.h.

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 69 of file Random.h.

Referenced by main(), and testQuasiRandom().

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

Definition at line 97 of file Random.h.

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

Definition at line 196 of file Random.h.

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 149 of file Random.h.

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

t student distribution

Definition at line 130 of file Random.h.

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

Return the type (name) of the used generator.

Definition at line 76 of file Random.h.

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

Definition at line 181 of file Random.h.

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

Definition at line 184 of file Random.h.

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

Definition at line 187 of file Random.h.

Member Data Documentation

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

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