Documentation for class Functor class.
It is used to wrap in a very simple and convenient way multi-dimensional function objects. It can wrap all the following types:
-
any C++ callable object implemention double operator()( const double * )
-
a free C function of type double ()(const double * )
-
an std::function of type std::function<double (double const *)>
-
a member function with the correct signature like Foo::Eval(const double * ). In this case one pass the object pointer and a pointer to the member function (&Foo::Eval)
The function dimension is required when constructing the functor.
Definition at line 401 of file Functor.h.
|
| Functor () |
| Default constructor.
|
|
template<typename Func > |
| Functor (const Func &f, unsigned int dim) |
| construct from a callable object of multi-dimension with the right signature (implementing operator()(const double *x)
|
|
| Functor (const Functor &rhs) |
| Copy constructor for functor based on ROOT::Math::IMultiGenFunction.
|
|
template<class PtrObj , typename MemFn > |
| Functor (const PtrObj &p, MemFn memFn, unsigned int dim) |
| construct from a pointer to member function (multi-dim type)
|
|
| Functor (const std::function< double(double const *)> &f, unsigned int dim) |
| specialized constructor from a std::function of multi-dimension with the right signature (double operator()(double const *x) This specialized constructor is introduced in order to use the Functor class in Python passing Python user defined functions
|
|
virtual | ~Functor () |
| Destructor (no operations)
|
|
ImplBase * | Clone () const |
| Clone a function.
|
|
unsigned int | NDim () const |
| Retrieve the dimension of the function.
|
|
Functor & | operator= (const Functor &rhs) |
| Assignment operator.
|
|
| IBaseFunctionMultiDimTempl () |
|
virtual | ~IBaseFunctionMultiDimTempl () |
| virtual destructor
|
|
double | operator() (const double *x) const |
| Evaluate the function at a point x[].
|
|