17 #ifndef ROOT_Math_Random
18 #define ROOT_Math_Random
40 template <
class Engine>
70 fEngine.RandomArray(array, array+n);
125 double FDist(
double nu1,
double nu2) {
157 unsigned int Binomial(
unsigned int ntot,
double prob) {
175 std::vector<unsigned int>
Multinomial(
unsigned int ntot,
const std::vector<double> & p ) {
std::vector< unsigned int > Multinomial(unsigned int ntot, const std::vector< double > &p)
Multinomial distribution.
int Poisson(double mean)
Generates a random integer N according to a Poisson law.
double FDist(double nu1, double nu2)
F-distribution.
double LogNormal(double, double)
unsigned int Poisson(double mu)
Poisson distribution.
double LogNormal(double zeta, double sigma)
Log-normal distribution.
void Circle(double &x, double &y, double r=1)
generate random numbers in a 2D circle of radious 1
double Exp(double tau)
Returns an exponential deviate.
double Gamma(double, double)
methods which are only for GSL random generators
Engine::BaseType EngineBaseType
void RndmArray(int n, double *array)
Generate an array of random numbers between ]0,1] 0 is excluded and 1 is included Function to preserv...
double Gamma(double a, double b)
unsigned int Binomial(unsigned int ntot, double prob)
discrete distributions
void Circle(double &x, double &y, double r)
Generates random vectors, uniformly distributed over a circle of given radius.
double Landau(double mu, double sigma)
Generate a random number following a Landau distribution with location parameter mu and scale paramet...
RandomFunctions< Engine, EngineBaseType > RndmFunctions
double Exp(double tau)
Exponential distribution.
double Gaus(double mean=0, double sigma=1)
double Landau(double m=0, double s=1)
Landau distribution.
double BreitWigner(double mean=0., double gamma=1)
Breit Wigner distribution.
void Sphere(double &x, double &y, double &z, double r)
Generates random vectors, uniformly distributed over the surface of a sphere of given radius...
double Uniform(double a, double b)
generate random numbers following a Uniform distribution in the [a,b] interval
void Sphere(double &x, double &y, double &z, double r=1)
generate random numbers in a 3D sphere of radious 1
Random(unsigned int seed)
double Uniform2(double a, double b)
double FDist(double, double)
double Uniform(double a, double b)
double tDist(double nu)
t student distribution
double ChiSquare(double nu)
chi-square
RandomFunctions< Engine, EngineBaseType > & Functions()
std::string Type() const
Return the type (name) of the used generator.
double Gaus(double mean, double sigma)
generate Gaussian number using defqault method
int Binomial(int ntot, double prob)
Generate binomial numbers.
unsigned int NegativeBinomial(double, double)
Random< ROOT::Math::MersenneTwisterEngine > RandomMT19937
unsigned int NegativeBinomial(double n, double prob)
Negative Binomial distribution First parameter is n, second is probability To be consistent with Rand...
double Uniform(double a=1.0)
double BreitWigner(double mean, double gamma)
Return a number distributed following a BreitWigner function with mean and gamma. ...
Random< ROOT::Math::MixMaxEngine > RandomMixMax
Useful typedef definitions.
unsigned int EngineSize() const
Return the size of the generator state.
Documentation for the Random class.