17#ifndef ROOT_Math_RandomFunctions
18#define ROOT_Math_RandomFunctions
57 template <
class EngineBaseType>
92 void Circle(
double &
x,
double &
y,
double r);
96 double Exp(
double tau);
99 double GausBM(
double mean,
double sigma);
102 double GausACR(
double mean,
double sigma);
112 double PoissonD(
double mean);
116 void Rannor(
double &
a,
double &
b);
120 void Sphere(
double &
x,
double &
y,
double &z,
double r);
123 double Uniform(
double a,
double b);
124 double Uniform(
double a);
139 template <
class Engine,
class EngineBaseType>
148 fImpl.SetEngine(&rng);
161 return fImpl.Binomial(ntot,prob);
179 return fImpl.Exp(tau);
212 void Sphere(
double &
x,
double &
y,
double &z,
double r) {
253 double Beta(
double ,
double ) {
289 std::vector<unsigned int>
MultiNomial(
unsigned int,
const std::vector<double> &){
291 return std::vector<unsigned int>();
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t b
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
RandomFunctionsImpl()
class constructor
double Gaus(double mean, double sigma)
TRandomEngine * fBaseEngine
Definition of the generic implementation class for the RandomFunctions.
double Exp(double tau)
Returns an exponential deviate.
RandomFunctions(Engine &rng)
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 PoissonD(double mean)
double Uniform(double a, double b)
generate random numbers following a Uniform distribution in the [a,b] interval
double GausACR(double mean, double sigma)
generate random numbers according to the Acceptance-Complement-Ratio method
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.
RandomFunctionsImpl< EngineBaseType > fImpl
random number generator engine
double Rndm_impl()
Internal implementation to return random number Since this one is not a virtual function is faster th...
double operator()()
non-virtual method
int Binomial(int ntot, double prob)
Generate binomial numbers.
double Uniform(double a)
generate random numbers following a Uniform distribution in the [0,a] interval
std::vector< unsigned int > MultiNomial(unsigned int, const std::vector< double > &)
double Beta(double, double)
double Gamma(double, double)
methods which are only for GSL random generators
~RandomFunctions()
destructor (no op) we do not maintain the engine)
double GausBM(double mean, double sigma)
generate Gaussian number using Box-Muller method
int Poisson(double mean)
Generates a random integer N according to a Poisson law.
double Gaus(double mean, double sigma)
generate Gaussian number using default method
void Rannor(double &a, double &b)
Generate numbers distributed following a gaussian with mean=0 and sigma=1.
TRandomEngine DefaultEngineType
Documentation for the RandomFunction class.
Namespace for new Math classes and functions.
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
Double_t Binomial(Int_t n, Int_t k)
Calculates the binomial coefficient n over k.
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power x.