14 #include "Math/WrappedMultiTF1.h" 36 fPdf =
new ROOT::Math::WrappedMultiTF1( *func, dim);
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
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
virtual IBaseFunctionMultiDimTempl< T > * Clone() const =0
Clone a function.
std::vector< double > fMode
virtual ~TUnuranMultiContDist()
Destructor.
const ROOT::Math::IMultiGenFunction * fPdf
TUnuranMultiContDist & operator=(const TUnuranMultiContDist &rhs)
Assignment operator.
Documentation for the abstract class IBaseFunctionMultiDim.
TUnuranMultiContDist class describing multi dimensional continuous distributions. ...
* x
Deprecated and error prone model selection interface.
double Derivative(const double *x, int icoord) const
evaluate the partial derivative for the given coordinate.
std::vector< double > fXmin
std::vector< double > fXmax
void Gradient(const double *x, double *grad) const
evaluate the gradient vector of the Pdf.