Class nflows_python (o2scl)¶
-
template<class vec_t = std::vector<double>>
class nflows_python : public o2scl::prob_dens_mdim<std::vector<double>>¶ Multidimensional interpolation interface for python.
Public Functions
-
inline nflows_python()¶
-
inline nflows_python(std::string module, o2scl::tensor<> ¶ms, std::string options = "", std::string class_name = "", int v = 0)¶
Specify the Python module and function.
-
inline virtual ~nflows_python()¶
Free memory associated with the NFLOWS.
-
inline void free()¶
Free the associated memory.
-
inline int set_function(std::string mod_str, o2scl::tensor<> ¶ms, 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.
-
inline void *set_function_internal(std::string module, o2scl::tensor<> ¶ms, int &ret, std::string options = "", std::string class_name = "", int v = 0)¶
Internal version of set_function()
-
inline virtual size_t dim() const¶
Return the dimensionality.
Public Members
-
bool array_copy¶
If true, then make a copy of the array before calling log_pdf() (default true)
- Todo:
This should be done by a template specialization instead of a bool flag
-
std::string set_func¶
The name of the set function (default “set_data_str”)
-
std::string sample_func¶
The name of the sample function (default “sample”)
-
std::string ld_func¶
The name of the log pdf function (default “log_pdf”)
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_ld_args¶
Function arguments.
-
PyObject *p_set_func¶
Python function.
-
PyObject *p_sample_func¶
Python function.
-
PyObject *p_ld_func¶
Python function.
-
size_t n_params¶
Number of parameters.
-
size_t n_points¶
Number of points.
Private Functions
-
nflows_python(const nflows_python&)¶
-
nflows_python &operator=(const nflows_python&)¶
-
inline nflows_python()¶