Functor1D class for one-dimensional functions.
It is used to wrap in a very simple and convenient way:
Public Member Functions | |
| Functor1D ()=default | |
| Default constructor. | |
| template<class PtrObj , typename MemFn > | |
| Functor1D (const PtrObj &p, MemFn memFn) | |
| Functor1D (std::function< double(double)> const &f) | |
Construct from a callable object with the right signature implementing double operator() (double x). | |
| Functor1D * | Clone () const override |
| Clone a function. | |
Public Member Functions inherited from ROOT::Math::IBaseFunctionOneDim | |
| virtual | ~IBaseFunctionOneDim ()=default |
| double | Derivative (const double *x) const |
| Compatibility method with multi-dimensional interface for partial derivative. | |
| double | Derivative (double x) const |
| Return the derivative of the function at a point x Use the private method DoDerivative. | |
| void | FdF (const double *x, double &f, double *df) const |
| Compatibility method with multi-dimensional interface for Gradient and function evaluation. | |
| virtual void | FdF (double x, double &f, double &df) const |
| Optimized method to evaluate at the same time the function value and derivative at a point x. | |
| void | Gradient (const double *x, double *g) const |
| Compatibility method with multi-dimensional interface for Gradient. | |
| virtual bool | HasGradient () const |
| double | operator() (const double *x) const |
| Evaluate the function at a point x[]. | |
| double | operator() (double x) const |
| Evaluate the function at a point x. | |
Private Member Functions | |
| double | DoEval (double x) const override |
| implementation of the evaluation function. Must be implemented by derived classes | |
Private Attributes | |
| std::function< double(double)> | fFunc |
Additional Inherited Members | |
Public Types inherited from ROOT::Math::IBaseFunctionOneDim | |
| typedef IBaseFunctionOneDim | BaseFunc |
#include <Math/Functor.h>
|
default |
Default constructor.
Construct from a callable object with the right signature implementing double operator() (double x).
|
inlineoverridevirtual |
Clone a function.
Each derived class will implement their version of the private DoClone method.
Implements ROOT::Math::IBaseFunctionOneDim.
implementation of the evaluation function. Must be implemented by derived classes
Implements ROOT::Math::IBaseFunctionOneDim.