14 #ifndef ROOT_Math_TUnuranContDist
15 #define ROOT_Math_TUnuranContDist
48 class TUnuranContDist :
public TUnuranBaseDist {
64 explicit TUnuranContDist (TF1 * pdf = 0, TF1 * deriv = 0,
bool isLogPdf =
false );
69 explicit TUnuranContDist (
const ROOT::Math::IGenFunction & pdf,
const ROOT::Math::IGenFunction * dpdf = 0,
bool isLogPdf =
false,
bool copyFunc =
false);
75 virtual ~TUnuranContDist ();
81 TUnuranContDist(
const TUnuranContDist &);
86 TUnuranContDist & operator = (
const TUnuranContDist & rhs);
91 virtual TUnuranContDist * Clone()
const {
return new TUnuranContDist(*
this); }
99 void SetCdf(TF1 * cdf);
104 void SetCdf(
const ROOT::Math::IGenFunction & cdf);
109 void SetDomain(
double xmin,
double xmax) {
121 void SetMode(
double mode) { fMode = mode; fHasMode=
true;}
126 void SetPdfArea(
double area) { fArea = area; fHasArea=
true;}
131 bool GetDomain(
double & xmin,
double & xmax)
const {
140 bool HasCdf()
const {
return fCdf != 0; }
145 bool HasMode()
const {
return fHasMode; }
151 bool HasPdfArea()
const {
return fHasArea; }
156 double Mode()
const {
return fMode; }
161 double PdfArea()
const {
return fArea; }
167 bool IsLogPdf()
const {
return fIsLogPdf; }
172 double Pdf (
double x)
const;
177 double DPdf(
double x)
const;
182 double Cdf(
double x)
const;
191 const ROOT::Math::IGenFunction * fPdf;
192 const ROOT::Math::IGenFunction * fDPdf;
193 const ROOT::Math::IGenFunction * fCdf;
208 ClassDef(TUnuranContDist,1)