Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc > Class Template Reference

template<class ParentFunctor, class Func, class DerivFunc>
class ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >

Functor Handler class for gradient functions where both callable objects are provided for the function evaluation (type Func) and for the derivative (type DerivFunc) .

It can be created from any function implementing the correct signature corresponding to the requested type In the case of one dimension the function evaluation object and the derivative function object must implement double operator() (double x). In the case of multi-dimension the function evaluation object must implement double operator() (const double * x) and the derivative function object must implement double operator() (const double * x, int icoord)

Definition at line 153 of file Functor.h.

Public Member Functions

 FunctorDerivHandler (const Func &fun, const DerivFunc &gfun)
 
 FunctorDerivHandler (unsigned int dim, const Func &fun, const DerivFunc &gfun)
 
virtual ~FunctorDerivHandler ()
 
BaseFuncClone () const
 
ImplFuncCopy () const
 
unsigned int NDim () const
 

Private Types

typedef ImplFunc::BaseFunc BaseFunc
 
typedef ParentFunctor::Impl ImplFunc
 

Private Member Functions

double DoDerivative (const double *x, unsigned int icoord) const
 
double DoDerivative (double x) const
 
double DoEval (const double *x) const
 
double DoEval (double x) const
 

Private Attributes

DerivFunc fDerivFunc
 
unsigned int fDim
 
Func fFunc
 

#include <Math/Functor.h>

Inheritance diagram for ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >:
[legend]

Member Typedef Documentation

◆ BaseFunc

template<class ParentFunctor , class Func , class DerivFunc >
typedef ImplFunc::BaseFunc ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::BaseFunc
private

Definition at line 156 of file Functor.h.

◆ ImplFunc

template<class ParentFunctor , class Func , class DerivFunc >
typedef ParentFunctor::Impl ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::ImplFunc
private

Definition at line 155 of file Functor.h.

Constructor & Destructor Documentation

◆ FunctorDerivHandler() [1/2]

template<class ParentFunctor , class Func , class DerivFunc >
ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::FunctorDerivHandler ( const Func &  fun,
const DerivFunc &  gfun 
)
inline

Definition at line 161 of file Functor.h.

◆ FunctorDerivHandler() [2/2]

template<class ParentFunctor , class Func , class DerivFunc >
ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::FunctorDerivHandler ( unsigned int  dim,
const Func &  fun,
const DerivFunc &  gfun 
)
inline

Definition at line 169 of file Functor.h.

◆ ~FunctorDerivHandler()

template<class ParentFunctor , class Func , class DerivFunc >
virtual ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::~FunctorDerivHandler ( )
inlinevirtual

Definition at line 175 of file Functor.h.

Member Function Documentation

◆ Clone()

template<class ParentFunctor , class Func , class DerivFunc >
BaseFunc * ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::Clone ( ) const
inline

Definition at line 188 of file Functor.h.

◆ Copy()

template<class ParentFunctor , class Func , class DerivFunc >
ImplFunc * ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::Copy ( ) const
inline

Definition at line 178 of file Functor.h.

◆ DoDerivative() [1/2]

template<class ParentFunctor , class Func , class DerivFunc >
double ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::DoDerivative ( const double x,
unsigned int  icoord 
) const
inlineprivate

Definition at line 210 of file Functor.h.

◆ DoDerivative() [2/2]

template<class ParentFunctor , class Func , class DerivFunc >
double ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::DoDerivative ( double  x) const
inlineprivate

Definition at line 206 of file Functor.h.

◆ DoEval() [1/2]

template<class ParentFunctor , class Func , class DerivFunc >
double ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::DoEval ( const double x) const
inlineprivate

Definition at line 202 of file Functor.h.

◆ DoEval() [2/2]

template<class ParentFunctor , class Func , class DerivFunc >
double ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::DoEval ( double  x) const
inlineprivate

Definition at line 198 of file Functor.h.

◆ NDim()

template<class ParentFunctor , class Func , class DerivFunc >
unsigned int ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::NDim ( ) const
inline

Definition at line 192 of file Functor.h.

Member Data Documentation

◆ fDerivFunc

template<class ParentFunctor , class Func , class DerivFunc >
DerivFunc ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::fDerivFunc
mutableprivate

Definition at line 217 of file Functor.h.

◆ fDim

template<class ParentFunctor , class Func , class DerivFunc >
unsigned int ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::fDim
private

Definition at line 215 of file Functor.h.

◆ fFunc

template<class ParentFunctor , class Func , class DerivFunc >
Func ROOT::Math::FunctorDerivHandler< ParentFunctor, Func, DerivFunc >::fFunc
mutableprivate

Definition at line 216 of file Functor.h.

  • math/mathcore/inc/Math/Functor.h