Class mcovar_funct_rbf (o2scl)

O2scl : Class List

class mcovar_funct_rbf

Covariance function: 1D RBF with a noise term.

Note

There’s no point making a base class, since there aren’t really any virtual functions. The covariance functions have to be templates, to handle multiple vector types, so no virtual functions are allowed.

Public Functions

inline mcovar_funct_rbf()
inline size_t get_n_params()

Get the number of parameters.

template<class vec_t>
inline void set_params(vec_t &p)

Set the parameters.

template<class vec_t, class vec2_t>
inline double operator()(const vec_t &x1, const vec2_t &x2)

The covariance function.

template<class vec_t, class vec2_t>
inline double deriv(vec_t &x1, vec2_t &x2, size_t ix)

The derivative of the covariance function with respect to the first argument.

template<class vec_t, class vec2_t>
inline double deriv2(vec_t &x1, vec2_t &x2, size_t ix, size_t iy)

The second derivative of the covariance function with respect to the first argument.

Public Members

std::vector<double> len

Length parameters.

double noise

Noise parameter.