43 UnaryFunction1DFloat___doc__,
44 "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DFloat`\n"
46 "Base class for unary functions (functors) that work on\n"
47 ":class:`Interface1D` and return a float value.\n"
49 ".. method:: __init__()\n"
50 " __init__(integration_type)\n"
52 " Builds a unary 1D function using the default constructor\n"
53 " or the integration method given as an argument.\n"
55 " :arg integration_type: An integration method.\n"
56 " :type integration_type: :class:`IntegrationType`\n");
62 static const char *kwlist[] = {
"integration",
nullptr};
63 PyObject *obj =
nullptr;
65 if (!PyArg_ParseTupleAndKeywords(
78 self->uf1D_float->py_uf1D = (PyObject *)
self;
85 delete self->uf1D_float;
91 return PyUnicode_FromFormat(
"type: %s - address: %p", Py_TYPE(
self)->tp_name,
self->uf1D_float);
98 static const char *kwlist[] = {
"inter",
nullptr};
99 PyObject *obj =
nullptr;
101 if (!PyArg_ParseTupleAndKeywords(args, kwds,
"O!", (
char **)kwlist, &
Interface1D_Type, &obj)) {
106 PyErr_SetString(PyExc_TypeError,
"__call__ method not properly overridden");
110 if (!PyErr_Occurred()) {
111 string class_name(Py_TYPE(
self)->tp_name);
112 PyErr_SetString(PyExc_RuntimeError, (class_name +
" __call__ method failed").c_str());
116 return PyFloat_FromDouble(
self->uf1D_float->result);
123 integration_type_doc,
124 "The integration method.\n"
126 ":type: :class:`IntegrationType`");
138 PyErr_SetString(PyExc_TypeError,
"value must be an IntegrationType");
149 integration_type_doc,
151 {
nullptr,
nullptr,
nullptr,
nullptr,
nullptr}
157 PyVarObject_HEAD_INIT(
nullptr, 0)
158 "UnaryFunction1DFloat",
176 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
177 UnaryFunction1DFloat___doc__,
IntegrationType IntegrationType_from_BPy_IntegrationType(PyObject *obj)
PyObject * BPy_IntegrationType_from_IntegrationType(IntegrationType i)
PyTypeObject IntegrationType_Type
#define BPy_IntegrationType_Check(v)
PyTypeObject Interface1D_Type
PyTypeObject UnaryFunction1DFloat_Type
static int UnaryFunction1DFloat___init__(BPy_UnaryFunction1DFloat *self, PyObject *args, PyObject *kwds)
int UnaryFunction1DFloat_Init(PyObject *module)
static PyObject * UnaryFunction1DFloat___call__(BPy_UnaryFunction1DFloat *self, PyObject *args, PyObject *kwds)
static PyGetSetDef BPy_UnaryFunction1DFloat_getseters[]
PyDoc_STRVAR(UnaryFunction1DFloat___doc__, "Class hierarchy: :class:`UnaryFunction1D` > :class:`UnaryFunction1DFloat`\n" "\n" "Base class for unary functions (functors) that work on\n" ":class:`Interface1D` and return a float value.\n" "\n" ".. method:: __init__()\n" " __init__(integration_type)\n" "\n" " Builds a unary 1D function using the default constructor\n" " or the integration method given as an argument.\n" "\n" " :arg integration_type: An integration method.\n" " :type integration_type: :class:`IntegrationType`\n")
static void UnaryFunction1DFloat___dealloc__(BPy_UnaryFunction1DFloat *self)
static PyObject * UnaryFunction1DFloat___repr__(BPy_UnaryFunction1DFloat *self)
static PyObject * integration_type_get(BPy_UnaryFunction1DFloat *self, void *)
static int integration_type_set(BPy_UnaryFunction1DFloat *self, PyObject *value, void *)
PyTypeObject UnaryFunction1D_Type
static struct PyModuleDef module