template<
class T>
class ROOT::Math::ParamFunctorTempl< T >
Param Functor class for Multidimensional functions.
It is used to wrap in a very simple and convenient way any other C++ callable object (implementation double operator( const double *, const double * ) ) or a member function with the correct signature, like Foo::EvalPar(const double *, const double *)
Definition at line 38 of file ParamFunctor.h.
|
| | ParamFunctorTempl ()=default |
| |
| template<typename Func , typename = std::enable_if_t<!std::is_same_v<std::decay_t<Func>, ParamFunctorTempl> && !std::is_same_v<std::decay_t<Func>, std::function<Signature>>>> |
| | ParamFunctorTempl (Func &&f) |
| | Construct from any callable object, or from a pointer to one.
|
| |
| template<class Obj , typename MemFn > |
| | ParamFunctorTempl (Obj *p, MemFn memFn) |
| | Construct from a pointer to a class object and a pointer to one of its member functions, like Foo::EvalPar(const double *x, const double *p).
|
| |
| | ParamFunctorTempl (std::function< Signature > f) |
| | Implicit conversion, relied on by the Python interface when passing a callable to TF1.
|
| |
| bool | Empty () const |
| |
| T | operator() (const T *x, const double *p) const |
| |
template<
typename Func ,
typename = std::enable_if_t<!std::is_same_v<std::decay_t<Func>, ParamFunctorTempl> && !std::is_same_v<std::decay_t<Func>, std::function<Signature>>>>
Construct from any callable object, or from a pointer to one.
The callable is normalized to the T (const T *, const double *) signature: anything std::function accepts as-is is handed to it directly, a pointer to a callable object is called through without taking ownership of it, and callables that insist on non-const pointers (the classic T (T *x, double *p) signature) get their arguments cast for them.
The two exclusions keep this greedy forwarding reference away from overloads that a non-const lvalue would otherwise bind to it by exact match: the implicit copy constructor, which would end up wrapping a functor in itself, and the std::function conversion below, which is implicit for the Python interface and would become ill-formed via this explicit one.
Definition at line 71 of file ParamFunctor.h.