ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Math::Functor Class Reference

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.

Definition at line 394 of file Functor.h.

Public Types

typedef FunctorImpl
< IBaseFunctionMultiDim
Impl
 
typedef
IBaseFunctionMultiDim::BaseFunc 
ImplBase
 
- Public Types inherited from ROOT::Math::IBaseFunctionMultiDim
typedef IBaseFunctionMultiDim BaseFunc
 

Public Member Functions

 Functor ()
 Default constructor. More...
 
template<class PtrObj , typename MemFn >
 Functor (const PtrObj &p, MemFn memFn, unsigned int dim)
 construct from a pointer to member function (multi-dim type) More...
 
template<typename Func >
 Functor (const Func &f, unsigned int dim)
 construct from a callable object of multi-dimension with the right signature (implementing operator()(double *x) More...
 
virtual ~Functor ()
 Destructor (no operations) More...
 
 Functor (const Functor &rhs)
 Copy constructor for functor based on ROOT::Math::IMultiGenFunction. More...
 
Functoroperator= (const Functor &rhs)
 Assignment operator. More...
 
ImplBaseClone () const
 Clone a function. More...
 
unsigned int NDim () const
 Retrieve the dimension of the function. More...
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDim
 IBaseFunctionMultiDim ()
 
virtual ~IBaseFunctionMultiDim ()
 virtual destructor More...
 
double operator() (const double *x) const
 Evaluate the function at a point x[]. More...
 

Private Member Functions

double DoEval (const double *x) const
 Implementation of the evaluation function. More...
 

Private Attributes

std::auto_ptr< ImplfImpl
 

#include <Math/Functor.h>

Inheritance diagram for ROOT::Math::Functor:
[legend]

Member Typedef Documentation

Definition at line 399 of file Functor.h.

Definition at line 400 of file Functor.h.

Constructor & Destructor Documentation

ROOT::Math::Functor::Functor ( )
inline

Default constructor.

Definition at line 405 of file Functor.h.

Referenced by Clone().

template<class PtrObj , typename MemFn >
ROOT::Math::Functor::Functor ( const PtrObj &  p,
MemFn  memFn,
unsigned int  dim 
)
inline

construct from a pointer to member function (multi-dim type)

Definition at line 412 of file Functor.h.

template<typename Func >
ROOT::Math::Functor::Functor ( const Func f,
unsigned int  dim 
)
inline

construct from a callable object of multi-dimension with the right signature (implementing operator()(double *x)

Definition at line 423 of file Functor.h.

virtual ROOT::Math::Functor::~Functor ( )
inlinevirtual

Destructor (no operations)

Definition at line 431 of file Functor.h.

ROOT::Math::Functor::Functor ( const Functor rhs)
inline

Copy constructor for functor based on ROOT::Math::IMultiGenFunction.

Definition at line 436 of file Functor.h.

Member Function Documentation

ImplBase* ROOT::Math::Functor::Clone ( ) const
inlinevirtual

Clone a function.

Each derived class must implement their version of the Clone method

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 459 of file Functor.h.

double ROOT::Math::Functor::DoEval ( const double x) const
inlineprivatevirtual

Implementation of the evaluation function.

Must be implemented by derived classes

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 467 of file Functor.h.

unsigned int ROOT::Math::Functor::NDim ( ) const
inlinevirtual

Retrieve the dimension of the function.

Implements ROOT::Math::IBaseFunctionMultiDim.

Definition at line 462 of file Functor.h.

Functor& ROOT::Math::Functor::operator= ( const Functor rhs)
inline

Assignment operator.

Definition at line 448 of file Functor.h.

Member Data Documentation

std::auto_ptr<Impl> ROOT::Math::Functor::fImpl
private

Definition at line 472 of file Functor.h.

Referenced by DoEval(), Functor(), NDim(), and operator=().

Collaboration diagram for ROOT::Math::Functor:
[legend]

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