ROOT  6.06/09
Reference Guide
Public Member Functions | List of all members
ROOT::Math::GSLDerivator Class Reference

Class for computing numerical derivative of a function based on the GSL numerical algorithm This class is implemented using the numerical derivatives algorithms provided by GSL (see GSL Online Manual ).

Definition at line 62 of file GSLDerivator.h.

Public Member Functions

 GSLDerivator ()
 Default Constructor of a GSLDerivator class based on GSL numerical differentiation algorithms. More...
 
virtual ~GSLDerivator ()
 destructor (no operations) More...
 
void SetFunction (const IGenFunction &f)
 Set the function for calculating the derivatives. More...
 
void SetFunction (GSLFuncPointer f, void *p=0)
 Set the function f for evaluating the derivative using a GSL function pointer type. More...
 
double EvalCentral (double x, double h)
 Computes the numerical derivative at a point x using an adaptive central difference algorithm with a step size h. More...
 
double EvalForward (double x, double h)
 Computes the numerical derivative at a point x using an adaptive forward difference algorithm with a step size h. More...
 
double EvalBackward (double x, double h)
 Computes the numerical derivative at a point x using an adaptive backward difference algorithm with a step size h. More...
 

--- Static methods ---

int fStatus
 
double fResult
 
double fError
 
GSLFunctionWrapper fFunction
 
int Status () const
 return the error status of the last integral calculation More...
 
double Result () const
 return the result of the last derivative calculation More...
 
double Error () const
 return the estimate of the absolute error of the last derivative calculation More...
 
static double EvalCentral (const IGenFunction &f, double x, double h)
 Computes the numerical derivative of a function f at a point x using an adaptive central difference algorithm with a step size h. More...
 
static double EvalForward (const IGenFunction &f, double x, double h)
 Computes the numerical derivative of a function f at a point x using an adaptive forward difference algorithm with a step size h. More...
 
static double EvalBackward (const IGenFunction &f, double x, double h)
 Computes the numerical derivative of a function f at a point x using an adaptive backward difference algorithm with a step size h. More...
 

#include </mnt/vdb/lsf/workspace/root-makedoc-v606/rootspi/rdoc/src/v6-06-00-patches/math/mathmore/src/GSLDerivator.h>

+ Collaboration diagram for ROOT::Math::GSLDerivator:

Constructor & Destructor Documentation

ROOT::Math::GSLDerivator::GSLDerivator ( )
inline

Default Constructor of a GSLDerivator class based on GSL numerical differentiation algorithms.

Definition at line 68 of file GSLDerivator.h.

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

destructor (no operations)

Definition at line 71 of file GSLDerivator.h.

Member Function Documentation

double ROOT::Math::GSLDerivator::Error ( ) const

return the estimate of the absolute error of the last derivative calculation

Definition at line 111 of file GSLDerivator.cxx.

Referenced by ROOT::Math::Derivator::Error().

double ROOT::Math::GSLDerivator::EvalBackward ( double  x,
double  h 
)

Computes the numerical derivative at a point x using an adaptive backward difference algorithm with a step size h.

The function is evaluated only at points less than x and at x itself.

Definition at line 69 of file GSLDerivator.cxx.

Referenced by ROOT::Math::Derivator::EvalBackward().

double ROOT::Math::GSLDerivator::EvalBackward ( const IGenFunction f,
double  x,
double  h 
)
static

Computes the numerical derivative of a function f at a point x using an adaptive backward difference algorithm with a step size h.

The function is evaluated only at points less than x and at x itself

Definition at line 99 of file GSLDerivator.cxx.

double ROOT::Math::GSLDerivator::EvalCentral ( double  x,
double  h 
)

Computes the numerical derivative at a point x using an adaptive central difference algorithm with a step size h.

Definition at line 47 of file GSLDerivator.cxx.

Referenced by ROOT::Math::Derivator::Eval(), and ROOT::Math::Derivator::EvalCentral().

double ROOT::Math::GSLDerivator::EvalCentral ( const IGenFunction f,
double  x,
double  h 
)
static

Computes the numerical derivative of a function f at a point x using an adaptive central difference algorithm with a step size h.

Definition at line 81 of file GSLDerivator.cxx.

double ROOT::Math::GSLDerivator::EvalForward ( double  x,
double  h 
)

Computes the numerical derivative at a point x using an adaptive forward difference algorithm with a step size h.

The function is evaluated only at points greater than x and at x itself.

Definition at line 58 of file GSLDerivator.cxx.

Referenced by ROOT::Math::Derivator::EvalForward().

double ROOT::Math::GSLDerivator::EvalForward ( const IGenFunction f,
double  x,
double  h 
)
static

Computes the numerical derivative of a function f at a point x using an adaptive forward difference algorithm with a step size h.

The function is evaluated only at points greater than x and at x itself

Definition at line 90 of file GSLDerivator.cxx.

double ROOT::Math::GSLDerivator::Result ( ) const

return the result of the last derivative calculation

Definition at line 109 of file GSLDerivator.cxx.

Referenced by ROOT::Math::Derivator::Result().

void ROOT::Math::GSLDerivator::SetFunction ( const IGenFunction f)

Set the function for calculating the derivatives.

The function must implement the ROOT::Math::IGenFunction signature

Definition at line 123 of file GSLDerivator.cxx.

Referenced by ROOT::Math::Derivator::Derivator(), ROOT::Math::Derivator::Eval(), and ROOT::Math::Derivator::SetFunction().

void ROOT::Math::GSLDerivator::SetFunction ( GSLFuncPointer  f,
void p = 0 
)

Set the function f for evaluating the derivative using a GSL function pointer type.

Parameters
f: free function pointer of the GSL required type
p: pointer to the object carrying the function state (for example the function object itself)

Definition at line 117 of file GSLDerivator.cxx.

int ROOT::Math::GSLDerivator::Status ( ) const

return the error status of the last integral calculation

Definition at line 113 of file GSLDerivator.cxx.

Referenced by ROOT::Math::Derivator::Status().

Member Data Documentation

double ROOT::Math::GSLDerivator::fError
private

Definition at line 163 of file GSLDerivator.h.

Referenced by Error(), EvalBackward(), EvalCentral(), and EvalForward().

GSLFunctionWrapper ROOT::Math::GSLDerivator::fFunction
private

Definition at line 165 of file GSLDerivator.h.

Referenced by EvalBackward(), EvalCentral(), EvalForward(), and SetFunction().

double ROOT::Math::GSLDerivator::fResult
private

Definition at line 162 of file GSLDerivator.h.

Referenced by EvalBackward(), EvalCentral(), EvalForward(), and Result().

int ROOT::Math::GSLDerivator::fStatus
private

Definition at line 161 of file GSLDerivator.h.

Referenced by EvalBackward(), EvalCentral(), EvalForward(), and Status().


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