14#ifndef ROOT_Math_ParamFunctor
15#define ROOT_Math_ParamFunctor
61template<
class ParentFunctor,
class Func >
64 typedef typename ParentFunctor::EvalType
EvalType;
65 typedef typename ParentFunctor::Impl
Base;
112 return f((T*)
x, (
double*)
p);
122 return (*
f)((T*)
x, (
double*)
p);
128 inline static T
Eval(
const F *
f, T *
x,
double *
p) {
133 return (*
f)((T*)
x, (
double*)
p);
141#if defined(__MAKECINT__) || defined(G__DICTIONARY)
144template<
class ParentFunctor>
145class ParamFunctorHandler<ParentFunctor,
TRootIOCtor *> :
public ParentFunctor::Impl
151 double operator() (
double *,
double * ) {
return 0; }
153 double operator() (
const double *,
const double * ) {
return 0; }
155 ParamFunctorHandler * Clone()
const {
168template <
class ParentFunctor,
typename PointerToObj,
169 typename PointerToMemFn>
172 typedef typename ParentFunctor::Impl
Base;
213 inline static T
Eval(PObj & pobj,
F &
f, T *
x,
double *
p) {
214 return ((*pobj).*
f)(
x,
p);
217 inline static T
EvalConst(PObj & pobj,
F &
f,
const T *
x,
const double *
p) {
218 return ((*pobj).*
f)((T*)
x, (
double*)
p);
288 template <
class PtrObj,
typename MemFn>
298 template <
typename Func>
winID h TVirtualViewer3D TVirtualGLPainter p
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
ParamMemFunHandler(const ParamMemFunHandler &)=delete
ParamMemFunHandler & operator=(const ParamMemFunHandler &)=delete
double operator()(double x, double *p)
virtual ~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.
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)