BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
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:
The function dimension is required when constructing the functor.
Public Types | |
typedef T | BackendType |
typedef IBaseFunctionMultiDimTempl< T > | BaseFunc |
typedef FunctorImpl< IBaseFunctionMultiDim > | Impl |
typedef IBaseFunctionMultiDim::BaseFunc | ImplBase |
Public Member Functions | |
Functor () | |
template<typename Func > | |
Functor (const Func &f, unsigned int dim) | |
Functor (const Functor &rhs) | |
template<class PtrObj , typename MemFn > | |
Functor (const PtrObj &p, MemFn memFn, unsigned int dim) | |
virtual | ~Functor () |
ImplBase * | Clone () const |
unsigned int | NDim () const |
T | operator() (const T *x) const |
Functor & | operator= (const Functor &rhs) |
Private Member Functions | |
double | DoEval (const double *x) const |
Private Attributes | |
std::unique_ptr< Impl > | fImpl |
|
inherited |
Definition at line 66 of file IFunction.h.
|
inherited |
Definition at line 67 of file IFunction.h.
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
Copy constructor for functor based on ROOT::Math::IMultiGenFunction
Definition at line 434 of file Functor.h.
References fImpl.
|
inlinevirtual |
Clone a function. Each derived class must implement their version of the Clone method
Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.
Definition at line 454 of file Functor.h.
References Functor().
|
inlineprivate |
|
inlinevirtual |
Retrieve the dimension of the function
Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.
Definition at line 457 of file Functor.h.
References fImpl.
|
inlineinherited |
Evaluate the function at a point x[]. Use the pure virtual private method DoEval which must be implemented by the sub-classes
Definition at line 92 of file IFunction.h.
References ROOT::Math::IBaseFunctionMultiDimTempl< T >::DoEval().
Referenced by ROOT::Math::IGradientFunctionMultiDimTempl< T >::FdF().
|
private |