9 #include "../BPy_Convert.h"
10 #include "../BPy_IntegrationType.h"
11 #include "../BPy_Interface1D.h"
74 "GetDirectionalViewMapDensityF1D",
145 "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DDouble`\n"
147 "Base class for unary functions (functors) that work on\n"
148 ":class:`Interface1D` and return a float value.\n"
150 ".. method:: __init__()\n"
151 " __init__(integration_type)\n"
153 " Builds a unary 1D function using the default constructor\n"
154 " or the integration method given as an argument.\n"
156 " :arg integration_type: An integration method.\n"
157 " :type integration_type: :class:`IntegrationType`\n";
163 static const char *kwlist[] = {
"integration",
nullptr};
164 PyObject *obj =
nullptr;
166 if (!PyArg_ParseTupleAndKeywords(
178 self->uf1D_double->py_uf1D = (PyObject *)
self;
185 delete self->uf1D_double;
191 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf1D_double);
198 static const char *kwlist[] = {
"inter",
nullptr};
199 PyObject *obj =
nullptr;
201 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Interface1D_Type, &obj)) {
206 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
210 if (!PyErr_Occurred()) {
211 string class_name(Py_TYPE(
self)->tp_name);
212 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
216 return PyFloat_FromDouble(
self->uf1D_double->result);
222 "The integration method.\n"
224 ":type: :class:`IntegrationType`");
236 PyErr_SetString(PyExc_TypeError,
"value must be an IntegrationType");
247 integration_type_doc,
249 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
255 PyVarObject_HEAD_INIT(
nullptr, 0)
"UnaryFunction1DDouble",
273 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
PyObject * BPy_IntegrationType_from_IntegrationType(IntegrationType i)
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyTypeObject Curvature2DAngleF1D_Type
PyTypeObject DensityF1D_Type
PyTypeObject GetCompleteViewMapDensityF1D_Type
PyTypeObject GetDirectionalViewMapDensityF1D_Type
PyTypeObject GetProjectedXF1D_Type
PyTypeObject GetProjectedYF1D_Type
PyTypeObject GetProjectedZF1D_Type
PyTypeObject GetSteerableViewMapDensityF1D_Type
PyTypeObject GetViewMapGradientNormF1D_Type
PyTypeObject GetXF1D_Type
PyTypeObject GetYF1D_Type
PyTypeObject GetZF1D_Type
PyTypeObject IntegrationType_Type
#define BPy_IntegrationType_Check(v)
PyTypeObject Interface1D_Type
PyTypeObject LocalAverageDepthF1D_Type
static char UnaryFunction1DDouble___doc__[]
PyDoc_STRVAR(integration_type_doc, "The integration method.\n" "\n" ":type: :class:`IntegrationType`")
static int UnaryFunction1DDouble___init__(BPy_UnaryFunction1DDouble *self, PyObject *args, PyObject *kwds)
static void UnaryFunction1DDouble___dealloc__(BPy_UnaryFunction1DDouble *self)
static PyObject * UnaryFunction1DDouble___call__(BPy_UnaryFunction1DDouble *self, PyObject *args, PyObject *kwds)
static PyObject * UnaryFunction1DDouble___repr__(BPy_UnaryFunction1DDouble *self)
static PyObject * integration_type_get(BPy_UnaryFunction1DDouble *self, void *UNUSED(closure))
int UnaryFunction1DDouble_Init(PyObject *module)
PyTypeObject UnaryFunction1DDouble_Type
static int integration_type_set(BPy_UnaryFunction1DDouble *self, PyObject *value, void *UNUSED(closure))
static PyGetSetDef BPy_UnaryFunction1DDouble_getseters[]
PyTypeObject UnaryFunction1D_Type
PyTypeObject ZDiscontinuityF1D_Type
static struct PyModuleDef module