#include <cern_deriv.h>
This uses Romberg extrapolation to compute the derivative with the finite-differencing formula
If root::verbose is greater than zero, then each iteration prints out the extrapolation table, and if root::verbose is greater than 1, then a keypress is required at the end of each iteration.
Based on the CERNLIB routine DERIV(), which was based on Rutishauser63 .
Definition at line 59 of file cern_deriv.h.
Public Member Functions | |
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 | calc_err_int (double x, typename deriv< param_t, func_t >::dpars &pa, funct< typename deriv< param_t, func_t >::dpars > &func, double &dfdx, double &err) |
virtual const char * | type () |
Return string denoting type ("cern_deriv"). | |
Data Fields | |
double | delta |
A scaling factor (default 1.0). | |
double | eps |
Extrapolation tolerance (default is ![]() | |
Protected Attributes | |
Storage for the fixed coefficients | |
double | dx [10] |
double | w [10][4] |
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