13#ifndef ROOT_Math_UnuranDistr
14#define ROOT_Math_UnuranDistr
27template<
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) );
52template<
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);
80 return std::log(
Pdf(
x,dist) );
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) {
struct unur_distr UNUR_DISTR
Double_t(* Function)(Double_t)
free functions for multidimensional functions needed bby UNURAN
static int Dlogpdf(double *grad, const double *x, UNUR_DISTR *dist)
static double Pdlogpdf(const double *x, int coord, UNUR_DISTR *dist)
static double Pdpdf(const double *x, int coord, UNUR_DISTR *dist)
static int Dpdf(double *grad, const double *x, UNUR_DISTR *dist)
static double Pdf(const double *x, UNUR_DISTR *dist)
evaluate the probality density function
static double Logpdf(const double *x, UNUR_DISTR *dist)
UnuranDistr Provides free function based on TF1 to be called by unuran.
static double Cdf(double x, const UNUR_DISTR *dist)
static double Dpdf(double x, const UNUR_DISTR *dist)
static double Pdf(double x, const UNUR_DISTR *dist)
evaluate the probal