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.;
Documentation for the abstract class IBaseFunctionMultiDim.
virtual IBaseFunctionMultiDimTempl< T > * Clone() const =0
Clone a function.
TUnuranBaseDist, base class for Unuran distribution classees such as TUnuranContDist (for one-dimensi...
TUnuranMultiContDist class describing multi dimensional continuous distributions.
double Pdf(const double *x) const
evaluate the probability density function, used by UnuRan
double Derivative(const double *x, int icoord) const
evaluate the partial derivative for the given coordinate.
std::vector< double > fXmax
void Gradient(const double *x, double *grad) const
evaluate the gradient vector of the Pdf.
std::vector< double > fXmin
std::vector< double > fMode
TUnuranMultiContDist & operator=(const TUnuranMultiContDist &rhs)
Assignment operator.
const ROOT::Math::IMultiGenFunction * fPdf
unsigned int NDim() const
get number of dimension of the distribution
virtual ~TUnuranMultiContDist()
Destructor.
TUnuranMultiContDist(TF1 *func=0, unsigned int dim=0, bool isLogPdf=false)
Constructor from a TF1 object representing the Probability density function.
WrappedMultiTF1Templ< double > WrappedMultiTF1