#include <deriv.h>
This base class does not perform any actual differentiation. Use one of the children cern_deriv, gsl_deriv, or eqi_deriv instead.
This base class contains some code to automatically apply the first derivative routines to compute second or third derivatives. The error estimates for these will likely be underestimated.
Definition at line 54 of file deriv.h.
Public Member Functions | |
deriv () | |
virtual | ~deriv () |
virtual double | calc (double x, param_t &pa, func_t &func) |
Calculate the first derivative of func w.r.t. x. | |
virtual double | calc2 (double x, param_t &pa, func_t &func) |
Calculate the second derivative of func w.r.t. x. | |
virtual double | calc3 (double x, param_t &pa, func_t &func) |
Calculate the third derivative of func w.r.t. x. | |
virtual double | get_err () |
Get uncertainty of last calculation. | |
virtual int | calc_err (double x, param_t &pa, func_t &func, double &dfdx, double &err) |
Calculate the first derivative of func w.r.t. x and the uncertainty. | |
virtual int | calc2_err (double x, param_t &pa, func_t &func, double &d2fdx2, double &err) |
Calculate the second derivative of func w.r.t. x and the uncertainty. | |
virtual int | calc3_err (double x, param_t &pa, func_t &func, double &d3fdx3, double &err) |
Calculate the third derivative of func w.r.t. x and the uncertainty. | |
virtual const char * | type () |
Return string denoting type ("deriv"). | |
Data Fields | |
int | verbose |
Output control. | |
Protected Member Functions | |
virtual double | calc_int (double x, dpars &pa, o2scl::funct< dpars > &func) |
Calculate the first derivative of func w.r.t. x. | |
virtual int | calc_err_int (double x, dpars &pa, o2scl::funct< dpars > &func, double &dfdx, double &err) |
Calculate the first derivative of func w.r.t. x and the uncertainty. | |
double | derivfun (double x, dpars &dp) |
The function for the second derivative. | |
double | derivfun2 (double x, dpars &dp) |
The function for the third derivative. | |
Protected Attributes | |
bool | from_calc |
Avoids infinite loops in case the user calls the base class version. | |
double | derr |
The uncertainity in the most recent derivative computation. | |
Data Structures | |
struct | dpars |
A structure for passing the function to second and third derivatives. More... |
virtual double calc | ( | double | x, | |
param_t & | pa, | |||
func_t & | func | |||
) | [inline, virtual] |
virtual int calc_err_int | ( | double | x, | |
dpars & | pa, | |||
o2scl::funct< dpars > & | func, | |||
double & | dfdx, | |||
double & | err | |||
) | [inline, protected, virtual] |
Calculate the first derivative of func
w.r.t. x and the uncertainty.
This is an internal version of calc_err() which is used in computing second and third derivatives
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page