Class interpm_python (o2scl)¶
-
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_transpose<>>
class interpm_python : public o2scl::interpm_base<boost::numeric::ublas::vector<double>, o2scl::matrix_view_table<>, o2scl::matrix_view_table_transpose<>>¶ Multidimensional interpolation interface for python.
Public Functions
-
inline interpm_python(std::string class_name = "", std::string options = "", int cpp_verbose = 0, std::string module_name = "o2sclpy", std::string set_func = "set_data_str", std::string eval_func = "eval", std::string eval_unc_func = "eval_unc", std::string eval_list_func = "eval_list")¶
Specify the Python module and function.
-
inline void free()¶
Free memory associated with the Python objects and the interpolation.
Note
This function does not finalize the Python interface.
-
inline virtual ~interpm_python()¶
-
inline int set_functions(std::string class_name = "", std::string options = "", int cpp_verbose = 0, std::string s_module = "o2sclpy", std::string set_func = "set_data_str", std::string eval_func = "eval", std::string eval_unc_func = "eval_unc", std::string eval_list_func = "eval_list")¶
Specify the python module, class, functions, and options.
-
inline 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)¶
Set the data to be interpolated.
-
inline int set_data_tensor(size_t n_in, size_t n_out, size_t n_pts, const o2scl::tensor<> ¶ms, const o2scl::tensor<> &outputs)¶
Set the data to be interpolated (tensor form)
-
inline int eval_std_vec(const std::vector<double> &x, std::vector<double> &y) const¶
Compute the function at point
x
and return the result.
-
inline int eval_unc_std_vec(const std::vector<double> &x, std::vector<double> &y, std::vector<double> &y_unc) const¶
Compute the function at point
x
and return the result.
Protected Functions
Protected Attributes
-
PyObject *p_module¶
Python module.
-
PyObject *p_class¶
Python class.
-
PyObject *p_instance¶
An instance of the Python class.
-
PyObject *p_set_args¶
Python function arguments for the set function.
-
PyObject *p_eval_args¶
Python function arguments for the evaluation function.
-
PyObject *p_set_func¶
Python set function.
-
PyObject *p_eval_func¶
Python evaluation function.
-
PyObject *p_eval_unc_func¶
Python evaluation with uncertainties function.
-
PyObject *p_eval_list_func¶
Python evaluation with uncertainties function.
-
std::string c_module¶
Name of Python module.
-
std::string c_set_func¶
Name of Python set function.
-
std::string c_eval_func¶
Name of Python eval function.
-
std::string c_eval_unc_func¶
Name of Python evaluation with uncertainties function.
-
std::string c_eval_list_func¶
Name of Python list evaluation function.
-
std::string c_class_name¶
Python class name.
-
std::string c_options¶
Python options.
Private Functions
-
interpm_python(const interpm_python&)¶
-
interpm_python &operator=(const interpm_python&)¶
-
inline interpm_python(std::string class_name = "", std::string options = "", int cpp_verbose = 0, std::string module_name = "o2sclpy", std::string set_func = "set_data_str", std::string eval_func = "eval", std::string eval_unc_func = "eval_unc", std::string eval_list_func = "eval_list")¶