ROOT logo
ROOT » MATH » MATHCORE » ROOT::Math::GradFunctor

class ROOT::Math::GradFunctor: public ROOT::Math::IGradientFunctionMultiDim

   Documentation for class Functor class.
   It is used to wrap in a very simple and convenient way multi-dimensional function objects.
   It can wrap all the following types:
   <li> any C++ callable object implemention double operator()( const double *  )
   <li> a free C function of type double ()(double * )
   <li> a member function with the correct signature like Foo::Eval(const double * ).
       In this case one pass the object pointer and a pointer to the member function (&Foo::Eval)
   The function dimension is required when constructing the functor.

   @ingroup  GenFunc

Function Members (Methods)

virtual ROOT::Math::GradFunctor::ImplBase*Clone() const
doubleROOT::Math::IGradientMultiDim::Derivative(const double* x, unsigned int icoord = 0) const
virtual voidROOT::Math::IGradientFunctionMultiDim::FdF(const double* x, double& f, double* df) const
ROOT::Math::GradFunctorGradFunctor(const ROOT::Math::GradFunctor&)
ROOT::Math::GradFunctorGradFunctor(void* p1, void* p2, unsigned int dim)
ROOT::Math::GradFunctorGradFunctor(void* p1, unsigned int dim, const char* className, const char* methodName, const char* derivName)
virtual voidROOT::Math::IGradientFunctionMultiDim::Gradient(const double* x, double* grad) const
virtual unsigned intNDim() const
doubleROOT::Math::IBaseFunctionMultiDim::operator()(const double* x) const
ROOT::Math::GradFunctor&operator=(const ROOT::Math::GradFunctor& rhs)
virtual doubleDoDerivative(const double* x, unsigned int icoord) const
virtual doubleDoEval(const double* x) const

Data Members

auto_ptr<ROOT::Math::IGradientFunctionMultiDim>fImplpointer to base grad functor handler

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

BaseFunc * Clone() const
 clone of the function handler (use copy-ctor)
unsigned int NDim() const
 constructor for multi-dimensional functions
double DoEval(const double* x) const
double DoDerivative(double x)
      Default constructor

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)

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

GradFunctor(void* p1, void* p2, unsigned int dim)
      construct for Gradient Functions of multi-dimension
      Func gives the function evaluatiion, GradFunc the partial derivatives
      The function dimension is  required

{ }
virtual ~GradFunctor()
      Destructor (no operations)