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

template<class ParentFunctor, class Func, class GradFunc>
class ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >

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

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 gradient function object must implement double operator() (const double * x, int icoord)

Definition at line 152 of file Functor.h.

Public Member Functions

 FunctorGradHandler (const Func &fun, const GradFunc &gfun)
 
 FunctorGradHandler (unsigned int dim, const Func &fun, const GradFunc &gfun)
 
virtual ~FunctorGradHandler ()
 
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

unsigned int fDim
 
Func fFunc
 
GradFunc fGradFunc
 

#include <Math/Functor.h>

Inheritance diagram for ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >:
[legend]

Member Typedef Documentation

◆ BaseFunc

template<class ParentFunctor , class Func , class GradFunc >
typedef ImplFunc::BaseFunc ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >::BaseFunc
private

Definition at line 155 of file Functor.h.

◆ ImplFunc

template<class ParentFunctor , class Func , class GradFunc >
typedef ParentFunctor::Impl ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >::ImplFunc
private

Definition at line 154 of file Functor.h.

Constructor & Destructor Documentation

◆ FunctorGradHandler() [1/2]

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

Definition at line 161 of file Functor.h.

◆ FunctorGradHandler() [2/2]

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

Definition at line 169 of file Functor.h.

◆ ~FunctorGradHandler()

template<class ParentFunctor , class Func , class GradFunc >
virtual ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >::~FunctorGradHandler ( )
inlinevirtual

Definition at line 175 of file Functor.h.

Member Function Documentation

◆ Clone()

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

Definition at line 188 of file Functor.h.

◆ Copy()

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

Definition at line 178 of file Functor.h.

◆ DoDerivative() [1/2]

template<class ParentFunctor , class Func , class GradFunc >
double ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >::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 GradFunc >
double ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >::DoDerivative ( double  x) const
inlineprivate

Definition at line 206 of file Functor.h.

◆ DoEval() [1/2]

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

Definition at line 202 of file Functor.h.

◆ DoEval() [2/2]

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

Definition at line 198 of file Functor.h.

◆ NDim()

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

Definition at line 192 of file Functor.h.

Member Data Documentation

◆ fDim

template<class ParentFunctor , class Func , class GradFunc >
unsigned int ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >::fDim
private

Definition at line 215 of file Functor.h.

◆ fFunc

template<class ParentFunctor , class Func , class GradFunc >
Func ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >::fFunc
mutableprivate

Definition at line 216 of file Functor.h.

◆ fGradFunc

template<class ParentFunctor , class Func , class GradFunc >
GradFunc ROOT::Math::FunctorGradHandler< ParentFunctor, Func, GradFunc >::fGradFunc
mutableprivate

Definition at line 217 of file Functor.h.

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