Class gradient (o2scl)

O2scl : Class List

template<class func_t, class vec_t = boost::numeric::ublas::vector<double>>
class gradient

Class for automatically computing gradients [abstract base].

Default template arguments

  • func_t - (no default)

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

    Idea for Future:

    Consider making an exact_grad class for computing exact gradients.

Subclassed by o2scl::gradient_gsl< multi_funct, boost::numeric::ublas::vector< double > >

Public Functions

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

Set the function to compute the gradient of.

virtual int operator()(size_t nv, vec_t &x, vec_t &g) = 0

Compute the gradient g at the point x.

Protected Attributes

func_t *func

A pointer to the user-specified function.

Private Functions

gradient(const gradient&)
gradient &operator=(const gradient&)