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

class TUnuranMultiContDist: public TUnuranBaseDist


TUnuranMultiContDist class
Wrapper class for multi dimensional continuous distributions.
The class can be constructed from a multi-dimensional function.


Function Members (Methods)

public:
TUnuranMultiContDist(const TUnuranMultiContDist&)
TUnuranMultiContDist(TF1* func = 0, unsigned int dim = 0, bool isLogPdf = false)
virtual~TUnuranMultiContDist()
static TClass*Class()
virtual TUnuranMultiContDist*Clone() const
doubleDerivative(const double* x, int icoord) const
const double*GetLowerDomain() const
const double*GetMode() const
const double*GetUpperDomain() const
voidGradient(const double* x, double* grad) const
virtual TClass*IsA() const
boolIsLogPdf() const
unsigned intNDim() const
TUnuranMultiContDist&operator=(const TUnuranMultiContDist& rhs)
doublePdf(const double* x) const
voidSetDomain(const double* xmin, const double* xmax)
voidSetMode(double* x)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)

Data Members

private:
unsigned intfDimnumber of function dimension
boolfIsLogPdfflag to control if function pointer represent log of pdf
vector<double>fModevector representing the x coordinates of the maximum of the pdf
TF1*fPdfpointer to the pdf
vector<double>fXmaxvector with upper x values of the domain
vector<double>fXminvector with lower x values of the domain

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TUnuranMultiContDist(TF1* func = 0, unsigned int dim = 0, bool isLogPdf = false)
Constructor from a TF1 object representing the Probability density funciton.
The derivatives of the Pdf are estimated, when required by the UNURAN algorithm,
using numerical derivation.
If a value of dim 0 is passed , the dimension of the function is taken from TF1::GetNdim().
This works only for 2D and 3D (for TF2 and TF3 objects).

virtual ~TUnuranMultiContDist()
Destructor (no operations)

{}
TUnuranMultiContDist(const TUnuranMultiContDist& )
Copy constructor

TUnuranMultiContDist * Clone()
Clone (required by base class)

{ return new TUnuranMultiContDist(*this); }
unsigned int NDim()
get number of dimension of the distribution

void SetDomain(const double* xmin, const double* xmax)
t the domain of the distribution giving an array of minimum and maximum valu
By default otherwise the domain is undefined, i.e. is [-inf,+inf]
To remove the domain do a SetDomain(0,0).
There is no possibility to have a domain defined in only one coordinate. Use instead inf or DOUBLE_MAX to
specify un infinite domain in that coordinate

void SetMode(double* x)
set the mode of the distribution (coordinates of the distribution maximum values)

const double * GetLowerDomain()
get the distribution lower domain values. Return a null pointer if domain is not defined

const double * GetUpperDomain()
get the distribution upper domain values. Return a null pointer if domain is not defined

const double * GetMode( )
get the mode (vector of coordinate positions of the maxima of the distribution)
If a mode has not defined return a NULL pointer

bool IsLogPdf()
lag to control if given function represent the log of a pd

{ return fIsLogPdf; }
double Pdf(const double* x) const
evaluate the probability density function, used by UnuRan

void Gradient(const double* x, double* grad) const
evaluate the gradient vector of  the Pdf. Used by UnuRan

double Derivative(const double* x, int icoord) const
evaluate the partial derivative for the given coordinate. Used by UnuRan


Last update: Mon Jun 25 20:13:21 2007

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.