Logo ROOT   6.10/09
Reference Guide
List of all members | Public Types | Public Member Functions | List of all members
ROOT::Math::IGradientFunctionMultiDim Class Reference

Interface (abstract class) for multi-dimensional functions providing a gradient calculation.

It implements both the ROOT::Math::IBaseFunctionMultiDim and ROOT::Math::IGradientMultiDim interfaces. The method ROOT::Math::IFunction::Gradient calculates the full gradient vector, ROOT::Math::IFunction::Derivative calculates the partial derivative for each coordinate and ROOT::Math::Fdf calculates the gradient and the function value at the same time. The pure private virtual method DoDerivative() must be implemented by the derived classes, while Gradient and FdF are by default implemented using DoDerivative, butthey can be overloaded by the derived classes to improve the efficiency in the derivative calculation.

Definition at line 330 of file IFunction.h.

Public Types

typedef IBaseFunctionMultiDim BaseFunc
 
typedef IGradientMultiDim BaseGrad
 
- Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 

Public Member Functions

virtual ~IGradientFunctionMultiDim ()
 Virtual Destructor (no operations) 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...
 
virtual void Gradient (const double *x, double *grad) const
 Evaluate all the vector of function derivatives (gradient) at a point x. More...
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
 IBaseFunctionMultiDimTempl ()
 
virtual ~IBaseFunctionMultiDimTempl ()
 virtual destructor More...
 
virtual IBaseFunctionMultiDimTempl< T > * Clone () const =0
 Clone a function. More...
 
virtual unsigned int NDim () const =0
 Retrieve the dimension of the function. More...
 
operator() (const T *x) const
 Evaluate the function at a point x[]. More...
 
- Public Member Functions inherited from ROOT::Math::IGradientMultiDim
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...
 

#include <Math/IFunction.h>

Inheritance diagram for ROOT::Math::IGradientFunctionMultiDim:
[legend]

Member Typedef Documentation

◆ BaseFunc

Definition at line 337 of file IFunction.h.

◆ BaseGrad

Definition at line 338 of file IFunction.h.

Constructor & Destructor Documentation

◆ ~IGradientFunctionMultiDim()

virtual ROOT::Math::IGradientFunctionMultiDim::~IGradientFunctionMultiDim ( )
inlinevirtual

Virtual Destructor (no operations)

Definition at line 344 of file IFunction.h.

Member Function Documentation

◆ FdF()

virtual void ROOT::Math::IGradientFunctionMultiDim::FdF ( const double *  x,
double &  f,
double *  df 
) const
inlinevirtual

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::IGradientMultiDim.

Reimplemented in ROOT::Math::LSResidualFunc, and TPyMultiGradFunction.

Definition at line 367 of file IFunction.h.

◆ Gradient()

virtual void ROOT::Math::IGradientFunctionMultiDim::Gradient ( const double *  x,
double *  grad 
) const
inlinevirtual

Evaluate all the vector of function derivatives (gradient) at a point x.

Derived classes must re-implement it if more efficient than evaluting one at a time

Implements ROOT::Math::IGradientMultiDim.

Reimplemented in ROOT::Math::LSResidualFunc, and TPyMultiGradFunction.

Definition at line 350 of file IFunction.h.


The documentation for this class was generated from the following file: