Class interp_krige (o2scl)

O2scl : Class List

template<class vec_t, class vec2_t = vec_t, class covar_func_t = std::function<double(double, double)>, class covar_integ_t = std::function<double(double, double, double)>>
class o2scl::interp_krige : public o2scl::interp_base<vec_t, vec_t>

Interpolation by Kriging with a user-specified covariance function.

See also the Interpolation section of the O2scl User’s guide.

Note

The function set() stores a pointer to the covariance function and its derivatives and integrals so they cannot go out of scope before any of the interpolation functions are called.

Note

This class is experimental.

Select matrix inversion method

size_t matrix_mode

Method for matrix inversion.

const size_t matrix_cholesky = 0

Use Cholesky decomposition.

const size_t matrix_LU = 1

Use LU decomposition.

void set(size_t size, const vec_t &x, const vec2_t &y)

Initialize interpolation routine.

int set_covar_di_noise(size_t n_dim, const vec_t &x, const vec_t &y, covar_func_t &fcovar, covar_func_t &fderiv, covar_func_t &fderiv2, covar_func_t &finteg, double noise_var, bool err_on_fail = true)

Initialize interpolation routine, specifying derivatives and integrals [not yet implemented].

int set_covar_noise(size_t n_dim, const vec_t &x, const vec_t &y, covar_func_t &fcovar, double noise_var, bool err_on_fail = true)

Initialize interpolation routine.

int set_covar(size_t n_dim, const vec_t &x, const vec_t &y, covar_func_t &fcovar, bool err_on_fail = true)

Initialize interpolation routine.

double eval(double x0) const

Give the value of the function \( y(x=x_0) \) .

double deriv(double x0) const

Give the value of the derivative \( y^{\prime}(x=x_0) \) .

double deriv2(double x0) const

Give the value of the second derivative \( y^{\prime \prime}(x=x_0) \).

double integ(double a, double b) const

Give the value of the integral \( \int_a^{b}y(x)~dx \) .

const char *type() const

Return the type, "interp_krige".

interp_krige(const interp_krige<vec_t, vec2_t, covar_func_t, covar_integ_t>&)
interp_krige<vec_t, vec2_t, covar_func_t, covar_integ_t> &operator=(const interp_krige<vec_t, vec2_t, covar_func_t, covar_integ_t>&)

Public Types

typedef boost::numeric::ublas::vector<double> ubvector
typedef boost::numeric::ublas::matrix<double> ubmatrix
typedef boost::numeric::ublas::matrix_column<ubmatrix> ubmatrix_column

Public Functions

interp_krige()
~interp_krige()

Protected Attributes

ubvector Kinvf

Inverse covariance matrix times function vector.

covar_func_t *f

Pointer to user-specified covariance function.

covar_func_t *df

Pointer to user-specified derivative.

covar_func_t *df2

Pointer to user-specified second derivative.

covar_integ_t *intp

Pointer to user-specified integral.