![]() |
ROOT
6.06/09
Reference Guide
|
GradFunctor class for Multidimensional gradient functions.
It is used to wrap in a very C++ callable object to make gradient functions. It can be constructed in three different way:
The function dimension is required when constructing the functor.
Public Types | |
typedef FunctorImpl< IGradientFunctionMultiDim > | Impl |
typedef IGradientFunctionMultiDim::BaseFunc | ImplBase |
![]() | |
typedef IBaseFunctionMultiDim | BaseFunc |
typedef IGradientMultiDim | BaseGrad |
![]() | |
typedef IBaseFunctionMultiDim | BaseFunc |
Public Member Functions | |
GradFunctor () | |
Default constructor. More... | |
template<typename Func > | |
GradFunctor (const Func &f, unsigned int dim) | |
construct from a callable object of multi-dimension implementing operator()(const double *x) and Derivative(const double * x,icoord) More... | |
template<class PtrObj , typename MemFn , typename GradMemFn > | |
GradFunctor (const PtrObj &p, MemFn memFn, GradMemFn gradFn, unsigned int dim) | |
construct from a pointer to member function and member function types for function and derivative evaluations More... | |
template<typename Func , typename GradFunc > | |
GradFunctor (const Func &f, const GradFunc &g, int dim) | |
construct for Gradient Functions of multi-dimension Func gives the function evaluatiion, GradFunc the partial derivatives The function dimension is required More... | |
virtual | ~GradFunctor () |
Destructor (no operations) More... | |
GradFunctor (const GradFunctor &rhs) | |
Copy constructor for functor based on ROOT::Math::IMultiGradFunction. More... | |
GradFunctor & | operator= (const GradFunctor &rhs) |
Assignment operator. More... | |
ImplBase * | Clone () const |
Clone a function. More... | |
unsigned int | NDim () const |
Retrieve the dimension of the function. More... | |
![]() | |
virtual | ~IGradientFunctionMultiDim () |
Virtual Destructor (no operations) More... | |
virtual void | Gradient (const double *x, double *grad) const |
Evaluate all the vector of function derivatives (gradient) at a point x. More... | |
virtual void | FdF (const double *x, double &f, double *df) const |
Optimized method to evaluate at the same time the function value and derivative at a point x. More... | |
![]() | |
IBaseFunctionMultiDim () | |
virtual | ~IBaseFunctionMultiDim () |
virtual destructor More... | |
double | operator() (const double *x) const |
Evaluate the function at a point x[]. More... | |
![]() | |
virtual | ~IGradientMultiDim () |
virual destructor More... | |
double | Derivative (const double *x, unsigned int icoord=0) const |
Return the partial derivative with respect to the passed coordinate. More... | |
Private Member Functions | |
double | DoEval (const double *x) const |
Implementation of the evaluation function. More... | |
double | DoDerivative (const double *x, unsigned int icoord) const |
function to evaluate the derivative with respect each coordinate. More... | |
Private Attributes | |
std::auto_ptr< Impl > | fImpl |
#include <Math/Functor.h>
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inline |
Copy constructor for functor based on ROOT::Math::IMultiGradFunction.
|
inlinevirtual |
Clone a function.
Each derived class must implement their version of the Clone method
Implements ROOT::Math::IBaseFunctionMultiDim.
|
inlineprivatevirtual |
function to evaluate the derivative with respect each coordinate.
To be implemented by the derived class
Implements ROOT::Math::IGradientMultiDim.
Implementation of the evaluation function.
Must be implemented by derived classes
Implements ROOT::Math::IBaseFunctionMultiDim.
|
inlinevirtual |
Retrieve the dimension of the function.
Implements ROOT::Math::IBaseFunctionMultiDim.
|
inline |
|
private |
Definition at line 680 of file Functor.h.
Referenced by DoDerivative(), DoEval(), GradFunctor(), NDim(), and operator=().