class TUnuranContDist: public TUnuranBaseDist

Function Members (Methods)

public:
TUnuranContDist(const TUnuranContDist&)
TUnuranContDist(TF1* pdf = 0, TF1* deriv = 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)
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
TF1*fCdfpointer to the cdf
TF1*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
TF1*fPdfpointer to the pdf
doublefX[1]! cached vector for using TF1::EvalPar
doublefXmaxupper value of the domain
doublefXminlower value of the domain

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TUnuranContDist(TF1* pdf = 0, TF1* deriv = 0, bool isLogPdf = false)
 Constructor from a TF1 objects
  passed as non-const because EvalPar and InitArgs are non-const methods
TUnuranContDist(const TUnuranContDist& )
 Implementation of copy constructor (copy just the pointer )
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
virtual ~TUnuranContDist()
      Destructor (no operations)

{}
TUnuranContDist * Clone()
      Clone (required by base class)

{ return new TUnuranContDist(*this); }
void SetCdf(TF1* cdf)
      set cdf distribution. If a method requires it
      and is not set it is then estimated using numerical
      integration from the pdf

{ fCdf = cdf; }
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()
      check if a cdf fucntion is provided for the distribution

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

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

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

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

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

{ return fIsLogPdf; }

Last change: root/unuran:$Id: TUnuranContDist.h 21526 2007-12-20 10:42:41Z moneta $
Last generated: 2008-10-31 16:21
Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.