14#ifndef ROOT_Math_ParamFunctor
15#define ROOT_Math_ParamFunctor
64template<
class ParentFunctor,
class Func >
67 typedef typename ParentFunctor::EvalType
EvalType;
68 typedef typename ParentFunctor::Impl
Base;
115 return f((
T*)
x, (
double*)p);
125 return (*
f)((
T*)
x, (
double*)p);
136 return (*
f)((
T*)
x, (
double*)p);
144#if defined(__MAKECINT__) || defined(G__DICTIONARY)
147template<
class ParentFunctor>
148class ParamFunctorHandler<ParentFunctor,
TRootIOCtor *> :
public ParentFunctor::Impl
154 double operator() (
double *,
double * ) {
return 0; }
156 double operator() (
const double *,
const double * ) {
return 0; }
158 ParamFunctorHandler * Clone()
const {
171template <
class ParentFunctor,
typename PointerToObj,
172 typename PointerToMemFn>
175 typedef typename ParentFunctor::Impl
Base;
216 inline static T Eval(PObj & pobj,
F &
f,
T *
x,
double * p) {
217 return ((*pobj).*
f)(
x, p);
221 return ((*pobj).*
f)((
T*)
x, (
double*)p);
292 template <
class PtrObj,
typename MemFn>
302 template <
typename Func>
TRObject operator()(const T1 &t1) const
class defining the signature for multi-dim parametric functions
virtual T operator()(const T *x, const double *p)=0
virtual ~ParamFunctionBase()
virtual ParamFunctionBase * Clone() const =0
ParamFunctor Handler class is responsible for wrapping any other functor and pointer to free C functi...
EvalType operator()(EvalType x, double *p)
ParentFunctor::EvalType EvalType
virtual ~ParamFunctorHandler()
ParamFunctorHandler(const Func &fun)
ParamFunctorHandler * Clone() const
Param Functor class for Multidimensional functions.
ParamFunctorTempl(const ParamFunctorTempl &rhs)
Copy constructor.
ParamFunctorTempl(const Func &f)
construct from another generic Functor of multi-dimension
void SetFunction(Impl *f)
ParamFunctorTempl()
Default constructor.
ParamFunctorTempl(const PtrObj &p, MemFn memFn)
construct from a pointer to member function (multi-dim type)
ParamFunctorTempl(FreeFunc f)
ParamFunctorTempl(const std::function< T(const T *f, const Double_t *param)> &func)
T operator()(T *x, double *p)
virtual ~ParamFunctorTempl()
Destructor (no operations)
T(* FreeFunc)(T *, double *)
ParamFunctionBase< T > Impl
ParamFunctorTempl & operator=(const ParamFunctorTempl &rhs)
Assignment operator.
ParamFunctor Handler to Wrap pointers to member functions.
ParamMemFunHandler * Clone() const
double operator()(double x, double *p)
ParamMemFunHandler & operator=(const ParamMemFunHandler &)
virtual ~ParamMemFunHandler()
ParamMemFunHandler(const ParamMemFunHandler &)
ParamMemFunHandler(const PointerToObj &pObj, PointerToMemFn pMemFn)
constructor from a pointer to the class and a pointer to the function
Namespace for new Math classes and functions.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
static T EvalConst(F *f, const T *x, const double *p)
static T Eval(F *f, T *x, double *p)
static T EvalConst(const F *f, const T *x, const double *p)
static T Eval(const F *f, T *x, double *p)
static T EvalConst(F &f, const T *x, const double *p)
static T Eval(F &f, T *x, double *p)
static T EvalConst(PObj &pobj, F &f, const T *x, const double *p)
static T Eval(PObj &pobj, F &f, T *x, double *p)