simple_jacobian Class Template Reference

#include <jacobian.h>

Inheritance diagram for simple_jacobian:

jacobian jac_funct

Detailed Description

template<class param_t, class func_t, class vec_t = ovector_view, class mat_t = omatrix_view, class alloc_vec_t = ovector, class alloc_t = ovector_alloc>
class simple_jacobian< param_t, func_t, vec_t, mat_t, alloc_vec_t, alloc_t >

Simple automatic Jacobian.

This simple routine is nearly equivalent to GSL as given in multiroots/fdjac.c. It has an additional test to ensure that the finite-differencing stepsize does not vanish, and returns an error if the Jacobian is singular. To obtain the GSL behavior, set epsrel to GSL_SQRT_DBL_EPSILON and set epsmin to zero.

This class does not separately check the vector and matrix sizes to ensure they are commensurate.

Todo:
Double check that this class works with arrays

Definition at line 228 of file jacobian.h.


Public Member Functions

 simple_jacobian ()
virtual int operator() (size_t nv, vec_t &x, vec_t &y, mat_t &jac, param_t &pa)
 The operator().

Data Fields

double epsrel
 The relative stepsize for finite-differencing (default $ 10^{-4} $ ).
double epsmin
 The minimum stepsize (default $ 10^{-15} $).
alloc_t ao
 For memory allocation.

The documentation for this class was generated from the following file:
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.