BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr > Class Template Reference

Description

template<typename FuncObj, typename MemFuncPtr>
class ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >

Definition at line 193 of file WrappedFunction.h.

Inheritance diagram for ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >:
[legend]
Collaboration diagram for ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >:
[legend]

Public Types

typedef T BackendType
 
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 

Public Member Functions

 WrappedMemMultiFunction (FuncObj &obj, MemFuncPtr memFn, unsigned int dim=1)
 
WrappedMemMultiFunctionClone () const
 clone (required by the interface) More...
 
unsigned int NDim () const
 
operator() (const T *x) const
 

Private Member Functions

virtual double DoEval (const double *x) const
 

Private Attributes

unsigned int fDim
 
MemFuncPtr fMemFunc
 
FuncObj * fObj
 

Member Typedef Documentation

◆ BackendType

template<class T >
typedef T ROOT::Math::IBaseFunctionMultiDimTempl< T >::BackendType
inherited

Definition at line 66 of file IFunction.h.

◆ BaseFunc

template<class T >
typedef IBaseFunctionMultiDimTempl<T> ROOT::Math::IBaseFunctionMultiDimTempl< T >::BaseFunc
inherited

Definition at line 67 of file IFunction.h.

Constructor & Destructor Documentation

◆ WrappedMemMultiFunction()

template<typename FuncObj , typename MemFuncPtr >
ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::WrappedMemMultiFunction ( FuncObj &  obj,
MemFuncPtr  memFn,
unsigned int  dim = 1 
)
inline

construct from the pointer to the object and the member function

Definition at line 201 of file WrappedFunction.h.

201  :
202  fObj(&obj),
203  fMemFunc( memFn ),
204  fDim(dim)
205  { /* no op */ }

Referenced by ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::Clone().

Member Function Documentation

◆ Clone()

template<typename FuncObj , typename MemFuncPtr >
WrappedMemMultiFunction* ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::Clone ( ) const
inlinevirtual

clone (required by the interface)

Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.

Definition at line 210 of file WrappedFunction.h.

210  {
212  }
WrappedMemMultiFunction(FuncObj &obj, MemFuncPtr memFn, unsigned int dim=1)

References ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::WrappedMemMultiFunction(), ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::fDim, ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::fMemFunc, and ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::fObj.

Here is the call graph for this function:

◆ DoEval()

template<typename FuncObj , typename MemFuncPtr >
virtual double ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::DoEval ( const double *  x) const
inlineprivatevirtual

Definition at line 219 of file WrappedFunction.h.

219  {
220  return ((*fObj).*fMemFunc)( x );
221  }

References ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::fMemFunc.

◆ NDim()

template<typename FuncObj , typename MemFuncPtr >
unsigned int ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::NDim ( ) const
inlinevirtual

Retrieve the dimension of the function

Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.

Definition at line 215 of file WrappedFunction.h.

215 { return fDim; }

References ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::fDim.

◆ operator()()

template<class T >
T ROOT::Math::IBaseFunctionMultiDimTempl< T >::operator() ( const T *  x) const
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.

93  {
94  return DoEval(x);
95  }
virtual T DoEval(const T *x) const =0

References ROOT::Math::IBaseFunctionMultiDimTempl< T >::DoEval().

Referenced by ROOT::Math::IGradientFunctionMultiDimTempl< T >::FdF().

Here is the call graph for this function:

Member Data Documentation

◆ fDim

template<typename FuncObj , typename MemFuncPtr >
unsigned int ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::fDim
private

◆ fMemFunc

template<typename FuncObj , typename MemFuncPtr >
MemFuncPtr ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::fMemFunc
private

◆ fObj

template<typename FuncObj , typename MemFuncPtr >
FuncObj* ROOT::Math::WrappedMemMultiFunction< FuncObj, MemFuncPtr >::fObj
private

The documentation for this class was generated from the following file: