![]() |
The Gaudi Framework
v26r3
|
Numerical derivative (using GSL adaptive numerical differentiation) More...


Public Types | |
| enum | Type { Central, Forward, Backward, Central, Forward, Backward } |
| the type of numerical differentiation More... | |
| enum | Type { Central, Forward, Backward, Central, Forward, Backward } |
| the type of numerical differentiation More... | |
Public Member Functions | |
| NumericalDerivative (const AbsFunction &function, const size_t index, const Type &type=Central) | |
| From CLHEP/GenericFunctions. More... | |
| NumericalDerivative (const NumericalDerivative &right) | |
| copy constructor More... | |
| virtual | ~NumericalDerivative () |
| virtual destructor More... | |
| virtual unsigned int | dimensionality () const |
| dimensionality of the problem More... | |
| virtual double | operator() (double argument) const |
| Function value. More... | |
| virtual double | operator() (const Argument &argument) const |
| Function value. More... | |
| virtual bool | hasAnalyticDerivative () const |
| Does this function have an analytic derivative? More... | |
| virtual Derivative | partial (unsigned int index) const |
| Derivatives. More... | |
| const AbsFunction & | function () const |
| access to the function itself More... | |
| size_t | index () const |
| index More... | |
| const Type & | type () const |
| type More... | |
| const Type & | setType (const Type &value) |
| change the type of the adaptive differentiation More... | |
| double | result () const |
| the result of the last call More... | |
| double | error () const |
| the absolute error estimate for the last call More... | |
| NumericalDerivative (const AbsFunction &function, const size_t index, const Type &type=Central) | |
| From CLHEP/GenericFunctions. More... | |
| NumericalDerivative (const NumericalDerivative &right) | |
| copy constructor More... | |
| virtual | ~NumericalDerivative () |
| virtual destructor More... | |
| virtual unsigned int | dimensionality () const |
| dimensionality of the problem More... | |
| virtual double | operator() (double argument) const |
| Function value. More... | |
| virtual double | operator() (const Argument &argument) const |
| Function value. More... | |
| virtual bool | hasAnalyticDerivative () const |
| Does this function have an analytic derivative? More... | |
| virtual Derivative | partial (unsigned int index) const |
| Derivatives. More... | |
| const AbsFunction & | function () const |
| access to the function itself More... | |
| size_t | index () const |
| index More... | |
| const Type & | type () const |
| type More... | |
| const Type & | setType (const Type &value) |
| change the type of the adaptive differentiation More... | |
| double | result () const |
| the result of the last call More... | |
| double | error () const |
| the absolute error estimate for the last call More... | |
Protected Member Functions | |
| StatusCode | Exception (const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const |
| Exception. More... | |
| StatusCode | Exception (const std::string &message, const StatusCode &sc=StatusCode::FAILURE) const |
Private Member Functions | |
| NumericalDerivative () | |
| NumericalDerivative & | operator= (const NumericalDerivative &) |
| NumericalDerivative () | |
| NumericalDerivative & | operator= (const NumericalDerivative &) |
Private Attributes | |
| const AbsFunction * | m_function |
| size_t | m_index |
| size_t | m_DIM |
| Type | m_type |
| Argument | m_argument |
| double | m_result |
| double | m_error |
Numerical derivative (using GSL adaptive numerical differentiation)
\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_i , x_{i+1}, \dots , x_n \right) = \frac{\partial}{\partial x_i} f \left(x_1, \dots , x_{i-1}, x_i , x_{i+1}, \dots , x_n \right) \]
Definition at line 36 of file NumericalDerivative.h.
the type of numerical differentiation
| Enumerator | |
|---|---|
| Central | |
| Forward | |
| Backward | |
| Central | |
| Forward | |
| Backward | |
Definition at line 40 of file NumericalDerivative.h.
the type of numerical differentiation
| Enumerator | |
|---|---|
| Central | |
| Forward | |
| Backward | |
| Central | |
| Forward | |
| Backward | |
Definition at line 40 of file NumericalDerivative.h.
| Genfun::GaudiMathImplementation::NumericalDerivative::NumericalDerivative | ( | const AbsFunction & | function, |
| const size_t | index, | ||
| const Type & | type = Central |
||
| ) |
From CLHEP/GenericFunctions.
from CLHEP/GenericFunctions
The standard constructor from AbsFunction and the index of the variable
The function, created with this constructor compute the numerical derivatived by finite differencing,. An adaptive algorithm is used to find teh best choice of finite difference and to estimate the error in derivative
\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_i , x_{i+1}, \dots , x_n \right) = \frac{\partial}{\partial x_i} f \left(x_1, \dots , x_{i-1}, x_i , x_{i+1}, \dots , x_n \right) \]
gsl_diff_central is used for type = Type::Centralgsl_diff_forward is used for type = Type::Forward. The function is evaluated only at points greater than x_i and x_i itself. This function should be used if f(x) has a singularity or if it is undefined for values less than x_i gsl_diff_backward is used for type = Type::Backward. The function is evaluated only at points smaller than x_i and x_i itself. This function should be used if f(x) has a singularity or if it is undefined for values greater than x_i The adaptime numerical differentiation is used
| function | the function |
| index | the variable index |
The standard constructor from AbsFunction and the index of the variable
| function | the function |
| index | the variable index |
Definition at line 53 of file NumericalDerivative.cpp.
| Genfun::GaudiMathImplementation::NumericalDerivative::NumericalDerivative | ( | const NumericalDerivative & | right | ) |
copy constructor
Definition at line 74 of file NumericalDerivative.cpp.
|
virtual |
virtual destructor
destructor
Definition at line 89 of file NumericalDerivative.cpp.
|
private |
| Genfun::GaudiMathImplementation::NumericalDerivative::NumericalDerivative | ( | const AbsFunction & | function, |
| const size_t | index, | ||
| const Type & | type = Central |
||
| ) |
From CLHEP/GenericFunctions.
The standard constructor from AbsFunction and the index of the variable
The function, created with this constructor compute the numerical derivatived by finite differencing,. An adaptive algorithm is used to find teh best choice of finite difference and to estimate the error in derivative
\[ {\mathcal{F}}_i \left(x_1, \dots , x_{i-1}, x_i , x_{i+1}, \dots , x_n \right) = \frac{\partial}{\partial x_i} f \left(x_1, \dots , x_{i-1}, x_i , x_{i+1}, \dots , x_n \right) \]
gsl_diff_central is used for type = Type::Centralgsl_diff_forward is used for type = Type::Forward. The function is evaluated only at points greater than x_i and x_i itself. This function should be used if f(x) has a singularity or if it is undefined for values less than x_i gsl_diff_backward is used for type = Type::Backward. The function is evaluated only at points smaller than x_i and x_i itself. This function should be used if f(x) has a singularity or if it is undefined for values greater than x_i The adaptime numerical differentiation is used
| function | the function |
| index | the variable index |
| Genfun::GaudiMathImplementation::NumericalDerivative::NumericalDerivative | ( | const NumericalDerivative & | right | ) |
copy constructor
|
virtual |
virtual destructor
|
private |
|
inlinevirtual |
dimensionality of the problem
Definition at line 98 of file NumericalDerivative.h.
|
inlinevirtual |
dimensionality of the problem
Definition at line 98 of file NumericalDerivative.h.
|
inline |
the absolute error estimate for the last call
Definition at line 126 of file NumericalDerivative.h.
|
inline |
the absolute error estimate for the last call
Definition at line 126 of file NumericalDerivative.h.
|
protected |
|
protected |
|
inline |
access to the function itself
Definition at line 114 of file NumericalDerivative.h.
|
inline |
access to the function itself
Definition at line 114 of file NumericalDerivative.h.
|
inlinevirtual |
Does this function have an analytic derivative?
Definition at line 106 of file NumericalDerivative.h.
|
inlinevirtual |
Does this function have an analytic derivative?
Definition at line 106 of file NumericalDerivative.h.
|
inline |
index
Definition at line 116 of file NumericalDerivative.h.
|
inline |
index
Definition at line 116 of file NumericalDerivative.h.
|
virtual |
Function value.
Definition at line 164 of file NumericalDerivative.cpp.
|
virtual |
Function value.
|
virtual |
Function value.
|
virtual |
Function value.
copy the argument
use GSL to evaluate the numerical derivative
Definition at line 118 of file NumericalDerivative.cpp.
|
private |
|
private |
|
virtual |
Derivatives.
Definition at line 104 of file NumericalDerivative.cpp.
|
virtual |
Derivatives.
|
inline |
the result of the last call
Definition at line 124 of file NumericalDerivative.h.
|
inline |
the result of the last call
Definition at line 124 of file NumericalDerivative.h.
| const NumericalDerivative::Type & Genfun::GaudiMathImplementation::NumericalDerivative::setType | ( | const Type & | value | ) |
change the type of the adaptive differentiation
Definition at line 97 of file NumericalDerivative.cpp.
change the type of the adaptive differentiation
|
inline |
type
Definition at line 118 of file NumericalDerivative.h.
|
inline |
type
Definition at line 118 of file NumericalDerivative.h.
|
mutableprivate |
Definition at line 147 of file NumericalDerivative.h.
|
private |
Definition at line 144 of file NumericalDerivative.h.
|
mutableprivate |
Definition at line 149 of file NumericalDerivative.h.
|
private |
Definition at line 142 of file NumericalDerivative.h.
|
private |
Definition at line 143 of file NumericalDerivative.h.
|
mutableprivate |
Definition at line 148 of file NumericalDerivative.h.
|
private |
Definition at line 145 of file NumericalDerivative.h.