Class interpm_base (o2scl)

O2scl : Class List

template<class vec_t = boost::numeric::ublas::vector<double>, class mat_x_t = o2scl::matrix_view_table<>, class mat_y_t = o2scl::matrix_view_table<>>
class interpm_base

Base class for multidimensional interpolation.

Subclassed by o2scl::interpm_idw< boost::numeric::ublas::vector< double >, o2scl::const_matrix_view_table<>, o2scl::matrix_view_table<> >, o2scl::interpm_krige_optim< vector< double >, o2scl::const_matrix_view_table, o2scl::const_matrix_row_gen, o2scl::matrix_view_table, o2scl::matrix_column_gen, boost::numeric::ublas::matrix< double >, o2scl_linalg::matrix_invert_det_cholesky< boost::numeric::ublas::matrix< double > > >, o2scl::interpm_idw< vec_t, mat_x_t, mat_y_t >, o2scl::interpm_krige_optim< vec_t, mat_x_t, mat_x_row_t, mat_y_t, mat_y_col_t, mat_inv_kxx_t, mat_inv_t, vec3_t >, o2scl::interpm_python< vec_t, mat_x_t, mat_y_t >

Public Functions

inline interpm_base()
virtual int set_data(size_t n_in, size_t n_out, size_t n_pts, mat_x_t &user_x, mat_y_t &user_y) = 0

Set the data to be interpolated.

The variable user_x should be arranged so that parameters are indexed by the columns and data points are points are indexed by the rows. The variable user_y should be arranged so that output quantities are indexed by the columns and points are indexed by the rows. Children are allowed (but not required) to use swap to take over management of the input data. None of the values n_in, n_out, or n_pts are allowed to be zero. The matrix user_x should have n_pts rows and n_in columns, while the matrix user_y should have n_pts rows and n_out columns.

virtual int eval(const vec_t &x, vec_t &y) const = 0

Evaluate the interpolation at point x, returning y.

inline virtual int eval_unc(const vec_t &x, vec_t &y, vec_t &y_unc) const

Evaluate the interpolation at point x, returning y and the uncertainties in y_unc.

Public Members

bool err_nonconv

If true, throw exceptions on convergence errors (default true)

int verbose

Verbosity parameter (default 0)

Protected Attributes

size_t n_params

Number of parameters.

size_t n_outputs

Number of outputs.

size_t n_points

Number of points.