Template class to wrap any C++ callable object implementing operator() (const double * x) in a multi-dimensional function interface.
It provides a ROOT::Math::IGenMultiFunction-like signature
Note: If you want to wrap just the reference (to avoid copying) you need to use Func& or const Func & as template parameter. The former should be used when the operator() is not a const method of Func
Definition at line 143 of file WrappedFunction.h.
Public Member Functions | |
WrappedMultiFunction (Func f, unsigned int dim=1) | |
construct from the pointer to the object and the member function | |
WrappedMultiFunction * | Clone () const override |
clone (required by the interface) | |
unsigned int | NDim () const override |
Retrieve the dimension of the function. | |
Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T > | |
virtual | ~IBaseFunctionMultiDimTempl ()=default |
virtual bool | HasGradient () const |
T | operator() (const T *x) const |
Evaluate the function at a point x[]. | |
Private Member Functions | |
double | DoEval (const double *x) const override |
Private Attributes | |
unsigned int | fDim |
Func | fFunc |
Additional Inherited Members | |
Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T > | |
typedef T | BackendType |
typedef IBaseFunctionMultiDimTempl< T > | BaseFunc |
#include <Math/WrappedFunction.h>
|
inline |
construct from the pointer to the object and the member function
Definition at line 151 of file WrappedFunction.h.
|
inlineoverridevirtual |
clone (required by the interface)
Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.
Definition at line 159 of file WrappedFunction.h.
|
inlineoverrideprivate |
Definition at line 169 of file WrappedFunction.h.
|
inlineoverridevirtual |
Retrieve the dimension of the function.
Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.
Definition at line 163 of file WrappedFunction.h.
|
private |
Definition at line 175 of file WrappedFunction.h.
|
private |
Definition at line 174 of file WrappedFunction.h.