OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
Classes | |
struct | PyPolynomialMap |
Functions | |
PyObject * | get_coefficients_as_matrix (PyObject *self, PyObject *args, PyObject *kwds) |
PyObject * | index_by_power (PyObject *py_class, PyObject *args, PyObject *kwds) |
PyObject * | evaluate (PyObject *self, PyObject *args, PyObject *kwds) |
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) |
PyObject * | _alloc (PyTypeObject *type, Py_ssize_t nitems) |
PyObject * | _new (PyTypeObject *type, Py_ssize_t nitems) |
void | _dealloc (PyPolynomialMap *self) |
void | _free (PyPolynomialMap *self) |
PyMODINIT_FUNC | initsquare_polynomial_map (void) |
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 |
std::string | class_docstring |
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().
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.