Simple automatic Jacobian. More...
This class computes a numerical Jacobian by finite differencing. The stepsize is chosen to be or
if
.
This is nearly equivalent to the GSL method for computing Jacobians as in multiroots/fdjac.c
. To obtain the GSL behavior, set epsrel to GSL_SQRT_DBL_EPSILON
and set epsmin to zero. The mroot_hybrids and chi_fit_funct classes set epsrel to GSL_SQRT_DBL_EPSILON
in their constructor in order to partially mimic the GSL behavior, but do not set epsmin to zero.
This class does not separately check the vector and matrix sizes to ensure they are commensurate.
Default template arguments
func_t
- mm_funct11vec_t
- boost::numeric::ublas::vector<double>mat_t
- boost::numeric::ublas::matrix<double> Definition at line 126 of file jacobian.h.
#include <jacobian.h>
Public Member Functions | |
virtual int | operator() (size_t nx, vec_t &x, size_t ny, vec_t &y, mat_t &jac) |
The operator() | |
![]() | |
virtual int | set_function (func_t &f) |
Set the function to compute the Jacobian of. | |
Data Fields | |
double | epsrel |
The relative stepsize for finite-differencing (default ![]() | |
double | epsmin |
The minimum stepsize (default ![]() | |
bool | err_nonconv |
If true, call the error handler if the routine does not "converge". | |
Protected Attributes | |
vec_t | f |
Function values. | |
vec_t | xx |
Function arguments. | |
size_t | mem_size_x |
Size of allocated memory in x. | |
size_t | mem_size_y |
Size of allocated memory in y. | |
![]() | |
func_t | func |
A pointer to the user-specified function. | |
Documentation generated with Doxygen. Provided under the
GNU Free Documentation License (see License Information).
Hosted at
.