ROOT logo
ROOT » MATH » UNURAN » TUnuranContDist

class TUnuranContDist: public TUnuranBaseDist

Function Members (Methods)

public:
TUnuranContDist(const TUnuranContDist&)
TUnuranContDist(TF1* pdf = 0, TF1* deriv = 0, bool isLogPdf = false)
TUnuranContDist(const ROOT::Math::IGenFunction& pdf, const ROOT::Math::IGenFunction* dpdf = 0, bool isLogPdf = false)
virtual~TUnuranContDist()
doubleCdf(double x) const
static TClass*Class()
virtual TUnuranContDist*Clone() const
doubleDPdf(double x) const
boolGetDomain(double& xmin, double& xmax) const
boolHasCdf() const
boolHasMode() const
boolHasPdfArea() const
virtual TClass*IsA() const
boolIsLogPdf() const
doubleMode() const
TUnuranContDist&operator=(const TUnuranContDist& rhs)
doublePdf(double x) const
doublePdfArea() const
voidSetCdf(TF1* cdf)
voidSetCdf(const ROOT::Math::IGenFunction& cdf)
voidSetDomain(double xmin, double xmax)
voidSetMode(double mode)
voidSetPdfArea(double area)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)

Data Members

private:
doublefAreaarea below pdf
const ROOT::Math::IBaseFunctionOneDim*fCdfpointer to the cdf (cumulative dist.)
const ROOT::Math::IBaseFunctionOneDim*fDPdfpointer to the derivative of the pdf
boolfHasAreaflag to control if distribution has a pre-computed area below the pdf
boolfHasDomainflag to control if distribution has a defined domain (otherwise is [-inf,+inf]
boolfHasModeflag to control if distribution has a pre-computed mode
boolfIsLogPdfflag to control if function pointer represent log of pdf
doublefModemode of the distribution
boolfOwnFuncflag to indicate if class manages the function pointers
const ROOT::Math::IBaseFunctionOneDim*fPdfpointer to the pdf
doublefXmaxupper value of the domain
doublefXminlower value of the domain

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TUnuranContDist(const ROOT::Math::IGenFunction & pdf, const ROOT::Math::IGenFunction * deriv, bool isLogPdf )
 Constructor from generic function interfaces
TUnuranContDist(TF1 * pdf, TF1 * deriv, bool isLogPdf )
 Constructor from a TF1 objects
 function pointers are managed by class
TUnuranContDist(const TUnuranContDist& )
 Implementation of copy constructor
~TUnuranContDist()
 destructor implementation
void SetCdf(const ROOT::Math::IGenFunction & cdf)
  set cdf distribution using a generic function interface
void SetCdf(TF1 * cdf)
 set cumulative distribution function from a TF1
double Pdf(double x) const
 evaluate the pdf of the distribution
double DPdf(double x) const
 evaluate the derivative of the pdf
 if derivative function is not given is evaluated numerically
double Cdf(double x) const
 evaluate the integral (cdf)  on the domain
TUnuranContDist * Clone() const
      Clone (required by base class)

{ return new TUnuranContDist(*this); }
void SetDomain(double xmin, double xmax)
      Set the distribution domain. If min < max a domain is defined otherwise is undefined

void SetMode(double mode)
      set the distribution mode (x position of its maximum)

{ fMode = mode; fHasMode=true;}
void SetPdfArea(double area)
      set the area below the pdf

{ fArea = area; fHasArea=true;}
bool GetDomain(double& xmin, double& xmax) const
      check if distribution has a defined domain and return in case its domain

bool HasCdf() const
      check if a cdf function is provided for the distribution

{ return fCdf != 0; }
bool HasMode() const
      check if distribution has a pre-computed mode

{ return fHasMode; }
bool HasPdfArea() const
      check if distribution has a pre-computed area below the Pdf

{ return fHasArea; }
double Mode() const
      return the mode   (x location of  maximum of the pdf)

{ return fMode; }
double PdfArea() const
      return area below the pdf

{ return fArea; }
bool IsLogPdf() const
      flag to control if given function represent the log of a pdf

{ return fIsLogPdf; }