BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Template class to wrap any C++ callable object which takes one argument i.e. implementing operator() (double x) in a One-dimensional function interface. It provides a ROOT::Math::IGenFunction-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 56 of file WrappedFunction.h.
Public Types | |
typedef IBaseFunctionOneDim | BaseFunc |
Public Member Functions | |
WrappedFunction (Func f) | |
WrappedFunction * | Clone () const |
clone (required by the interface) More... | |
double | operator() (const double *x) const |
double | operator() (double x) const |
Private Member Functions | |
virtual double | DoEval (double x) const |
implementation of the evaluation function. Must be implemented by derived classes More... | |
Private Attributes | |
Func | fFunc |
|
inherited |
Definition at line 139 of file IFunction.h.
|
inline |
construct from the pointer to the object and the member function
Definition at line 64 of file WrappedFunction.h.
Referenced by ROOT::Math::WrappedFunction< Func >::Clone().
|
inlinevirtual |
clone (required by the interface)
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 71 of file WrappedFunction.h.
References ROOT::Math::WrappedFunction< Func >::WrappedFunction(), and ROOT::Math::WrappedFunction< Func >::fFunc.
|
inlineprivatevirtual |
implementation of the evaluation function. Must be implemented by derived classes
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 79 of file WrappedFunction.h.
References ROOT::Math::WrappedFunction< Func >::fFunc.
|
inlineinherited |
Evaluate the function at a point x[]. Compatible method with multi-dimensional functions
Definition at line 167 of file IFunction.h.
References ROOT::Math::IBaseFunctionOneDim::DoEval().
|
inlineinherited |
Evaluate the function at a point x Use the a pure virtual private method DoEval which must be implemented by sub-classes
Definition at line 158 of file IFunction.h.
References ROOT::Math::IBaseFunctionOneDim::DoEval().
Referenced by ROOT::Math::IGradientFunctionOneDim::FdF().
|
private |
Definition at line 84 of file WrappedFunction.h.
Referenced by ROOT::Math::WrappedFunction< Func >::Clone(), and ROOT::Math::WrappedFunction< Func >::DoEval().