|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
Classes | |
| struct | PyPolynomialMap |
| PyPolynomialMap is the python implementation of the C++ PolynomialMap class. More... | |
Functions | |
| PyObject * | get_coefficients_as_matrix (PyObject *self, PyObject *args, PyObject *kwds) |
| Get the PolynomialMap coefficients. More... | |
| PyObject * | index_by_power (PyObject *py_class, PyObject *args, PyObject *kwds) |
| PyObject * | evaluate (PyObject *self, PyObject *args, PyObject *kwds) |
| Calculate a polynomial vector. More... | |
| std::vector< std::vector< double > > | get_vectors (PyObject *py_floats) |
| PyObject * | exact_solve (PyObject *py_class, PyObject *args, PyObject *kwds) |
| PyObject * | least_squares (PyObject *py_class, PyObject *args, PyObject *kwds) |
| int | _init (PyObject *self, PyObject *args, PyObject *kwds) |
| _init initialises an allocated PyPolynomialMap object More... | |
| PyObject * | _alloc (PyTypeObject *type, Py_ssize_t nitems) |
| _alloc allocates memory for PyPolynomialMap More... | |
| PyObject * | _new (PyTypeObject *type, Py_ssize_t nitems) |
| void | _dealloc (PyPolynomialMap *self) |
| deallocate memory More... | |
| void | _free (PyPolynomialMap *self) |
| synonym for dealloc More... | |
| PyMODINIT_FUNC | initsquare_polynomial_map (void) |
| Initialise polynomial_map module. More... | |
Variables | |
| std::string | get_coefficients_as_matrix_docstring |
| std::string | index_by_power_docstring |
| std::string | evaluate_docstring |
| std::string | exact_solve_docstring |
| std::string | least_squares_docstring |
| static PyMemberDef | _members [] |
| static PyMethodDef | _methods [] |
| std::string | class_docstring |
| static PyTypeObject | PyPolynomialMapType |
| struct PySquarePolynomialMap::PyPolynomialMap |
PyPolynomialMap is the python implementation of the C++ PolynomialMap class.
Provides a multivariate polynomial object
Definition at line 34 of file PySquarePolynomialMap.h.

| Class Members | ||
|---|---|---|
| SquarePolynomialVector * | map | |
| PyObject_HEAD | ||
| static PyObject * PySquarePolynomialMap::_alloc | ( | PyTypeObject * | type, |
| Py_ssize_t | nitems | ||
| ) |
_alloc allocates memory for PyPolynomialMap
| type | - pointer to aPyPolynomialMapType object, as defined in PyPolynomialMap.cc |
returns a PyPolynomialMap* (cast as a PyObject*); caller owns this memory
Definition at line 474 of file PySquarePolynomialMap.cpp.
References PySquarePolynomialMap::PyPolynomialMap::map.
Referenced by _new(), exact_solve(), and least_squares().
| static void PySquarePolynomialMap::_dealloc | ( | PyPolynomialMap * | self | ) |
deallocate memory
@params self an initialised PyPolynomialMap*; memory will be freed by this function
Definition at line 487 of file PySquarePolynomialMap.cpp.
References _free().

| static void PySquarePolynomialMap::_free | ( | PyPolynomialMap * | self | ) |
synonym for dealloc
Definition at line 491 of file PySquarePolynomialMap.cpp.
References PySquarePolynomialMap::PyPolynomialMap::map.
Referenced by _dealloc().
| static int PySquarePolynomialMap::_init | ( | PyObject * | self, |
| PyObject * | args, | ||
| PyObject * | kwds | ||
| ) |
_init initialises an allocated PyPolynomialMap object
| self | an initialised PyPolynomialMap* cast as a PyObject*; caller owns this memory |
| args | not used |
| kwds | not used |
Definition at line 396 of file PySquarePolynomialMap.cpp.
References PySquarePolynomialMap::PyPolynomialMap::map.
| PyObject * PySquarePolynomialMap::_new | ( | PyTypeObject * | type, |
| Py_ssize_t | nitems | ||
| ) |
Definition at line 483 of file PySquarePolynomialMap.cpp.
References _alloc().

| static PyObject * PySquarePolynomialMap::evaluate | ( | PyObject * | self, |
| PyObject * | args, | ||
| PyObject * | kwds | ||
| ) |
Calculate a polynomial vector.
| self | a PyPolynomialMap |
| args | arguments to the function (not used) |
| kwds | keyword arguments to the function - see docstring |
Definition at line 131 of file PySquarePolynomialMap.cpp.
References interpolation::SquarePolynomialVector::F(), PySquarePolynomialMap::PyPolynomialMap::map, interpolation::SquarePolynomialVector::PointDimension(), and interpolation::SquarePolynomialVector::ValueDimension().

| PyObject * PySquarePolynomialMap::exact_solve | ( | PyObject * | py_class, |
| PyObject * | args, | ||
| PyObject * | kwds | ||
| ) |
Definition at line 230 of file PySquarePolynomialMap.cpp.
References _alloc(), get_vectors(), PySquarePolynomialMap::PyPolynomialMap::map, QRDecomposition::solve(), and ClassicException::what().

| static PyObject * PySquarePolynomialMap::get_coefficients_as_matrix | ( | PyObject * | self, |
| PyObject * | args, | ||
| PyObject * | kwds | ||
| ) |
Get the PolynomialMap coefficients.
| self | a PyPolynomialMap |
| args | arguments to the function (not used) |
| kwds | keyword arguments to the function - see docstring |
Definition at line 42 of file PySquarePolynomialMap.cpp.
References interpolation::SquarePolynomialVector::GetCoefficientsAsMatrix(), PySquarePolynomialMap::PyPolynomialMap::map, interpolation::MMatrix< Tmplt >::num_col(), and interpolation::MMatrix< Tmplt >::num_row().

| std::vector< std::vector< double > > PySquarePolynomialMap::get_vectors | ( | PyObject * | py_floats | ) |
Definition at line 190 of file PySquarePolynomialMap.cpp.
Referenced by exact_solve(), and least_squares().
| PyObject * PySquarePolynomialMap::index_by_power | ( | PyObject * | py_class, |
| PyObject * | args, | ||
| PyObject * | kwds | ||
| ) |
Definition at line 85 of file PySquarePolynomialMap.cpp.
References interpolation::SquarePolynomialVector::IndexByPower().

| PyMODINIT_FUNC PySquarePolynomialMap::initsquare_polynomial_map | ( | void | ) |
Initialise polynomial_map module.
This is called by import polynomial_map; it initialises the PolynomialMap type allowing user to construct and call methods on PolynomialMap objects
| PyObject * PySquarePolynomialMap::least_squares | ( | PyObject * | py_class, |
| PyObject * | args, | ||
| PyObject * | kwds | ||
| ) |
Definition at line 307 of file PySquarePolynomialMap.cpp.
References _alloc(), PyPolynomialCoefficient::PyCoefficient::coeff, get_vectors(), PySquarePolynomialMap::PyPolynomialMap::map, and ClassicException::what().

|
static |
Definition at line 499 of file PySquarePolynomialMap.cpp.
|
static |
Definition at line 503 of file PySquarePolynomialMap.cpp.
| std::string PySquarePolynomialMap::class_docstring |
Definition at line 517 of file PySquarePolynomialMap.cpp.
| std::string PySquarePolynomialMap::evaluate_docstring |
Definition at line 124 of file PySquarePolynomialMap.cpp.
| std::string PySquarePolynomialMap::exact_solve_docstring |
Definition at line 177 of file PySquarePolynomialMap.cpp.
| std::string PySquarePolynomialMap::get_coefficients_as_matrix_docstring |
Definition at line 36 of file PySquarePolynomialMap.cpp.
| std::string PySquarePolynomialMap::index_by_power_docstring |
Definition at line 72 of file PySquarePolynomialMap.cpp.
| std::string PySquarePolynomialMap::least_squares_docstring |
Definition at line 290 of file PySquarePolynomialMap.cpp.
|
static |
Definition at line 529 of file PySquarePolynomialMap.cpp.
Referenced by PyInit_polynomial_map().