BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
GradFunctor1D class for one-dimensional gradient functions. It is used to wrap in a very C++ callable object to make a 1D gradient functions. It can be constructed in three different way:
Public Types | |
typedef IBaseFunctionOneDim | BaseFunc |
typedef IGradientOneDim | BaseGrad |
typedef FunctorImpl< IGradientFunctionOneDim > | Impl |
typedef IGradientFunctionOneDim::BaseFunc | ImplBase |
Public Member Functions | |
GradFunctor1D () | |
template<typename Func > | |
GradFunctor1D (const Func &f) | |
template<typename Func , typename GradFunc > | |
GradFunctor1D (const Func &f, const GradFunc &g) | |
GradFunctor1D (const GradFunctor1D &rhs) | |
template<class PtrObj , typename MemFn , typename GradMemFn > | |
GradFunctor1D (const PtrObj &p, MemFn memFn, GradMemFn gradFn) | |
virtual | ~GradFunctor1D () |
ImplBase * | Clone () const |
double | Derivative (const double *x) const |
double | Derivative (double x) const |
void | FdF (const double *x, double &f, double *df) const |
virtual void | FdF (double x, double &f, double &df) const |
void | Gradient (const double *x, double *g) const |
double | operator() (const double *x) const |
double | operator() (double x) const |
GradFunctor1D & | operator= (const GradFunctor1D &rhs) |
Private Member Functions | |
double | DoDerivative (double x) const |
double | DoEval (double x) const |
implementation of the evaluation function. Must be implemented by derived classes More... | |
Private Attributes | |
std::unique_ptr< Impl > | fImpl |
|
inherited |
Definition at line 388 of file IFunction.h.
|
inherited |
Definition at line 389 of file IFunction.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
Copy constructor for Functor based on ROOT::Math::IGradFunction
Definition at line 743 of file Functor.h.
References fImpl.
|
inlinevirtual |
Clone a function. Each derived class will implement their version of the provate DoClone method
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 763 of file Functor.h.
References GradFunctor1D().
|
inlineinherited |
Compatibility method with multi-dimensional interface for partial derivative
Definition at line 277 of file IFunction.h.
References ROOT::Math::IGradientOneDim::DoDerivative().
|
inlineinherited |
Return the derivative of the function at a point x Use the private method DoDerivative
Definition at line 258 of file IFunction.h.
References ROOT::Math::IGradientOneDim::DoDerivative().
Referenced by ROOT::Math::IGradientFunctionOneDim::FdF().
|
inlineprivatevirtual |
function to evaluate the derivative with respect each coordinate. To be implemented by the derived class
Implements ROOT::Math::IGradientOneDim.
Definition at line 774 of file Functor.h.
References fImpl.
|
inlineprivatevirtual |
implementation of the evaluation function. Must be implemented by derived classes
Implements ROOT::Math::IBaseFunctionOneDim.
Definition at line 769 of file Functor.h.
References fImpl.
|
inlineinherited |
Compatibility method with multi-dimensional interface for Gradient and function evaluation
Definition at line 293 of file IFunction.h.
References ROOT::Math::IGradientOneDim::FdF().
|
inlinevirtualinherited |
Optimized method to evaluate at the same time the function value and derivative at a point x. Often both value and derivatives are needed and it is often more efficient to compute them at the same time. Derived class should implement this method if performances play an important role and if it is faster to evaluate value and derivative at the same time
Implements ROOT::Math::IGradientOneDim.
Definition at line 405 of file IFunction.h.
References ROOT::Math::IGradientOneDim::Derivative(), and ROOT::Math::IBaseFunctionOneDim::operator()().
|
inlineinherited |
Compatibility method with multi-dimensional interface for Gradient
Definition at line 285 of file IFunction.h.
References ROOT::Math::IGradientOneDim::DoDerivative().
|
inlineinherited |
Evaluate the function at a point x[]. Compatible method with multi-dimensional functions
Definition at line 167 of file IFunction.h.
References ROOT::Math::IBaseFunctionOneDim::DoEval().
|
inlineinherited |
Evaluate the function at a point x Use the a pure virtual private method DoEval which must be implemented by sub-classes
Definition at line 158 of file IFunction.h.
References ROOT::Math::IBaseFunctionOneDim::DoEval().
Referenced by ROOT::Math::IGradientFunctionOneDim::FdF().
|
inline |
|
private |
Definition at line 778 of file Functor.h.
Referenced by GradFunctor1D(), DoDerivative(), DoEval(), and operator=().