54 if (
this == &rhs)
return *
this;
85 unsigned int ndim =
NDim();
86 for (
unsigned int i = 0; i < ndim; ++i)
102 std::vector<double> xx(
NDim() );
104 xx[coord] = x[coord]+
h;
double f1 = (*fPdf)(&xx.front());
105 xx[coord] = x[coord]-
h;
double f2 = (*fPdf)(&xx.front());
107 xx[coord] = x[coord]+h/2;
double g1 = (*fPdf)(&xx.front());
108 xx[coord] = x[coord]-h/2;
double g2 = (*fPdf)(&xx.front());
111 double h2 = 1/(2.*
h);
113 double d2 = 2*(g1 - g2);
115 double deriv = h2*(4*d2 - d0)/3.;
TUnuranBaseDist, base class for Unuran distribution classees such as TUnuranContDist (for one-dimensi...
double Pdf(const double *x) const
evaluate the probability density function, used by UnuRan
Class to Wrap a ROOT Function class (like TF1) in a IParamMultiFunction interface of multi-dimensions...
TUnuranMultiContDist(TF1 *func=0, unsigned int dim=0, bool isLogPdf=false)
Constructor from a TF1 object representing the Probability density function.
unsigned int NDim() const
get number of dimension of the distribution
std::vector< double > fMode
virtual ~TUnuranMultiContDist()
Destructor.
const ROOT::Math::IMultiGenFunction * fPdf
TUnuranMultiContDist & operator=(const TUnuranMultiContDist &rhs)
Assignment operator.
TUnuranMultiContDist class describing multi dimensional continuous distributions. ...
double func(double *x, double *p)
double Derivative(const double *x, int icoord) const
evaluate the partial derivative for the given coordinate.
double f2(const double *x)
std::vector< double > fXmin
std::vector< double > fXmax
Documentation for the abstract class IBaseFunctionMultiDim.
virtual IBaseFunctionMultiDim * Clone() const =0
Clone a function.
void Gradient(const double *x, double *grad) const
evaluate the gradient vector of the Pdf.