14 #ifndef ROOT_Math_TUnuranContDist
15 #define ROOT_Math_TUnuranContDist
17 #ifndef ROOT_Math_TUnuranBaseDist
21 #ifndef ROOT_Math_IFunctionfwd
176 double Pdf (
double x)
const;
181 double DPdf(
double x)
const;
186 double Cdf(
double x)
const;
TUnuranBaseDist, base class for Unuran distribution classees such as TUnuranContDist (for one-dimensi...
const ROOT::Math::IGenFunction * fDPdf
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
virtual ~TUnuranContDist()
Destructor.
bool HasMode() const
check if distribution has a pre-computed mode
void SetCdf(TF1 *cdf)
set cdf distribution.
virtual TUnuranContDist * Clone() const
Clone (required by base class)
TUnuranContDist(TF1 *pdf=0, TF1 *deriv=0, bool isLogPdf=false)
Constructor from a TF1 objects specifying the pdf and optionally from another function representing t...
#define ClassDef(name, id)
double cdf(double *x, double *p)
double DPdf(double x) const
evaluate the derivative of the pdf.
double Pdf(double x) const
evaluate the Probability Density function.
const ROOT::Math::IGenFunction * fCdf
const ROOT::Math::IGenFunction * fPdf
double Cdf(double x) const
evaluate the integral (cdf) on the domain.
bool HasCdf() const
check if a cdf function is provided for the distribution
bool HasPdfArea() const
check if distribution has a pre-computed area below the Pdf
TUnuranContDist & operator=(const TUnuranContDist &rhs)
Assignment operator.
void SetDomain(double xmin, double xmax)
Set the distribution domain.
bool IsLogPdf() const
flag to control if given function represent the log of a pdf
bool GetDomain(double &xmin, double &xmax) const
check if distribution has a defined domain and return in case its domain
void SetPdfArea(double area)
set the area below the pdf
TUnuranContDist class describing one dimensional continuous distribution.
double Mode() const
return the mode (x location of maximum of the pdf)
double PdfArea() const
return area below the pdf
void SetMode(double mode)
set the distribution mode (x position of its maximum)