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

template<class ParentFunctor>
class ROOT::Math::FunctorGradHandler< ParentFunctor >

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 The function evaluation (Func) 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 234 of file Functor.h.

Public Member Functions

 FunctorGradHandler (unsigned int dim, std::function< double(const double *)> fun, std::function< void(const double *, double *)> gfun)
 
virtual ~FunctorGradHandler ()
 
BaseFuncClone () const
 
ImplFuncCopy () const
 
void Gradient (const double *x, double *g) 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 DoEval (const double *x) const
 

Private Attributes

unsigned int fDim
 
std::function< double(const double *)> fFunc
 
std::function< void(const double *, double *)> fGradFunc
 

#include <Math/Functor.h>

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

Member Typedef Documentation

◆ BaseFunc

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

Definition at line 239 of file Functor.h.

◆ ImplFunc

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

Definition at line 238 of file Functor.h.

Constructor & Destructor Documentation

◆ FunctorGradHandler()

template<class ParentFunctor >
ROOT::Math::FunctorGradHandler< ParentFunctor >::FunctorGradHandler ( unsigned int  dim,
std::function< double(const double *)>  fun,
std::function< void(const double *, double *)>  gfun 
)
inline

Definition at line 244 of file Functor.h.

◆ ~FunctorGradHandler()

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

Definition at line 250 of file Functor.h.

Member Function Documentation

◆ Clone()

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

Definition at line 263 of file Functor.h.

◆ Copy()

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

Definition at line 253 of file Functor.h.

◆ DoDerivative()

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

Definition at line 281 of file Functor.h.

◆ DoEval()

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

Definition at line 277 of file Functor.h.

◆ Gradient()

template<class ParentFunctor >
void ROOT::Math::FunctorGradHandler< ParentFunctor >::Gradient ( const double x,
double g 
) const
inline

Definition at line 271 of file Functor.h.

◆ NDim()

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

Definition at line 267 of file Functor.h.

Member Data Documentation

◆ fDim

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

Definition at line 289 of file Functor.h.

◆ fFunc

template<class ParentFunctor >
std::function<double(const double *)> ROOT::Math::FunctorGradHandler< ParentFunctor >::fFunc
mutableprivate

Definition at line 290 of file Functor.h.

◆ fGradFunc

template<class ParentFunctor >
std::function<void(const double *, double*)> ROOT::Math::FunctorGradHandler< ParentFunctor >::fGradFunc
mutableprivate

Definition at line 291 of file Functor.h.

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