Class jacobian_exact (o2scl)

O2scl : Class List

template<class func_t = mm_funct, class vec_t = boost::numeric::ublas::vector<double>, class mat_t = boost::numeric::ublas::matrix<double>>
class jacobian_exact : public o2scl::jacobian<mm_funct, boost::numeric::ublas::vector<double>, boost::numeric::ublas::matrix<double>>

A direct calculation of the jacobian using a deriv_base object.

By default, the stepsize, deriv_gsl::h is set to \( 10^{-4} \) in the jacobian_exact constructor.

Note that it is most often wasteful to use this Jacobian in a root-finding routine and using more approximate Jacobians is more efficient.

Default template arguments

  • func_t - mm_funct

  • vec_t - boost::numeric::ublas::vector<double>

  • mat_t - boost::numeric::ublas::matrix<double>

Public Functions

inline jacobian_exact()
inline int set_deriv(deriv_base<> &de)

Set the derivative object.

inline virtual int operator()(size_t nx, vec_t &x, size_t ny, vec_t &y, mat_t &jac)

The operator()

inline virtual int jac_err(size_t nx, vec_t &x, size_t ny, vec_t &y, mat_t &jac, mat_t &err)

Compute the Jacobian and its uncertainty from the numerical differentiation.

Public Members

deriv_gsl def_deriv

The default derivative object.

Protected Functions

inline double dfn(double x, ej_parms &ejp)

Function for the derivative object.

Protected Attributes

deriv_base *dptr

Pointer to the derivative object.

struct ej_parms

Parameter structure for passing information.

This class is primarily useful for specifying derivatives for using the jacobian::set_deriv() function.

Public Members

size_t nx

The number of variables.

size_t ny

The number of variables.

size_t xj

The current x value.

size_t yi

The current y value.

vec_t *x

The x vector.

vec_t *y

The y vector.