Class interpm_krige (o2scl)¶
-
template<class vec_t, class mat_x_t, class mat_x_row_t, class mat_x_col_t, class mat_y_t, class mat_y_row_t, class mat_inv_kxx_t, class covar_func_t = std::vector<std::function<double(double, double)>>, class mat_inv_t = o2scl_linalg::matrix_invert_det_cholesky<mat_inv_kxx_t>>
class interpm_krige¶ Multi-dimensional interpolation by kriging.
Note
The set data functions for this class uses a particular format, one different format than that in o2scl::interpm_idw . This design choice makes it easier to pass vector arguments to the covariance function and the linear algebra routines. The x and y objects should be of the form
x[n_points][n_in]
andy[n_out][n_points]
. A separate covariance function is required for each output.Note
This class assumes that the function specified in the call to set_data() is the same as that passed to the eval() functions. If this is not the case, the behavior of this class is undefined.
Note
Experimental.
Public Types
-
typedef boost::numeric::ublas::vector<double> ubvector¶
Public Functions
-
inline interpm_krige()¶
-
inline int set_data_di_noise_internal(size_t n_in, size_t n_out, size_t n_points, mat_x_t &user_x, mat_y_t &user_y, covar_func_t &fcovar, covar_func_t *fderiv, covar_func_t *fderiv2, const vec_t &noise_var, bool rescale = false, bool err_on_fail = true)¶
Initialize the data for the interpolation.
Note
This function works differently than o2scl::interpm_idw::set_data() . See this class description for more details.
-
inline void unscale()¶
Remove the rescaling of the data.
-
inline int set_data(size_t n_in, size_t n_out, size_t n_points, mat_x_t &user_x, mat_y_t &user_y, covar_func_t &fcovar, bool rescale = false, bool err_on_fail = true)¶
Initialize the data for the interpolation.
Note
This function works differently than o2scl::interpm_idw::set_data() . See this class description for more details.
-
template<class vec2_t, class vec3_t, class covar_func2_t>
inline void eval(const vec2_t &x0, vec3_t &y0, covar_func2_t &f2)¶ Given covariance function
fcovar
and input vectorx
store the result of the interpolation iny
.
Public Members
-
bool keep_matrix¶
If true, keep \( K^{-1} \) (default true)
-
int verbose¶
Verbosity parameter (default 0)
Protected Attributes
-
std::vector<mat_inv_kxx_t> inv_KXX¶
The inverse of the covariance matrix for each output quantity.
-
covar_func_t *f¶
Pointer to user-specified covariance function.
-
covar_func_t *fd¶
Pointer to user-specified derivative.
-
covar_func_t *fd2¶
Pointer to user-specified second derivative.
-
size_t np¶
The number of points.
-
size_t nd_in¶
The number of dimensions of the inputs.
-
size_t nd_out¶
The number of dimensions of the outputs.
-
bool data_set¶
True if the data has been specified.
-
bool rescaled¶
True if the data needs to be rescaled.
-
typedef boost::numeric::ublas::vector<double> ubvector¶