17#ifndef ROOT_Math_Random
18#define ROOT_Math_Random
38 template <
class Engine>
147 double FDist(
double nu1,
double nu2) {
171 void Sphere(
double &
x,
double &
y,
double &z,
double r = 1) {
179 unsigned int Binomial(
unsigned int ntot,
double prob) {
197 std::vector<unsigned int>
Multinomial(
unsigned int ntot,
const std::vector<double> & p ) {
double Exp(double tau)
Returns an exponential deviate.
double Landau(double mu, double sigma)
Generate a random number following a Landau distribution with location parameter mu and scale paramet...
double BreitWigner(double mean, double gamma)
Return a number distributed following a BreitWigner function with mean and gamma.
double FDist(double, double)
void Circle(double &x, double &y, double r)
Generates random vectors, uniformly distributed over a circle of given radius.
double Uniform(double a, double b)
generate random numbers following a Uniform distribution in the [a,b] interval
double Pareto(double, double)
unsigned int NegativeBinomial(double, double)
double LogNormal(double, double)
void Sphere(double &x, double &y, double &z, double r)
Generates random vectors, uniformly distributed over the surface of a sphere of given radius.
int Binomial(int ntot, double prob)
Generate binomial numbers.
double Beta(double, double)
double Gamma(double, double)
methods which are only for GSL random generators
int Poisson(double mean)
Generates a random integer N according to a Poisson law.
double Gaus(double mean, double sigma)
generate Gaussian number using defqault method
Documentation for the Random class.
double Logistic(double a)
Logistic distribution.
double Beta(double a, double b)
Beta distribution.
double tDist(double nu)
t student distribution
double FDist(double nu1, double nu2)
F-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 Poisson(double mu)
Poisson distribution.
double Rayleigh(double sigma)
Rayleigh distribution.
double Pareto(double a, double b)
Pareto distribution.
Engine::BaseType EngineBaseType
std::vector< unsigned int > Multinomial(unsigned int ntot, const std::vector< double > &p)
Multinomial distribution.
std::string Type() const
Return the type (name) of the used generator.
double Gamma(double a, double b)
Gamma distribution.
RandomFunctions< Engine, EngineBaseType > RndmFunctions
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...
unsigned int Binomial(unsigned int ntot, double prob)
discrete distributions
double LogNormal(double zeta, double sigma)
Log-normal distribution.
void Sphere(double &x, double &y, double &z, double r=1)
generate random numbers in a 3D sphere of radious 1
double Exp(double tau)
Exponential distribution.
double BreitWigner(double mean=0., double gamma=1)
Breit Wigner distribution.
double Uniform(double a, double b)
double Uniform(double a=1.0)
double Landau(double m=0, double s=1)
Landau distribution.
unsigned int NegativeBinomial(double n, double prob)
Negative Binomial distribution First parameter is n, second is probability To be consistent with Rand...
Random(unsigned int seed)
unsigned int EngineSize() const
Return the size of the generator state.
double Uniform2(double a, double b)
RandomFunctions< Engine, EngineBaseType > & Functions()
double Gaus(double mean=0, double sigma=1)
Namespace for new Math classes and functions.
Random< ROOT::Math::StdEngine< std::mt19937_64 > > RandomMT64
Random< ROOT::Math::StdEngine< std::ranlux48 > > RandomRanlux48
Random< ROOT::Math::MixMaxEngine< 240, 0 > > RandomMixMax
Useful typedef definitions.
Random< ROOT::Math::MersenneTwisterEngine > RandomMT19937
Namespace for new ROOT classes and functions.
static constexpr double s
Short_t Max(Short_t a, Short_t b)