Class interpm_python (o2scl)¶
-
class interpm_python¶
Multidimensional interpolation interface for python.
Public Functions
-
interpm_python()¶
-
interpm_python(std::string module, std::string set_func, std::string eval_func, std::string eval_unc_func, size_t n_pars, size_t n_dat, size_t n_out, const o2scl::tensor<> ¶ms, const o2scl::tensor<> &outputs, std::string options = "", std::string class_name = "", int v = 0)¶
Specify the Python module and function.
-
void free()¶
-
virtual ~interpm_python()¶
-
int set_function(std::string module, std::string set_func, std::string eval_func, std::string eval_unc_func, size_t n_pars, size_t n_dat, size_t n_out, const o2scl::tensor<> ¶ms, const o2scl::tensor<> &outputs, std::string options = "", std::string class_name = "", int v = 0)¶
Specify the python and the parameters.
This function is called by the constructor and thus cannot be virtual.
-
void *set_function_internal(std::string module, std::string set_func, std::string eval_func, std::string eval_unc_func, size_t n_pars, size_t n_dat, size_t n_out, const o2scl::tensor<> ¶ms, const o2scl::tensor<> &outputs, std::string options, std::string class_name, int v, int &ret)¶
-
virtual int eval(const std::vector<double> &x, std::vector<double> &y) const¶
Compute the function at point
x
and return the result.
-
virtual int eval_unc(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 Attributes
-
PyObject *p_module¶
Python module containing function.
-
PyObject *p_class¶
The class.
-
PyObject *p_instance¶
An instance of the class.
-
PyObject *p_set_args¶
Function arguments.
-
PyObject *p_eval_args¶
Function arguments.
-
PyObject *p_set_func¶
Python function.
-
PyObject *p_eval_func¶
Python function.
-
PyObject *p_eval_unc_func¶
Python function.
-
int verbose¶
Verbosity parameter.
-
size_t n_params¶
Number of parameters.
-
size_t n_outputs¶
Number of outputs.
-
size_t n_points¶
Number of points.
Private Functions
-
interpm_python(const interpm_python&)¶
-
interpm_python &operator=(const interpm_python&)¶
-
interpm_python()¶