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::WrappedMultiFunction< Func > Class Template Reference

template<typename Func = FreeMultiFunctionPtr>
class ROOT::Math::WrappedMultiFunction< Func >

Template class to wrap any C++ callable object implementing operator() (const double * x) in a multi-dimensional function interface.

It provides a ROOT::Math::IGenMultiFunction-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 154 of file WrappedFunction.h.

Public Member Functions

 WrappedMultiFunction (Func f, unsigned int dim=1)
 construct from the pointer to the object and the member function More...
 
WrappedMultiFunctionClone () const
 clone (required by the interface) More...
 
unsigned int NDim () const
 Retrieve the dimension of the function. More...
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
 IBaseFunctionMultiDimTempl ()
 
virtual ~IBaseFunctionMultiDimTempl ()
 virtual destructor More...
 
virtual IBaseFunctionMultiDimTempl< T > * Clone () const =0
 Clone a function. More...
 
virtual unsigned int NDim () const =0
 Retrieve the dimension of the function. More...
 
operator() (const T *x) const
 Evaluate the function at a point x[]. More...
 

Private Member Functions

virtual double DoEval (const double *x) const
 

Private Attributes

unsigned int fDim
 
Func fFunc
 

Additional Inherited Members

- Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
typedef T BackendType
 
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 

#include <Math/WrappedFunction.h>

Inheritance diagram for ROOT::Math::WrappedMultiFunction< Func >:
[legend]

Constructor & Destructor Documentation

◆ WrappedMultiFunction()

template<typename Func = FreeMultiFunctionPtr>
ROOT::Math::WrappedMultiFunction< Func >::WrappedMultiFunction ( Func  f,
unsigned int  dim = 1 
)
inline

construct from the pointer to the object and the member function

Definition at line 162 of file WrappedFunction.h.

Member Function Documentation

◆ Clone()

template<typename Func = FreeMultiFunctionPtr>
WrappedMultiFunction * ROOT::Math::WrappedMultiFunction< Func >::Clone ( ) const
inlinevirtual

clone (required by the interface)

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

Definition at line 170 of file WrappedFunction.h.

◆ DoEval()

template<typename Func = FreeMultiFunctionPtr>
virtual double ROOT::Math::WrappedMultiFunction< Func >::DoEval ( const double *  x) const
inlineprivatevirtual

Definition at line 180 of file WrappedFunction.h.

◆ NDim()

template<typename Func = FreeMultiFunctionPtr>
unsigned int ROOT::Math::WrappedMultiFunction< Func >::NDim ( ) const
inlinevirtual

Retrieve the dimension of the function.

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

Definition at line 174 of file WrappedFunction.h.

Member Data Documentation

◆ fDim

template<typename Func = FreeMultiFunctionPtr>
unsigned int ROOT::Math::WrappedMultiFunction< Func >::fDim
private

Definition at line 186 of file WrappedFunction.h.

◆ fFunc

template<typename Func = FreeMultiFunctionPtr>
Func ROOT::Math::WrappedMultiFunction< Func >::fFunc
private

Definition at line 185 of file WrappedFunction.h.

Libraries for ROOT::Math::WrappedMultiFunction< Func >:
[legend]

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