Class jacobian (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

Base for providing a numerical jacobian [abstract base].

This is provides a Jacobian which is numerically determined by differentiating a user-specified function (typically of the form of mm_funct).

By convention, the Jacobian is stored in the order J[i][j] (or J(i,j)) where the rows have index i which runs from 0 to ny-1 and the columns have index j with runs from 0 to nx-1.

Default template arguments

  • func_t - mm_funct

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

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

Subclassed by o2scl::jacobian_gsl< mm_funct, boost::numeric::ublas::vector< double >, boost::numeric::ublas::matrix< double > >, o2scl::jacobian_gsl< mm_funct, vector< double >, matrix< double > >, o2scl::jacobian_exact< func_t, vec_t, mat_t >, o2scl::jacobian_gsl< func_t, vec_t, mat_t >

Public Functions

inline jacobian()
inline virtual ~jacobian()
inline virtual int set_function(func_t &f)

Set the function to compute the Jacobian of.

virtual int operator()(size_t nx, vec_t &x, size_t ny, vec_t &y, mat_t &j) = 0

Evaluate the Jacobian j at point y(x)

Public Members

bool err_nonconv

If true, call the error handler if the routine does not converge.

Protected Attributes

func_t func

A pointer to the user-specified function.

Private Functions

jacobian(const jacobian&)
jacobian &operator=(const jacobian&)