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 member function of a class taking a double and returning a double in a 1D function interface For example, if you have a class like: struct X { double Eval(double x); }; you can wrapped in the following way: WrappedMemFunction<X, double ( X::* ) (double) > f;
Definition at line 106 of file WrappedFunction.h.
Public Types | |
typedef IBaseFunctionOneDim | BaseFunc |
Public Member Functions | |
WrappedMemFunction (FuncObj &obj, MemFuncPtr memFn) | |
WrappedMemFunction * | 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 | |
MemFuncPtr | fMemFunc |
FuncObj * | fObj |
|
inherited |
Definition at line 139 of file IFunction.h.
|
inline |
construct from the pointer to the object and the member function
Definition at line 114 of file WrappedFunction.h.
Referenced by ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >::Clone().
|
inlinevirtual |
clone (required by the interface)
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 122 of file WrappedFunction.h.
References ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >::WrappedMemFunction(), ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >::fMemFunc, and ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >::fObj.
|
inlineprivatevirtual |
implementation of the evaluation function. Must be implemented by derived classes
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 129 of file WrappedFunction.h.
References ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >::fMemFunc.
|
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 135 of file WrappedFunction.h.
Referenced by ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >::Clone(), and ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >::DoEval().
|
private |
Definition at line 134 of file WrappedFunction.h.
Referenced by ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >::Clone().