Logo ROOT   6.16/01
Reference Guide
List of all members | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr > Class Template Reference

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

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 Member Functions

 WrappedMemFunction (FuncObj &obj, MemFuncPtr memFn)
 construct from the pointer to the object and the member function More...
 
WrappedMemFunctionClone () const
 clone (required by the interface) More...
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionOneDim
 IBaseFunctionOneDim ()
 
virtual ~IBaseFunctionOneDim ()
 virtual destructor More...
 
virtual IBaseFunctionOneDimClone () const =0
 Clone a function. More...
 
double operator() (const double *x) const
 Evaluate the function at a point x[]. More...
 
double operator() (double x) const
 Evaluate the function at a point x Use the a pure virtual private method DoEval which must be implemented by sub-classes. More...
 

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
 

Additional Inherited Members

- Public Types inherited from ROOT::Math::IBaseFunctionOneDim
typedef IBaseFunctionOneDim BaseFunc
 

#include <Math/WrappedFunction.h>

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

Constructor & Destructor Documentation

◆ WrappedMemFunction()

template<typename FuncObj , typename MemFuncPtr >
ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >::WrappedMemFunction ( FuncObj &  obj,
MemFuncPtr  memFn 
)
inline

construct from the pointer to the object and the member function

Definition at line 114 of file WrappedFunction.h.

Member Function Documentation

◆ Clone()

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

clone (required by the interface)

Implements ROOT::Math::IBaseFunctionOneDim.

Definition at line 122 of file WrappedFunction.h.

◆ DoEval()

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

implementation of the evaluation function. Must be implemented by derived classes

Implements ROOT::Math::IBaseFunctionOneDim.

Definition at line 129 of file WrappedFunction.h.

Member Data Documentation

◆ fMemFunc

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

Definition at line 135 of file WrappedFunction.h.

◆ fObj

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

Definition at line 134 of file WrappedFunction.h.

Libraries for ROOT::Math::WrappedMemFunction< FuncObj, MemFuncPtr >:
[legend]

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