+
class TUnuranContDist
-
library: libUnuran
#include "TUnuranContDist.h"
Display options:
Show inherited
Show non-public

class TUnuranContDist: public TUnuranBaseDist

Function Members (Methods)

public:
TUnuranContDist(const TUnuranContDist&)
TUnuranContDist(const TF1* pdf = 0, const 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
const TF1*fCdfpointer to the cdf
const 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
const TF1*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 TF1* pdf = 0, const TF1* deriv = 0, bool isLogPdf = false)
 Constructor from a TF1 objects
TUnuranContDist(const TUnuranContDist& )
 Implementation of copy constructor (copy just the pointer )
double Pdf(double x) const
 evaluate the pdf of the destribution
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()
lag to control if given function represent the log of a pd

{ return fIsLogPdf; }

Last update: root/unuran:$Name: $:$Id: TUnuranContDist.cxx,v 1.1 2007/03/08 09:31:54 moneta Exp $
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.