13 #ifndef ROOT_Math_UnuranDistr 14 #define ROOT_Math_UnuranDistr 27 template<
class Function>
32 const Function * func =
reinterpret_cast<const Function *
> ( unur_distr_get_extobj(dist) );
33 return func->operator()(
x);
37 const Function * func =
reinterpret_cast<const Function *
> ( unur_distr_get_extobj(dist) );
38 return func->Derivative(x);
42 const Function * func =
reinterpret_cast<const Function *
> ( unur_distr_get_extobj(dist) );
52 template<
class Function>
57 const Function * func =
reinterpret_cast<const Function *
> ( unur_distr_get_extobj(dist) );
59 return func->operator()(
x);
64 const Function * func =
reinterpret_cast<const Function *
> ( unur_distr_get_extobj(dist) );
65 func->Gradient(x,grad);
71 const Function * func =
reinterpret_cast<const Function *
> ( unur_distr_get_extobj(dist) );
72 return func->Gradient(x,coord);
84 int dim = unur_distr_get_dim(dist);
85 double pdf =
Pdf(x,dist);
86 int ret =
Dpdf(grad,x,dist);
87 for (
int i = 0; i < dim; ++i) {
94 return Pdpdf(x,coord,dist)/
Pdf(x,dist);
static double Dpdf(double x, const UNUR_DISTR *dist)
double dist(Rotation3D const &r1, Rotation3D const &r2)
static double Pdlogpdf(const double *x, int coord, UNUR_DISTR *dist)
static int Dlogpdf(double *grad, const double *x, UNUR_DISTR *dist)
static double Pdf(const double *x, UNUR_DISTR *dist)
evaluate the probality density function
Double_t(* Function)(Double_t)
static double Cdf(double x, const UNUR_DISTR *dist)
static double Pdpdf(const double *x, int coord, UNUR_DISTR *dist)
UnuranDistr Provides free function based on TF1 to be called by unuran.
static int Dpdf(double *grad, const double *x, UNUR_DISTR *dist)
struct unur_distr UNUR_DISTR
free functions for multidimensional functions needed bby UNURAN
static double Pdf(double x, const UNUR_DISTR *dist)
evaluate the probal
static double Logpdf(const double *x, UNUR_DISTR *dist)