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)
Public Member Functions | |
FunctorGradHandler (unsigned int dim, std::function< double(const double *)> fun, std::function< void(const double *, double *)> gfun) | |
virtual | ~FunctorGradHandler () |
BaseFunc * | Clone () const |
ImplFunc * | Copy () 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>
|
private |
|
private |
|
inlinevirtual |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
private |
|
mutableprivate |
|
mutableprivate |