1 /* Generated by Cython 0.29.21 */
2
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6 #error Python headers needed to compile C extensions, please install development version of Python.
7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
8 #error Cython requires Python 2.6+ or Python 3.3+.
9 #else
10 #define CYTHON_ABI "0_29_21"
11 #define CYTHON_HEX_VERSION 0x001D15F0
12 #define CYTHON_FUTURE_DIVISION 0
13 #include <stddef.h>
14 #ifndef offsetof
15 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
16 #endif
17 #if !defined(WIN32) && !defined(MS_WINDOWS)
18 #ifndef __stdcall
19 #define __stdcall
20 #endif
21 #ifndef __cdecl
22 #define __cdecl
23 #endif
24 #ifndef __fastcall
25 #define __fastcall
26 #endif
27 #endif
28 #ifndef DL_IMPORT
29 #define DL_IMPORT(t) t
30 #endif
31 #ifndef DL_EXPORT
32 #define DL_EXPORT(t) t
33 #endif
34 #define __PYX_COMMA ,
35 #ifndef HAVE_LONG_LONG
36 #if PY_VERSION_HEX >= 0x02070000
37 #define HAVE_LONG_LONG
38 #endif
39 #endif
40 #ifndef PY_LONG_LONG
41 #define PY_LONG_LONG LONG_LONG
42 #endif
43 #ifndef Py_HUGE_VAL
44 #define Py_HUGE_VAL HUGE_VAL
45 #endif
46 #ifdef PYPY_VERSION
47 #define CYTHON_COMPILING_IN_PYPY 1
48 #define CYTHON_COMPILING_IN_PYSTON 0
49 #define CYTHON_COMPILING_IN_CPYTHON 0
50 #undef CYTHON_USE_TYPE_SLOTS
51 #define CYTHON_USE_TYPE_SLOTS 0
52 #undef CYTHON_USE_PYTYPE_LOOKUP
53 #define CYTHON_USE_PYTYPE_LOOKUP 0
54 #if PY_VERSION_HEX < 0x03050000
55 #undef CYTHON_USE_ASYNC_SLOTS
56 #define CYTHON_USE_ASYNC_SLOTS 0
57 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
58 #define CYTHON_USE_ASYNC_SLOTS 1
59 #endif
60 #undef CYTHON_USE_PYLIST_INTERNALS
61 #define CYTHON_USE_PYLIST_INTERNALS 0
62 #undef CYTHON_USE_UNICODE_INTERNALS
63 #define CYTHON_USE_UNICODE_INTERNALS 0
64 #undef CYTHON_USE_UNICODE_WRITER
65 #define CYTHON_USE_UNICODE_WRITER 0
66 #undef CYTHON_USE_PYLONG_INTERNALS
67 #define CYTHON_USE_PYLONG_INTERNALS 0
68 #undef CYTHON_AVOID_BORROWED_REFS
69 #define CYTHON_AVOID_BORROWED_REFS 1
70 #undef CYTHON_ASSUME_SAFE_MACROS
71 #define CYTHON_ASSUME_SAFE_MACROS 0
72 #undef CYTHON_UNPACK_METHODS
73 #define CYTHON_UNPACK_METHODS 0
74 #undef CYTHON_FAST_THREAD_STATE
75 #define CYTHON_FAST_THREAD_STATE 0
76 #undef CYTHON_FAST_PYCALL
77 #define CYTHON_FAST_PYCALL 0
78 #undef CYTHON_PEP489_MULTI_PHASE_INIT
79 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
80 #undef CYTHON_USE_TP_FINALIZE
81 #define CYTHON_USE_TP_FINALIZE 0
82 #undef CYTHON_USE_DICT_VERSIONS
83 #define CYTHON_USE_DICT_VERSIONS 0
84 #undef CYTHON_USE_EXC_INFO_STACK
85 #define CYTHON_USE_EXC_INFO_STACK 0
86 #elif defined(PYSTON_VERSION)
87 #define CYTHON_COMPILING_IN_PYPY 0
88 #define CYTHON_COMPILING_IN_PYSTON 1
89 #define CYTHON_COMPILING_IN_CPYTHON 0
90 #ifndef CYTHON_USE_TYPE_SLOTS
91 #define CYTHON_USE_TYPE_SLOTS 1
92 #endif
93 #undef CYTHON_USE_PYTYPE_LOOKUP
94 #define CYTHON_USE_PYTYPE_LOOKUP 0
95 #undef CYTHON_USE_ASYNC_SLOTS
96 #define CYTHON_USE_ASYNC_SLOTS 0
97 #undef CYTHON_USE_PYLIST_INTERNALS
98 #define CYTHON_USE_PYLIST_INTERNALS 0
99 #ifndef CYTHON_USE_UNICODE_INTERNALS
100 #define CYTHON_USE_UNICODE_INTERNALS 1
101 #endif
102 #undef CYTHON_USE_UNICODE_WRITER
103 #define CYTHON_USE_UNICODE_WRITER 0
104 #undef CYTHON_USE_PYLONG_INTERNALS
105 #define CYTHON_USE_PYLONG_INTERNALS 0
106 #ifndef CYTHON_AVOID_BORROWED_REFS
107 #define CYTHON_AVOID_BORROWED_REFS 0
108 #endif
109 #ifndef CYTHON_ASSUME_SAFE_MACROS
110 #define CYTHON_ASSUME_SAFE_MACROS 1
111 #endif
112 #ifndef CYTHON_UNPACK_METHODS
113 #define CYTHON_UNPACK_METHODS 1
114 #endif
115 #undef CYTHON_FAST_THREAD_STATE
116 #define CYTHON_FAST_THREAD_STATE 0
117 #undef CYTHON_FAST_PYCALL
118 #define CYTHON_FAST_PYCALL 0
119 #undef CYTHON_PEP489_MULTI_PHASE_INIT
120 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
121 #undef CYTHON_USE_TP_FINALIZE
122 #define CYTHON_USE_TP_FINALIZE 0
123 #undef CYTHON_USE_DICT_VERSIONS
124 #define CYTHON_USE_DICT_VERSIONS 0
125 #undef CYTHON_USE_EXC_INFO_STACK
126 #define CYTHON_USE_EXC_INFO_STACK 0
127 #else
128 #define CYTHON_COMPILING_IN_PYPY 0
129 #define CYTHON_COMPILING_IN_PYSTON 0
130 #define CYTHON_COMPILING_IN_CPYTHON 1
131 #ifndef CYTHON_USE_TYPE_SLOTS
132 #define CYTHON_USE_TYPE_SLOTS 1
133 #endif
134 #if PY_VERSION_HEX < 0x02070000
135 #undef CYTHON_USE_PYTYPE_LOOKUP
136 #define CYTHON_USE_PYTYPE_LOOKUP 0
137 #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
138 #define CYTHON_USE_PYTYPE_LOOKUP 1
139 #endif
140 #if PY_MAJOR_VERSION < 3
141 #undef CYTHON_USE_ASYNC_SLOTS
142 #define CYTHON_USE_ASYNC_SLOTS 0
143 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
144 #define CYTHON_USE_ASYNC_SLOTS 1
145 #endif
146 #if PY_VERSION_HEX < 0x02070000
147 #undef CYTHON_USE_PYLONG_INTERNALS
148 #define CYTHON_USE_PYLONG_INTERNALS 0
149 #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
150 #define CYTHON_USE_PYLONG_INTERNALS 1
151 #endif
152 #ifndef CYTHON_USE_PYLIST_INTERNALS
153 #define CYTHON_USE_PYLIST_INTERNALS 1
154 #endif
155 #ifndef CYTHON_USE_UNICODE_INTERNALS
156 #define CYTHON_USE_UNICODE_INTERNALS 1
157 #endif
158 #if PY_VERSION_HEX < 0x030300F0
159 #undef CYTHON_USE_UNICODE_WRITER
160 #define CYTHON_USE_UNICODE_WRITER 0
161 #elif !defined(CYTHON_USE_UNICODE_WRITER)
162 #define CYTHON_USE_UNICODE_WRITER 1
163 #endif
164 #ifndef CYTHON_AVOID_BORROWED_REFS
165 #define CYTHON_AVOID_BORROWED_REFS 0
166 #endif
167 #ifndef CYTHON_ASSUME_SAFE_MACROS
168 #define CYTHON_ASSUME_SAFE_MACROS 1
169 #endif
170 #ifndef CYTHON_UNPACK_METHODS
171 #define CYTHON_UNPACK_METHODS 1
172 #endif
173 #ifndef CYTHON_FAST_THREAD_STATE
174 #define CYTHON_FAST_THREAD_STATE 1
175 #endif
176 #ifndef CYTHON_FAST_PYCALL
177 #define CYTHON_FAST_PYCALL 1
178 #endif
179 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
180 #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
181 #endif
182 #ifndef CYTHON_USE_TP_FINALIZE
183 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
184 #endif
185 #ifndef CYTHON_USE_DICT_VERSIONS
186 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
187 #endif
188 #ifndef CYTHON_USE_EXC_INFO_STACK
189 #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
190 #endif
191 #endif
192 #if !defined(CYTHON_FAST_PYCCALL)
193 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
194 #endif
195 #if CYTHON_USE_PYLONG_INTERNALS
196 #include "longintrepr.h"
197 #undef SHIFT
198 #undef BASE
199 #undef MASK
200 #ifdef SIZEOF_VOID_P
201 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
202 #endif
203 #endif
204 #ifndef __has_attribute
205 #define __has_attribute(x) 0
206 #endif
207 #ifndef __has_cpp_attribute
208 #define __has_cpp_attribute(x) 0
209 #endif
210 #ifndef CYTHON_RESTRICT
211 #if defined(__GNUC__)
212 #define CYTHON_RESTRICT __restrict__
213 #elif defined(_MSC_VER) && _MSC_VER >= 1400
214 #define CYTHON_RESTRICT __restrict
215 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
216 #define CYTHON_RESTRICT restrict
217 #else
218 #define CYTHON_RESTRICT
219 #endif
220 #endif
221 #ifndef CYTHON_UNUSED
222 # if defined(__GNUC__)
223 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
224 # define CYTHON_UNUSED __attribute__ ((__unused__))
225 # else
226 # define CYTHON_UNUSED
227 # endif
228 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
229 # define CYTHON_UNUSED __attribute__ ((__unused__))
230 # else
231 # define CYTHON_UNUSED
232 # endif
233 #endif
234 #ifndef CYTHON_MAYBE_UNUSED_VAR
235 # if defined(__cplusplus)
CYTHON_MAYBE_UNUSED_VAR(const T &)236 template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
237 # else
238 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
239 # endif
240 #endif
241 #ifndef CYTHON_NCP_UNUSED
242 # if CYTHON_COMPILING_IN_CPYTHON
243 # define CYTHON_NCP_UNUSED
244 # else
245 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
246 # endif
247 #endif
248 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
249 #ifdef _MSC_VER
250 #ifndef _MSC_STDINT_H_
251 #if _MSC_VER < 1300
252 typedef unsigned char uint8_t;
253 typedef unsigned int uint32_t;
254 #else
255 typedef unsigned __int8 uint8_t;
256 typedef unsigned __int32 uint32_t;
257 #endif
258 #endif
259 #else
260 #include <stdint.h>
261 #endif
262 #ifndef CYTHON_FALLTHROUGH
263 #if defined(__cplusplus) && __cplusplus >= 201103L
264 #if __has_cpp_attribute(fallthrough)
265 #define CYTHON_FALLTHROUGH [[fallthrough]]
266 #elif __has_cpp_attribute(clang::fallthrough)
267 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
268 #elif __has_cpp_attribute(gnu::fallthrough)
269 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
270 #endif
271 #endif
272 #ifndef CYTHON_FALLTHROUGH
273 #if __has_attribute(fallthrough)
274 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
275 #else
276 #define CYTHON_FALLTHROUGH
277 #endif
278 #endif
279 #if defined(__clang__ ) && defined(__apple_build_version__)
280 #if __apple_build_version__ < 7000000
281 #undef CYTHON_FALLTHROUGH
282 #define CYTHON_FALLTHROUGH
283 #endif
284 #endif
285 #endif
286
287 #ifndef __cplusplus
288 #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
289 #endif
290 #ifndef CYTHON_INLINE
291 #if defined(__clang__)
292 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
293 #else
294 #define CYTHON_INLINE inline
295 #endif
296 #endif
297 template<typename T>
__Pyx_call_destructor(T & x)298 void __Pyx_call_destructor(T& x) {
299 x.~T();
300 }
301 template<typename T>
302 class __Pyx_FakeReference {
303 public:
__Pyx_FakeReference()304 __Pyx_FakeReference() : ptr(NULL) { }
__Pyx_FakeReference(const T & ref)305 __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
operator ->()306 T *operator->() { return ptr; }
operator &()307 T *operator&() { return ptr; }
operator T&()308 operator T&() { return *ptr; }
operator ==(U other)309 template<typename U> bool operator ==(U other) { return *ptr == other; }
operator !=(U other)310 template<typename U> bool operator !=(U other) { return *ptr != other; }
311 private:
312 T *ptr;
313 };
314
315 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
316 #define Py_OptimizeFlag 0
317 #endif
318 #define __PYX_BUILD_PY_SSIZE_T "n"
319 #define CYTHON_FORMAT_SSIZE_T "z"
320 #if PY_MAJOR_VERSION < 3
321 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
322 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
323 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
324 #define __Pyx_DefaultClassType PyClass_Type
325 #else
326 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
327 #if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2
328 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
329 PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
330 #else
331 #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
332 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
333 #endif
334 #define __Pyx_DefaultClassType PyType_Type
335 #endif
336 #ifndef Py_TPFLAGS_CHECKTYPES
337 #define Py_TPFLAGS_CHECKTYPES 0
338 #endif
339 #ifndef Py_TPFLAGS_HAVE_INDEX
340 #define Py_TPFLAGS_HAVE_INDEX 0
341 #endif
342 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
343 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
344 #endif
345 #ifndef Py_TPFLAGS_HAVE_FINALIZE
346 #define Py_TPFLAGS_HAVE_FINALIZE 0
347 #endif
348 #ifndef METH_STACKLESS
349 #define METH_STACKLESS 0
350 #endif
351 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
352 #ifndef METH_FASTCALL
353 #define METH_FASTCALL 0x80
354 #endif
355 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
356 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
357 Py_ssize_t nargs, PyObject *kwnames);
358 #else
359 #define __Pyx_PyCFunctionFast _PyCFunctionFast
360 #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
361 #endif
362 #if CYTHON_FAST_PYCCALL
363 #define __Pyx_PyFastCFunction_Check(func)\
364 ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
365 #else
366 #define __Pyx_PyFastCFunction_Check(func) 0
367 #endif
368 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
369 #define PyObject_Malloc(s) PyMem_Malloc(s)
370 #define PyObject_Free(p) PyMem_Free(p)
371 #define PyObject_Realloc(p) PyMem_Realloc(p)
372 #endif
373 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
374 #define PyMem_RawMalloc(n) PyMem_Malloc(n)
375 #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
376 #define PyMem_RawFree(p) PyMem_Free(p)
377 #endif
378 #if CYTHON_COMPILING_IN_PYSTON
379 #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
380 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
381 #else
382 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
383 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
384 #endif
385 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
386 #define __Pyx_PyThreadState_Current PyThreadState_GET()
387 #elif PY_VERSION_HEX >= 0x03060000
388 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
389 #elif PY_VERSION_HEX >= 0x03000000
390 #define __Pyx_PyThreadState_Current PyThreadState_GET()
391 #else
392 #define __Pyx_PyThreadState_Current _PyThreadState_Current
393 #endif
394 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
395 #include "pythread.h"
396 #define Py_tss_NEEDS_INIT 0
397 typedef int Py_tss_t;
PyThread_tss_create(Py_tss_t * key)398 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
399 *key = PyThread_create_key();
400 return 0;
401 }
PyThread_tss_alloc(void)402 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
403 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
404 *key = Py_tss_NEEDS_INIT;
405 return key;
406 }
PyThread_tss_free(Py_tss_t * key)407 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
408 PyObject_Free(key);
409 }
PyThread_tss_is_created(Py_tss_t * key)410 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
411 return *key != Py_tss_NEEDS_INIT;
412 }
PyThread_tss_delete(Py_tss_t * key)413 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
414 PyThread_delete_key(*key);
415 *key = Py_tss_NEEDS_INIT;
416 }
PyThread_tss_set(Py_tss_t * key,void * value)417 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
418 return PyThread_set_key_value(*key, value);
419 }
PyThread_tss_get(Py_tss_t * key)420 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
421 return PyThread_get_key_value(*key);
422 }
423 #endif
424 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
425 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
426 #else
427 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
428 #endif
429 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
430 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
431 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
432 #else
433 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
434 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
435 #endif
436 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
437 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
438 #else
439 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
440 #endif
441 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
442 #define CYTHON_PEP393_ENABLED 1
443 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
444 0 : _PyUnicode_Ready((PyObject *)(op)))
445 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
446 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
447 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
448 #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
449 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
450 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
451 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
452 #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
453 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
454 #else
455 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
456 #endif
457 #else
458 #define CYTHON_PEP393_ENABLED 0
459 #define PyUnicode_1BYTE_KIND 1
460 #define PyUnicode_2BYTE_KIND 2
461 #define PyUnicode_4BYTE_KIND 4
462 #define __Pyx_PyUnicode_READY(op) (0)
463 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
464 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
465 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
466 #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
467 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
468 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
469 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
470 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
471 #endif
472 #if CYTHON_COMPILING_IN_PYPY
473 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
474 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
475 #else
476 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
477 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
478 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
479 #endif
480 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
481 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
482 #endif
483 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
484 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
485 #endif
486 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
487 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
488 #endif
489 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
490 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
491 #if PY_MAJOR_VERSION >= 3
492 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
493 #else
494 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
495 #endif
496 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
497 #define PyObject_ASCII(o) PyObject_Repr(o)
498 #endif
499 #if PY_MAJOR_VERSION >= 3
500 #define PyBaseString_Type PyUnicode_Type
501 #define PyStringObject PyUnicodeObject
502 #define PyString_Type PyUnicode_Type
503 #define PyString_Check PyUnicode_Check
504 #define PyString_CheckExact PyUnicode_CheckExact
505 #ifndef PyObject_Unicode
506 #define PyObject_Unicode PyObject_Str
507 #endif
508 #endif
509 #if PY_MAJOR_VERSION >= 3
510 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
511 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
512 #else
513 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
514 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
515 #endif
516 #ifndef PySet_CheckExact
517 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
518 #endif
519 #if PY_VERSION_HEX >= 0x030900A4
520 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
521 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
522 #else
523 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
524 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
525 #endif
526 #if CYTHON_ASSUME_SAFE_MACROS
527 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
528 #else
529 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
530 #endif
531 #if PY_MAJOR_VERSION >= 3
532 #define PyIntObject PyLongObject
533 #define PyInt_Type PyLong_Type
534 #define PyInt_Check(op) PyLong_Check(op)
535 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
536 #define PyInt_FromString PyLong_FromString
537 #define PyInt_FromUnicode PyLong_FromUnicode
538 #define PyInt_FromLong PyLong_FromLong
539 #define PyInt_FromSize_t PyLong_FromSize_t
540 #define PyInt_FromSsize_t PyLong_FromSsize_t
541 #define PyInt_AsLong PyLong_AsLong
542 #define PyInt_AS_LONG PyLong_AS_LONG
543 #define PyInt_AsSsize_t PyLong_AsSsize_t
544 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
545 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
546 #define PyNumber_Int PyNumber_Long
547 #endif
548 #if PY_MAJOR_VERSION >= 3
549 #define PyBoolObject PyLongObject
550 #endif
551 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
552 #ifndef PyUnicode_InternFromString
553 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
554 #endif
555 #endif
556 #if PY_VERSION_HEX < 0x030200A4
557 typedef long Py_hash_t;
558 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
559 #define __Pyx_PyInt_AsHash_t PyInt_AsLong
560 #else
561 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
562 #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
563 #endif
564 #if PY_MAJOR_VERSION >= 3
565 #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
566 #else
567 #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
568 #endif
569 #if CYTHON_USE_ASYNC_SLOTS
570 #if PY_VERSION_HEX >= 0x030500B1
571 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
572 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
573 #else
574 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
575 #endif
576 #else
577 #define __Pyx_PyType_AsAsync(obj) NULL
578 #endif
579 #ifndef __Pyx_PyAsyncMethodsStruct
580 typedef struct {
581 unaryfunc am_await;
582 unaryfunc am_aiter;
583 unaryfunc am_anext;
584 } __Pyx_PyAsyncMethodsStruct;
585 #endif
586
587 #if defined(WIN32) || defined(MS_WINDOWS)
588 #define _USE_MATH_DEFINES
589 #endif
590 #include <math.h>
591 #ifdef NAN
592 #define __PYX_NAN() ((float) NAN)
593 #else
__PYX_NAN()594 static CYTHON_INLINE float __PYX_NAN() {
595 float value;
596 memset(&value, 0xFF, sizeof(value));
597 return value;
598 }
599 #endif
600 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
601 #define __Pyx_truncl trunc
602 #else
603 #define __Pyx_truncl truncl
604 #endif
605
606 #define __PYX_MARK_ERR_POS(f_index, lineno) \
607 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
608 #define __PYX_ERR(f_index, lineno, Ln_error) \
609 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
610
611 #ifndef __PYX_EXTERN_C
612 #ifdef __cplusplus
613 #define __PYX_EXTERN_C extern "C"
614 #else
615 #define __PYX_EXTERN_C extern
616 #endif
617 #endif
618
619 #define __PYX_HAVE__cylp__cy__CyCbcModel
620 #define __PYX_HAVE_API__cylp__cy__CyCbcModel
621 /* Early includes */
622 #include <string.h>
623 #include <stdio.h>
624 #include "numpy/arrayobject.h"
625 #include "numpy/ufuncobject.h"
626 #include "CglAllDifferent.hpp"
627 #include "CglClique.hpp"
628 #include "CglKnapsackCover.hpp"
629 #include "CglOddHole.hpp"
630 #include "CglFlowCover.hpp"
631 #include "CglGomory.hpp"
632 #include "CglRedSplit.hpp"
633 #include "CglLiftAndProject.hpp"
634 #include "CglLandP.hpp"
635 #include "CglMixedIntegerRounding.hpp"
636 #include "CglMixedIntegerRounding2.hpp"
637 #include "CglTwomir.hpp"
638 #include "CglResidualCapacity.hpp"
639 #include "CglPreProcess.hpp"
640 #include "CglProbing.hpp"
641 #include "CglSimpleRounding.hpp"
642 #include "CglCutGenerator.hpp"
643 #include "ICbcNode.hpp"
644 #include "pythread.h"
645 #include "ICoinIndexedVector.hpp"
646 #include "ClpPrimalColumnPivot.hpp"
647 #include "ClpFactorization.hpp"
648 #include "IClpPrimalColumnPivotBase.h"
649 #include "ClpDualRowPivot.hpp"
650 #include "IClpDualRowPivotBase.h"
651 #include "CoinModel.hpp"
652 #include "ICoinPackedMatrix.hpp"
653 #include "ios"
654 #include "new"
655 #include "stdexcept"
656 #include "typeinfo"
657 #include <string>
658 #include <vector>
659 #include "IClpSimplex.hpp"
660 #include "ClpSimplex.hpp"
661 #include "OsiClpSolverInterface.hpp"
662 #include "OsiSolverInterface.hpp"
663 #include "CbcCompareUser.hpp"
664 #include "ICbcModel.hpp"
665 #include "IOsiCuts.hpp"
666 #include "CglTreeInfo.hpp"
667 #include "ICglCutGeneratorBase.h"
668 #ifdef _OPENMP
669 #include <omp.h>
670 #endif /* _OPENMP */
671
672 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
673 #define CYTHON_WITHOUT_ASSERTIONS
674 #endif
675
676 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
677 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
678
679 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
680 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
681 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
682 #define __PYX_DEFAULT_STRING_ENCODING ""
683 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
684 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
685 #define __Pyx_uchar_cast(c) ((unsigned char)c)
686 #define __Pyx_long_cast(x) ((long)x)
687 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
688 (sizeof(type) < sizeof(Py_ssize_t)) ||\
689 (sizeof(type) > sizeof(Py_ssize_t) &&\
690 likely(v < (type)PY_SSIZE_T_MAX ||\
691 v == (type)PY_SSIZE_T_MAX) &&\
692 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
693 v == (type)PY_SSIZE_T_MIN))) ||\
694 (sizeof(type) == sizeof(Py_ssize_t) &&\
695 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
696 v == (type)PY_SSIZE_T_MAX))) )
__Pyx_is_valid_index(Py_ssize_t i,Py_ssize_t limit)697 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
698 return (size_t) i < (size_t) limit;
699 }
700 #if defined (__cplusplus) && __cplusplus >= 201103L
701 #include <cstdlib>
702 #define __Pyx_sst_abs(value) std::abs(value)
703 #elif SIZEOF_INT >= SIZEOF_SIZE_T
704 #define __Pyx_sst_abs(value) abs(value)
705 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
706 #define __Pyx_sst_abs(value) labs(value)
707 #elif defined (_MSC_VER)
708 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
709 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
710 #define __Pyx_sst_abs(value) llabs(value)
711 #elif defined (__GNUC__)
712 #define __Pyx_sst_abs(value) __builtin_llabs(value)
713 #else
714 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
715 #endif
716 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
717 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
718 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
719 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
720 #define __Pyx_PyBytes_FromString PyBytes_FromString
721 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
722 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
723 #if PY_MAJOR_VERSION < 3
724 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
725 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
726 #else
727 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
728 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
729 #endif
730 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
731 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
732 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
733 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
734 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
735 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
736 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
737 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
738 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
739 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
740 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
741 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
742 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
743 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
744 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
745 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
__Pyx_Py_UNICODE_strlen(const Py_UNICODE * u)746 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
747 const Py_UNICODE *u_end = u;
748 while (*u_end++) ;
749 return (size_t)(u_end - u - 1);
750 }
751 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
752 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
753 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
754 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
755 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
756 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
757 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
758 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
759 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
760 #define __Pyx_PySequence_Tuple(obj)\
761 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
762 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
763 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
764 #if CYTHON_ASSUME_SAFE_MACROS
765 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
766 #else
767 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
768 #endif
769 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
770 #if PY_MAJOR_VERSION >= 3
771 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
772 #else
773 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
774 #endif
775 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
776 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
777 static int __Pyx_sys_getdefaultencoding_not_ascii;
__Pyx_init_sys_getdefaultencoding_params(void)778 static int __Pyx_init_sys_getdefaultencoding_params(void) {
779 PyObject* sys;
780 PyObject* default_encoding = NULL;
781 PyObject* ascii_chars_u = NULL;
782 PyObject* ascii_chars_b = NULL;
783 const char* default_encoding_c;
784 sys = PyImport_ImportModule("sys");
785 if (!sys) goto bad;
786 default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
787 Py_DECREF(sys);
788 if (!default_encoding) goto bad;
789 default_encoding_c = PyBytes_AsString(default_encoding);
790 if (!default_encoding_c) goto bad;
791 if (strcmp(default_encoding_c, "ascii") == 0) {
792 __Pyx_sys_getdefaultencoding_not_ascii = 0;
793 } else {
794 char ascii_chars[128];
795 int c;
796 for (c = 0; c < 128; c++) {
797 ascii_chars[c] = c;
798 }
799 __Pyx_sys_getdefaultencoding_not_ascii = 1;
800 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
801 if (!ascii_chars_u) goto bad;
802 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
803 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
804 PyErr_Format(
805 PyExc_ValueError,
806 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
807 default_encoding_c);
808 goto bad;
809 }
810 Py_DECREF(ascii_chars_u);
811 Py_DECREF(ascii_chars_b);
812 }
813 Py_DECREF(default_encoding);
814 return 0;
815 bad:
816 Py_XDECREF(default_encoding);
817 Py_XDECREF(ascii_chars_u);
818 Py_XDECREF(ascii_chars_b);
819 return -1;
820 }
821 #endif
822 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
823 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
824 #else
825 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
826 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
827 static char* __PYX_DEFAULT_STRING_ENCODING;
__Pyx_init_sys_getdefaultencoding_params(void)828 static int __Pyx_init_sys_getdefaultencoding_params(void) {
829 PyObject* sys;
830 PyObject* default_encoding = NULL;
831 char* default_encoding_c;
832 sys = PyImport_ImportModule("sys");
833 if (!sys) goto bad;
834 default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
835 Py_DECREF(sys);
836 if (!default_encoding) goto bad;
837 default_encoding_c = PyBytes_AsString(default_encoding);
838 if (!default_encoding_c) goto bad;
839 __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
840 if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
841 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
842 Py_DECREF(default_encoding);
843 return 0;
844 bad:
845 Py_XDECREF(default_encoding);
846 return -1;
847 }
848 #endif
849 #endif
850
851
852 /* Test for GCC > 2.95 */
853 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
854 #define likely(x) __builtin_expect(!!(x), 1)
855 #define unlikely(x) __builtin_expect(!!(x), 0)
856 #else /* !__GNUC__ or GCC < 2.95 */
857 #define likely(x) (x)
858 #define unlikely(x) (x)
859 #endif /* __GNUC__ */
__Pyx_pretend_to_initialize(void * ptr)860 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
861
862 static PyObject *__pyx_m = NULL;
863 static PyObject *__pyx_d;
864 static PyObject *__pyx_b;
865 static PyObject *__pyx_cython_runtime = NULL;
866 static PyObject *__pyx_empty_tuple;
867 static PyObject *__pyx_empty_bytes;
868 static PyObject *__pyx_empty_unicode;
869 static int __pyx_lineno;
870 static int __pyx_clineno = 0;
871 static const char * __pyx_cfilenm= __FILE__;
872 static const char *__pyx_filename;
873
874 /* Header.proto */
875 #if !defined(CYTHON_CCOMPLEX)
876 #if defined(__cplusplus)
877 #define CYTHON_CCOMPLEX 1
878 #elif defined(_Complex_I)
879 #define CYTHON_CCOMPLEX 1
880 #else
881 #define CYTHON_CCOMPLEX 0
882 #endif
883 #endif
884 #if CYTHON_CCOMPLEX
885 #ifdef __cplusplus
886 #include <complex>
887 #else
888 #include <complex.h>
889 #endif
890 #endif
891 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
892 #undef _Complex_I
893 #define _Complex_I 1.0fj
894 #endif
895
896
897 static const char *__pyx_f[] = {
898 "cylp/cy/CyCbcModel.pyx",
899 "stringsource",
900 "__init__.pxd",
901 "type.pxd",
902 "bool.pxd",
903 "complex.pxd",
904 "cylp/cy/CyCgl.pxd",
905 "cylp/cy/CyCbcNode.pxd",
906 "cylp/cy/CyCoinIndexedVector.pxd",
907 "cylp/cy/CyClpPrimalColumnPivotBase.pxd",
908 "cylp/cy/CyClpDualRowPivotBase.pxd",
909 "cylp/cy/CyCoinModel.pxd",
910 "cylp/cy/CyCoinPackedMatrix.pxd",
911 "cylp/cy/CyClpSimplex.pxd",
912 "cylp/cy/CyOsiSolverInterface.pxd",
913 "cylp/cy/CyOsiCuts.pxd",
914 "cylp/cy/CyCglTreeInfo.pxd",
915 "cylp/cy/CyCglCutGeneratorBase.pxd",
916 "cylp/cy/CyCutGeneratorPythonBase.pxd",
917 };
918
919 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":775
920 * # in Cython to enable them only on the right systems.
921 *
922 * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
923 * ctypedef npy_int16 int16_t
924 * ctypedef npy_int32 int32_t
925 */
926 typedef npy_int8 __pyx_t_5numpy_int8_t;
927
928 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":776
929 *
930 * ctypedef npy_int8 int8_t
931 * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
932 * ctypedef npy_int32 int32_t
933 * ctypedef npy_int64 int64_t
934 */
935 typedef npy_int16 __pyx_t_5numpy_int16_t;
936
937 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":777
938 * ctypedef npy_int8 int8_t
939 * ctypedef npy_int16 int16_t
940 * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
941 * ctypedef npy_int64 int64_t
942 * #ctypedef npy_int96 int96_t
943 */
944 typedef npy_int32 __pyx_t_5numpy_int32_t;
945
946 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":778
947 * ctypedef npy_int16 int16_t
948 * ctypedef npy_int32 int32_t
949 * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
950 * #ctypedef npy_int96 int96_t
951 * #ctypedef npy_int128 int128_t
952 */
953 typedef npy_int64 __pyx_t_5numpy_int64_t;
954
955 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":782
956 * #ctypedef npy_int128 int128_t
957 *
958 * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
959 * ctypedef npy_uint16 uint16_t
960 * ctypedef npy_uint32 uint32_t
961 */
962 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
963
964 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":783
965 *
966 * ctypedef npy_uint8 uint8_t
967 * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
968 * ctypedef npy_uint32 uint32_t
969 * ctypedef npy_uint64 uint64_t
970 */
971 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
972
973 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":784
974 * ctypedef npy_uint8 uint8_t
975 * ctypedef npy_uint16 uint16_t
976 * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
977 * ctypedef npy_uint64 uint64_t
978 * #ctypedef npy_uint96 uint96_t
979 */
980 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
981
982 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":785
983 * ctypedef npy_uint16 uint16_t
984 * ctypedef npy_uint32 uint32_t
985 * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
986 * #ctypedef npy_uint96 uint96_t
987 * #ctypedef npy_uint128 uint128_t
988 */
989 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
990
991 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":789
992 * #ctypedef npy_uint128 uint128_t
993 *
994 * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
995 * ctypedef npy_float64 float64_t
996 * #ctypedef npy_float80 float80_t
997 */
998 typedef npy_float32 __pyx_t_5numpy_float32_t;
999
1000 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":790
1001 *
1002 * ctypedef npy_float32 float32_t
1003 * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1004 * #ctypedef npy_float80 float80_t
1005 * #ctypedef npy_float128 float128_t
1006 */
1007 typedef npy_float64 __pyx_t_5numpy_float64_t;
1008
1009 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":799
1010 * # The int types are mapped a bit surprising --
1011 * # numpy.int corresponds to 'l' and numpy.long to 'q'
1012 * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1013 * ctypedef npy_longlong long_t
1014 * ctypedef npy_longlong longlong_t
1015 */
1016 typedef npy_long __pyx_t_5numpy_int_t;
1017
1018 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":800
1019 * # numpy.int corresponds to 'l' and numpy.long to 'q'
1020 * ctypedef npy_long int_t
1021 * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1022 * ctypedef npy_longlong longlong_t
1023 *
1024 */
1025 typedef npy_longlong __pyx_t_5numpy_long_t;
1026
1027 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":801
1028 * ctypedef npy_long int_t
1029 * ctypedef npy_longlong long_t
1030 * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1031 *
1032 * ctypedef npy_ulong uint_t
1033 */
1034 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1035
1036 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":803
1037 * ctypedef npy_longlong longlong_t
1038 *
1039 * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1040 * ctypedef npy_ulonglong ulong_t
1041 * ctypedef npy_ulonglong ulonglong_t
1042 */
1043 typedef npy_ulong __pyx_t_5numpy_uint_t;
1044
1045 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":804
1046 *
1047 * ctypedef npy_ulong uint_t
1048 * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1049 * ctypedef npy_ulonglong ulonglong_t
1050 *
1051 */
1052 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1053
1054 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":805
1055 * ctypedef npy_ulong uint_t
1056 * ctypedef npy_ulonglong ulong_t
1057 * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1058 *
1059 * ctypedef npy_intp intp_t
1060 */
1061 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1062
1063 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":807
1064 * ctypedef npy_ulonglong ulonglong_t
1065 *
1066 * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1067 * ctypedef npy_uintp uintp_t
1068 *
1069 */
1070 typedef npy_intp __pyx_t_5numpy_intp_t;
1071
1072 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":808
1073 *
1074 * ctypedef npy_intp intp_t
1075 * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1076 *
1077 * ctypedef npy_double float_t
1078 */
1079 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1080
1081 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":810
1082 * ctypedef npy_uintp uintp_t
1083 *
1084 * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1085 * ctypedef npy_double double_t
1086 * ctypedef npy_longdouble longdouble_t
1087 */
1088 typedef npy_double __pyx_t_5numpy_float_t;
1089
1090 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":811
1091 *
1092 * ctypedef npy_double float_t
1093 * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1094 * ctypedef npy_longdouble longdouble_t
1095 *
1096 */
1097 typedef npy_double __pyx_t_5numpy_double_t;
1098
1099 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":812
1100 * ctypedef npy_double float_t
1101 * ctypedef npy_double double_t
1102 * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1103 *
1104 * ctypedef npy_cfloat cfloat_t
1105 */
1106 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1107 /* Declarations.proto */
1108 #if CYTHON_CCOMPLEX
1109 #ifdef __cplusplus
1110 typedef ::std::complex< float > __pyx_t_float_complex;
1111 #else
1112 typedef float _Complex __pyx_t_float_complex;
1113 #endif
1114 #else
1115 typedef struct { float real, imag; } __pyx_t_float_complex;
1116 #endif
1117 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1118
1119 /* Declarations.proto */
1120 #if CYTHON_CCOMPLEX
1121 #ifdef __cplusplus
1122 typedef ::std::complex< double > __pyx_t_double_complex;
1123 #else
1124 typedef double _Complex __pyx_t_double_complex;
1125 #endif
1126 #else
1127 typedef struct { double real, imag; } __pyx_t_double_complex;
1128 #endif
1129 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1130
1131
1132 /*--- Type declarations ---*/
1133 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator;
1134 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglAllDifferent;
1135 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglClique;
1136 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglKnapsackCover;
1137 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglOddHole;
1138 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglFlowCover;
1139 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglGomory;
1140 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglRedSplit;
1141 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglLiftAndProject;
1142 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglLandP;
1143 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding;
1144 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2;
1145 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglTwomir;
1146 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglResidualCapacity;
1147 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglPreProcess;
1148 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglProbing;
1149 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglSimpleRounding;
1150 struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode;
1151 struct __pyx_obj_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector;
1152 struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase;
1153 struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase;
1154 struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel;
1155 struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix;
1156 struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex;
1157 struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus;
1158 struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface;
1159 struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts;
1160 struct __pyx_obj_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo;
1161 struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase;
1162 struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase;
1163 struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel;
1164
1165 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":814
1166 * ctypedef npy_longdouble longdouble_t
1167 *
1168 * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1169 * ctypedef npy_cdouble cdouble_t
1170 * ctypedef npy_clongdouble clongdouble_t
1171 */
1172 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1173
1174 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":815
1175 *
1176 * ctypedef npy_cfloat cfloat_t
1177 * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1178 * ctypedef npy_clongdouble clongdouble_t
1179 *
1180 */
1181 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1182
1183 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":816
1184 * ctypedef npy_cfloat cfloat_t
1185 * ctypedef npy_cdouble cdouble_t
1186 * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1187 *
1188 * ctypedef npy_cdouble complex_t
1189 */
1190 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1191
1192 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":818
1193 * ctypedef npy_clongdouble clongdouble_t
1194 *
1195 * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1196 *
1197 * cdef inline object PyArray_MultiIterNew1(a):
1198 */
1199 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1200 struct __pyx_opt_args_4cylp_2cy_12CyClpSimplex_12CyClpSimplex_readMps;
1201
1202 /* "cylp/cy/CyClpSimplex.pxd":326
1203 * #cdef object isPivotAcceptable_func
1204 *
1205 * cpdef int readMps(self, filename, int keepNames=*, # <<<<<<<<<<<<<<
1206 * int ignoreErrors=*) except *
1207 *
1208 */
1209 struct __pyx_opt_args_4cylp_2cy_12CyClpSimplex_12CyClpSimplex_readMps {
1210 int __pyx_n;
1211 int keepNames;
1212 int ignoreErrors;
1213 };
1214 struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator;
1215
1216 /* "cylp/cy/CyCbcModel.pxd":89
1217 * cdef setCppSelf(self, CppICbcModel* cppmodel)
1218 * cdef setClpModel(self, clpmodel)
1219 * cpdef addCutGenerator(self, CyCglCutGenerator generator, # <<<<<<<<<<<<<<
1220 * howOften=*, name=*, normal=*, atSolution=*,
1221 * infeasible=*, howOftenInSub=*, whatDepth=*,
1222 */
1223 struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator {
1224 int __pyx_n;
1225 PyObject *howOften;
1226 PyObject *name;
1227 PyObject *normal;
1228 PyObject *atSolution;
1229 PyObject *infeasible;
1230 PyObject *howOftenInSub;
1231 PyObject *whatDepth;
1232 PyObject *whatDepthInSub;
1233 };
1234
1235 /* "cylp/cy/CyCgl.pxd":103
1236 *
1237 *
1238 * cdef class CyCglCutGenerator: # <<<<<<<<<<<<<<
1239 * cdef CppCglCutGenerator* CppSelf
1240 *
1241 */
1242 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator {
1243 PyObject_HEAD
1244 CglCutGenerator *CppSelf;
1245 };
1246
1247
1248 /* "cylp/cy/CyCgl.pxd":108
1249 * ###########
1250 *
1251 * cdef class CyCglAllDifferent(CyCglCutGenerator): # <<<<<<<<<<<<<<
1252 * pass
1253 *
1254 */
1255 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglAllDifferent {
1256 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1257 };
1258
1259
1260 /* "cylp/cy/CyCgl.pxd":111
1261 * pass
1262 *
1263 * cdef class CyCglClique(CyCglCutGenerator): # <<<<<<<<<<<<<<
1264 * pass
1265 *
1266 */
1267 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglClique {
1268 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1269 };
1270
1271
1272 /* "cylp/cy/CyCgl.pxd":114
1273 * pass
1274 *
1275 * cdef class CyCglKnapsackCover(CyCglCutGenerator): # <<<<<<<<<<<<<<
1276 * cdef CppCglKnapsackCover* realCppSelf(self)
1277 *
1278 */
1279 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglKnapsackCover {
1280 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1281 struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglKnapsackCover *__pyx_vtab;
1282 };
1283
1284
1285 /* "cylp/cy/CyCgl.pxd":117
1286 * cdef CppCglKnapsackCover* realCppSelf(self)
1287 *
1288 * cdef class CyCglOddHole(CyCglCutGenerator): # <<<<<<<<<<<<<<
1289 * pass
1290 *
1291 */
1292 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglOddHole {
1293 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1294 };
1295
1296
1297 /* "cylp/cy/CyCgl.pxd":122
1298 * ##################
1299 *
1300 * cdef class CyCglFlowCover(CyCglCutGenerator): # <<<<<<<<<<<<<<
1301 * pass
1302 *
1303 */
1304 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglFlowCover {
1305 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1306 };
1307
1308
1309 /* "cylp/cy/CyCgl.pxd":127
1310 * ##################
1311 *
1312 * cdef class CyCglGomory(CyCglCutGenerator): # <<<<<<<<<<<<<<
1313 * cdef CppCglGomory* realCppSelf(self)
1314 * #cdef CppCglGomory* CppSelf
1315 */
1316 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglGomory {
1317 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1318 struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglGomory *__pyx_vtab;
1319 };
1320
1321
1322 /* "cylp/cy/CyCgl.pxd":132
1323 * #cdef CppCglCutGenerator* CppSelf
1324 *
1325 * cdef class CyCglRedSplit(CyCglCutGenerator): # <<<<<<<<<<<<<<
1326 * pass
1327 *
1328 */
1329 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglRedSplit {
1330 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1331 };
1332
1333
1334 /* "cylp/cy/CyCgl.pxd":137
1335 * ###################
1336 *
1337 * cdef class CyCglLiftAndProject(CyCglCutGenerator): # <<<<<<<<<<<<<<
1338 * pass
1339 *
1340 */
1341 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglLiftAndProject {
1342 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1343 };
1344
1345
1346 /* "cylp/cy/CyCgl.pxd":140
1347 * pass
1348 *
1349 * cdef class CyCglLandP(CyCglCutGenerator): # <<<<<<<<<<<<<<
1350 * pass
1351 *
1352 */
1353 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglLandP {
1354 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1355 };
1356
1357
1358 /* "cylp/cy/CyCgl.pxd":145
1359 * ###################
1360 *
1361 * cdef class CyCglMixedIntegerRounding(CyCglCutGenerator): # <<<<<<<<<<<<<<
1362 * pass
1363 *
1364 */
1365 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding {
1366 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1367 };
1368
1369
1370 /* "cylp/cy/CyCgl.pxd":148
1371 * pass
1372 *
1373 * cdef class CyCglMixedIntegerRounding2(CyCglCutGenerator): # <<<<<<<<<<<<<<
1374 * pass
1375 *
1376 */
1377 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2 {
1378 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1379 };
1380
1381
1382 /* "cylp/cy/CyCgl.pxd":151
1383 * pass
1384 *
1385 * cdef class CyCglTwomir(CyCglCutGenerator): # <<<<<<<<<<<<<<
1386 * pass
1387 *
1388 */
1389 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglTwomir {
1390 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1391 };
1392
1393
1394 /* "cylp/cy/CyCgl.pxd":154
1395 * pass
1396 *
1397 * cdef class CyCglResidualCapacity(CyCglCutGenerator): # <<<<<<<<<<<<<<
1398 * pass
1399 *
1400 */
1401 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglResidualCapacity {
1402 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1403 };
1404
1405
1406 /* "cylp/cy/CyCgl.pxd":162
1407 * # pass
1408 *
1409 * cdef class CyCglPreProcess(CyCglCutGenerator): # <<<<<<<<<<<<<<
1410 * pass
1411 *
1412 */
1413 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglPreProcess {
1414 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1415 };
1416
1417
1418 /* "cylp/cy/CyCgl.pxd":165
1419 * pass
1420 *
1421 * cdef class CyCglProbing(CyCglCutGenerator): # <<<<<<<<<<<<<<
1422 * pass
1423 *
1424 */
1425 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglProbing {
1426 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1427 };
1428
1429
1430 /* "cylp/cy/CyCgl.pxd":168
1431 * pass
1432 *
1433 * cdef class CyCglSimpleRounding(CyCglCutGenerator): # <<<<<<<<<<<<<<
1434 * pass
1435 *
1436 */
1437 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglSimpleRounding {
1438 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator __pyx_base;
1439 };
1440
1441
1442 /* "cylp/cy/CyCbcNode.pxd":13
1443 * bint breakTie(CppICbcNode* y)
1444 *
1445 * cdef class CyCbcNode: # <<<<<<<<<<<<<<
1446 * cdef CppICbcNode* CppSelf
1447 * cdef setCppSelf(self, CppICbcNode* cbcnode)
1448 */
1449 struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode {
1450 PyObject_HEAD
1451 struct __pyx_vtabstruct_4cylp_2cy_9CyCbcNode_CyCbcNode *__pyx_vtab;
1452 ICbcNode *CppSelf;
1453 };
1454
1455
1456 /* "cylp/cy/CyCoinIndexedVector.pxd":22
1457 *
1458 *
1459 * cdef class CyCoinIndexedVector: # <<<<<<<<<<<<<<
1460 * cpdef CppCoinIndexedVector *CppSelf
1461 * cpdef reserve(self, n)
1462 */
1463 struct __pyx_obj_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector {
1464 PyObject_HEAD
1465 struct __pyx_vtabstruct_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector *__pyx_vtab;
1466 ICoinIndexedVector *CppSelf;
1467 };
1468
1469
1470 /* "cylp/cy/CyClpPrimalColumnPivotBase.pxd":67
1471 *
1472 *
1473 * cdef class CyClpPrimalColumnPivotBase: # <<<<<<<<<<<<<<
1474 * cdef CppClpPrimalColumnPivotBase* CppSelf
1475 * cdef CyClpSimplex.CyClpSimplex cyModel
1476 */
1477 struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase {
1478 PyObject_HEAD
1479 struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_vtab;
1480 CppClpPrimalColumnPivotBase *CppSelf;
1481 struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *cyModel;
1482 };
1483
1484
1485 /* "cylp/cy/CyClpDualRowPivotBase.pxd":72
1486 *
1487 *
1488 * cdef class CyClpDualRowPivotBase: # <<<<<<<<<<<<<<
1489 * cdef CppClpDualRowPivotBase* CppSelf
1490 * cdef CyClpSimplex.CyClpSimplex cyModel
1491 */
1492 struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase {
1493 PyObject_HEAD
1494 struct __pyx_vtabstruct_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *__pyx_vtab;
1495 CppClpDualRowPivotBase *CppSelf;
1496 struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *cyModel;
1497 };
1498
1499
1500 /* "cylp/cy/CyCoinModel.pxd":34
1501 *
1502 *
1503 * cdef class CyCoinModel: # <<<<<<<<<<<<<<
1504 * cdef CppCoinModel* CppSelf
1505 *
1506 */
1507 struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel {
1508 PyObject_HEAD
1509 struct __pyx_vtabstruct_4cylp_2cy_11CyCoinModel_CyCoinModel *__pyx_vtab;
1510 CoinModel *CppSelf;
1511 };
1512
1513
1514 /* "cylp/cy/CyCoinPackedMatrix.pxd":27
1515 *
1516 *
1517 * cdef class CyCoinPackedMatrix: # <<<<<<<<<<<<<<
1518 * cpdef CppCoinPackedMatrix* CppSelf
1519 * #cpdef getIndices(self)
1520 */
1521 struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix {
1522 PyObject_HEAD
1523 ICoinPackedMatrix *CppSelf;
1524 };
1525
1526
1527 /* "cylp/cy/CyClpSimplex.pxd":302
1528 * void setOptimizationDirection(double value)
1529 *
1530 * cdef class CyClpSimplex: # <<<<<<<<<<<<<<
1531 * '''
1532 * This is the documentation of CyClpSimpelx in the pyx class
1533 */
1534 struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex {
1535 PyObject_HEAD
1536 struct __pyx_vtabstruct_4cylp_2cy_12CyClpSimplex_CyClpSimplex *__pyx_vtab;
1537 IClpSimplex *CppSelf;
1538 PyObject *vars;
1539 PyObject *varSelCriteria;
1540 struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel *coinModel;
1541 PyObject *cyLPModel;
1542 struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *cbcModel;
1543 PyObject *_Hessian;
1544 struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *cyPivot;
1545 struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *cyDualPivot;
1546 };
1547
1548
1549 /* "cylp/cy/CyClpSimplex.pxd":377
1550 * cpdef setConstraintName(self, constInd, name)
1551 *
1552 * cdef class VarStatus: # <<<<<<<<<<<<<<
1553 * pass
1554 * cpdef cydot(CyCoinIndexedVector v1, CyCoinIndexedVector v2)
1555 */
1556 struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus {
1557 PyObject_HEAD
1558 };
1559
1560
1561 /* "cylp/cy/CyOsiSolverInterface.pxd":15
1562 * pass
1563 *
1564 * cdef class CyOsiSolverInterface: # <<<<<<<<<<<<<<
1565 * cdef CppOsiSolverInterface* CppSelf
1566 * cdef setCppSelf(self, CppOsiSolverInterface* s)
1567 */
1568 struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface {
1569 PyObject_HEAD
1570 struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *__pyx_vtab;
1571 OsiSolverInterface *CppSelf;
1572 };
1573
1574
1575 /* "cylp/cy/CyOsiCuts.pxd":19
1576 *
1577 *
1578 * cdef class CyOsiCuts: # <<<<<<<<<<<<<<
1579 * cdef CppOsiCuts* CppSelf
1580 * cdef setCppSelf(self, CppOsiCuts* s)
1581 */
1582 struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts {
1583 PyObject_HEAD
1584 struct __pyx_vtabstruct_4cylp_2cy_9CyOsiCuts_CyOsiCuts *__pyx_vtab;
1585 CppOsiCuts *CppSelf;
1586 };
1587
1588
1589 /* "cylp/cy/CyCglTreeInfo.pxd":7
1590 * CppCglTreeInfo *new_CppCglTreeInfo "new CglTreeInfo" ()
1591 *
1592 * cdef class CyCglTreeInfo: # <<<<<<<<<<<<<<
1593 * cdef CppCglTreeInfo* CppSelf
1594 * cdef setCppSelf(self, CppCglTreeInfo* s)
1595 */
1596 struct __pyx_obj_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo {
1597 PyObject_HEAD
1598 struct __pyx_vtabstruct_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo *__pyx_vtab;
1599 CglTreeInfo *CppSelf;
1600 };
1601
1602
1603 /* "CyCglCutGeneratorBase.pxd":52
1604 * cdef CppCglCutGenerator* RunCglClone(void *ptr)
1605 *
1606 * cdef class CyCglCutGeneratorBase: # <<<<<<<<<<<<<<
1607 * cdef CppCglCutGeneratorBase* CppSelf
1608 * cdef CyClpSimplex.CyClpSimplex cyModel
1609 */
1610 struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase {
1611 PyObject_HEAD
1612 struct __pyx_vtabstruct_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase *__pyx_vtab;
1613 CppCglCutGeneratorBase *CppSelf;
1614 struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *cyModel;
1615 };
1616
1617
1618 /* "cylp/cy/CyCutGeneratorPythonBase.pxd":10
1619 * from cpython cimport Py_INCREF, Py_DECREF
1620 *
1621 * cdef class CyCutGeneratorPythonBase(CyCglCutGeneratorBase): # <<<<<<<<<<<<<<
1622 * cdef generateCuts(self, CppOsiSolverInterface *si,
1623 * CppOsiCuts *cs,
1624 */
1625 struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase {
1626 struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase __pyx_base;
1627 PyObject *cutGeneratorObject;
1628 PyObject *cyLPModel;
1629 };
1630
1631
1632 /* "cylp/cy/CyCbcModel.pxd":82
1633 * CppOsiSolverInterface* solver()
1634 *
1635 * cdef class CyCbcModel: # <<<<<<<<<<<<<<
1636 * cdef CppICbcModel* CppSelf
1637 * cdef object cyLPModel
1638 */
1639 struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel {
1640 PyObject_HEAD
1641 struct __pyx_vtabstruct_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_vtab;
1642 ICbcModel *CppSelf;
1643 PyObject *cyLPModel;
1644 PyObject *clpModel;
1645 PyObject *cutGenerators;
1646 };
1647
1648
1649
1650 /* "cylp/cy/CyCgl.pxd":114
1651 * pass
1652 *
1653 * cdef class CyCglKnapsackCover(CyCglCutGenerator): # <<<<<<<<<<<<<<
1654 * cdef CppCglKnapsackCover* realCppSelf(self)
1655 *
1656 */
1657
1658 struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglKnapsackCover {
1659 CglKnapsackCover *(*realCppSelf)(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglKnapsackCover *);
1660 };
1661 static struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglKnapsackCover *__pyx_vtabptr_4cylp_2cy_5CyCgl_CyCglKnapsackCover;
1662
1663
1664 /* "cylp/cy/CyCgl.pxd":127
1665 * ##################
1666 *
1667 * cdef class CyCglGomory(CyCglCutGenerator): # <<<<<<<<<<<<<<
1668 * cdef CppCglGomory* realCppSelf(self)
1669 * #cdef CppCglGomory* CppSelf
1670 */
1671
1672 struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglGomory {
1673 CglGomory *(*realCppSelf)(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglGomory *);
1674 };
1675 static struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglGomory *__pyx_vtabptr_4cylp_2cy_5CyCgl_CyCglGomory;
1676
1677
1678 /* "cylp/cy/CyCbcNode.pxd":13
1679 * bint breakTie(CppICbcNode* y)
1680 *
1681 * cdef class CyCbcNode: # <<<<<<<<<<<<<<
1682 * cdef CppICbcNode* CppSelf
1683 * cdef setCppSelf(self, CppICbcNode* cbcnode)
1684 */
1685
1686 struct __pyx_vtabstruct_4cylp_2cy_9CyCbcNode_CyCbcNode {
1687 PyObject *(*setCppSelf)(struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *, ICbcNode *);
1688 };
1689 static struct __pyx_vtabstruct_4cylp_2cy_9CyCbcNode_CyCbcNode *__pyx_vtabptr_4cylp_2cy_9CyCbcNode_CyCbcNode;
1690
1691
1692 /* "cylp/cy/CyCoinIndexedVector.pxd":22
1693 *
1694 *
1695 * cdef class CyCoinIndexedVector: # <<<<<<<<<<<<<<
1696 * cpdef CppCoinIndexedVector *CppSelf
1697 * cpdef reserve(self, n)
1698 */
1699
1700 struct __pyx_vtabstruct_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector {
1701 PyObject *(*reserve)(struct __pyx_obj_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector *, PyObject *, int __pyx_skip_dispatch);
1702 PyObject *(*assign)(struct __pyx_obj_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector *, PyObject *, PyObject *, int __pyx_skip_dispatch);
1703 PyObject *(*setCppSelf)(struct __pyx_obj_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector *, ICoinIndexedVector *);
1704 };
1705 static struct __pyx_vtabstruct_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector *__pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector;
1706
1707
1708 /* "cylp/cy/CyClpPrimalColumnPivotBase.pxd":67
1709 *
1710 *
1711 * cdef class CyClpPrimalColumnPivotBase: # <<<<<<<<<<<<<<
1712 * cdef CppClpPrimalColumnPivotBase* CppSelf
1713 * cdef CyClpSimplex.CyClpSimplex cyModel
1714 */
1715
1716 struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase {
1717 PyObject *(*pivotColumn)(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *);
1718 ClpPrimalColumnPivot *(*clone)(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *, int);
1719 void (*saveWeights)(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *, IClpSimplex *, int);
1720 IClpSimplex *(*model)(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *);
1721 void (*setModel)(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *, IClpSimplex *);
1722 double *(*getReducedCosts)(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *);
1723 };
1724 static struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase;
1725
1726
1727 /* "cylp/cy/CyClpDualRowPivotBase.pxd":72
1728 *
1729 *
1730 * cdef class CyClpDualRowPivotBase: # <<<<<<<<<<<<<<
1731 * cdef CppClpDualRowPivotBase* CppSelf
1732 * cdef CyClpSimplex.CyClpSimplex cyModel
1733 */
1734
1735 struct __pyx_vtabstruct_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase {
1736 PyObject *(*pivotRow)(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *);
1737 ClpDualRowPivot *(*clone)(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *, int);
1738 double (*updateWeights)(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *);
1739 void (*updatePrimalSolution)(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *, ICoinIndexedVector *, double, PyArrayObject *);
1740 IClpSimplex *(*model)(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *);
1741 void (*setModel)(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *, IClpSimplex *);
1742 double *(*getReducedCosts)(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *);
1743 };
1744 static struct __pyx_vtabstruct_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *__pyx_vtabptr_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase;
1745
1746
1747 /* "cylp/cy/CyCoinModel.pxd":34
1748 *
1749 *
1750 * cdef class CyCoinModel: # <<<<<<<<<<<<<<
1751 * cdef CppCoinModel* CppSelf
1752 *
1753 */
1754
1755 struct __pyx_vtabstruct_4cylp_2cy_11CyCoinModel_CyCoinModel {
1756 void (*CLP_addColumn)(struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel *, int, int *, double *, double, double, double);
1757 void (*CLP_addRow)(struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel *, int, int *, double *, double, double);
1758 };
1759 static struct __pyx_vtabstruct_4cylp_2cy_11CyCoinModel_CyCoinModel *__pyx_vtabptr_4cylp_2cy_11CyCoinModel_CyCoinModel;
1760
1761
1762 /* "cylp/cy/CyClpSimplex.pxd":302
1763 * void setOptimizationDirection(double value)
1764 *
1765 * cdef class CyClpSimplex: # <<<<<<<<<<<<<<
1766 * '''
1767 * This is the documentation of CyClpSimpelx in the pyx class
1768 */
1769
1770 struct __pyx_vtabstruct_4cylp_2cy_12CyClpSimplex_CyClpSimplex {
1771 PyObject *(*setCppSelf)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, IClpSimplex *);
1772 int (*readMps)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_4cylp_2cy_12CyClpSimplex_12CyClpSimplex_readMps *__pyx_optional_args);
1773 PyObject *(*setPrimalColumnPivotAlgorithm)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, void *);
1774 PyObject *(*setDualRowPivotAlgorithm)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, void *);
1775 double *(*primalColumnSolution)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *);
1776 double *(*dualColumnSolution)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *);
1777 double *(*primalRowSolution)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *);
1778 double *(*dualRowSolution)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *);
1779 double *(*rowLower)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *);
1780 double *(*rowUpper)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *);
1781 PyObject *(*getReducedCosts)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, int __pyx_skip_dispatch);
1782 PyObject *(*getStatusArray)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, int __pyx_skip_dispatch);
1783 PyObject *(*getComplementarityList)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, int __pyx_skip_dispatch);
1784 PyObject *(*getPivotVariable)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, int __pyx_skip_dispatch);
1785 PyObject *(*filterVars)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, PyObject *, int __pyx_skip_dispatch);
1786 PyObject *(*CLP_getVarStatus)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, int, int __pyx_skip_dispatch);
1787 PyObject *(*CLP_setVarStatus)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, int, int, int __pyx_skip_dispatch);
1788 PyObject *(*primalRow)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, int);
1789 PyObject *(*getACol)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, int, struct __pyx_obj_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector *, int __pyx_skip_dispatch);
1790 int *(*ComplementarityList)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *);
1791 int *(*pivotVariable)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *);
1792 PyObject *(*vectorTimesB_1)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, struct __pyx_obj_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector *, int __pyx_skip_dispatch);
1793 PyObject *(*setVariableName)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, PyObject *, PyObject *, int __pyx_skip_dispatch);
1794 PyObject *(*setConstraintName)(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex *, PyObject *, PyObject *, int __pyx_skip_dispatch);
1795 };
1796 static struct __pyx_vtabstruct_4cylp_2cy_12CyClpSimplex_CyClpSimplex *__pyx_vtabptr_4cylp_2cy_12CyClpSimplex_CyClpSimplex;
1797
1798
1799 /* "cylp/cy/CyOsiSolverInterface.pxd":15
1800 * pass
1801 *
1802 * cdef class CyOsiSolverInterface: # <<<<<<<<<<<<<<
1803 * cdef CppOsiSolverInterface* CppSelf
1804 * cdef setCppSelf(self, CppOsiSolverInterface* s)
1805 */
1806
1807 struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface {
1808 PyObject *(*setCppSelf)(struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *, OsiSolverInterface *);
1809 };
1810 static struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *__pyx_vtabptr_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface;
1811
1812
1813 /* "cylp/cy/CyOsiCuts.pxd":19
1814 *
1815 *
1816 * cdef class CyOsiCuts: # <<<<<<<<<<<<<<
1817 * cdef CppOsiCuts* CppSelf
1818 * cdef setCppSelf(self, CppOsiCuts* s)
1819 */
1820
1821 struct __pyx_vtabstruct_4cylp_2cy_9CyOsiCuts_CyOsiCuts {
1822 PyObject *(*setCppSelf)(struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts *, CppOsiCuts *);
1823 };
1824 static struct __pyx_vtabstruct_4cylp_2cy_9CyOsiCuts_CyOsiCuts *__pyx_vtabptr_4cylp_2cy_9CyOsiCuts_CyOsiCuts;
1825
1826
1827 /* "cylp/cy/CyCglTreeInfo.pxd":7
1828 * CppCglTreeInfo *new_CppCglTreeInfo "new CglTreeInfo" ()
1829 *
1830 * cdef class CyCglTreeInfo: # <<<<<<<<<<<<<<
1831 * cdef CppCglTreeInfo* CppSelf
1832 * cdef setCppSelf(self, CppCglTreeInfo* s)
1833 */
1834
1835 struct __pyx_vtabstruct_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo {
1836 PyObject *(*setCppSelf)(struct __pyx_obj_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo *, CglTreeInfo *);
1837 };
1838 static struct __pyx_vtabstruct_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo *__pyx_vtabptr_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo;
1839
1840
1841 /* "CyCglCutGeneratorBase.pxd":52
1842 * cdef CppCglCutGenerator* RunCglClone(void *ptr)
1843 *
1844 * cdef class CyCglCutGeneratorBase: # <<<<<<<<<<<<<<
1845 * cdef CppCglCutGeneratorBase* CppSelf
1846 * cdef CyClpSimplex.CyClpSimplex cyModel
1847 */
1848
1849 struct __pyx_vtabstruct_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase {
1850 PyObject *(*generateCuts)(struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase *, OsiSolverInterface *, CppOsiCuts *, CglTreeInfo);
1851 CglCutGenerator *(*clone)(struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase *);
1852 };
1853 static struct __pyx_vtabstruct_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase *__pyx_vtabptr_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase;
1854
1855
1856 /* "cylp/cy/CyCutGeneratorPythonBase.pxd":10
1857 * from cpython cimport Py_INCREF, Py_DECREF
1858 *
1859 * cdef class CyCutGeneratorPythonBase(CyCglCutGeneratorBase): # <<<<<<<<<<<<<<
1860 * cdef generateCuts(self, CppOsiSolverInterface *si,
1861 * CppOsiCuts *cs,
1862 */
1863
1864 struct __pyx_vtabstruct_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase {
1865 struct __pyx_vtabstruct_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase __pyx_base;
1866 };
1867 static struct __pyx_vtabstruct_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase *__pyx_vtabptr_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase;
1868
1869
1870 /* "cylp/cy/CyCbcModel.pyx":38
1871 * 'linear relaxation unbounded', 'unset']
1872 *
1873 * cdef class CyCbcModel: # <<<<<<<<<<<<<<
1874 * '''
1875 * Interfaces ``CbcModel``. To solve a first you create a
1876 */
1877
1878 struct __pyx_vtabstruct_4cylp_2cy_10CyCbcModel_CyCbcModel {
1879 PyObject *(*setCppSelf)(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *, ICbcModel *);
1880 PyObject *(*setClpModel)(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *, PyObject *);
1881 PyObject *(*addCutGenerator)(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *, struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *, int __pyx_skip_dispatch, struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator *__pyx_optional_args);
1882 };
1883 static struct __pyx_vtabstruct_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_vtabptr_4cylp_2cy_10CyCbcModel_CyCbcModel;
1884
1885 /* --- Runtime support code (head) --- */
1886 /* Refnanny.proto */
1887 #ifndef CYTHON_REFNANNY
1888 #define CYTHON_REFNANNY 0
1889 #endif
1890 #if CYTHON_REFNANNY
1891 typedef struct {
1892 void (*INCREF)(void*, PyObject*, int);
1893 void (*DECREF)(void*, PyObject*, int);
1894 void (*GOTREF)(void*, PyObject*, int);
1895 void (*GIVEREF)(void*, PyObject*, int);
1896 void* (*SetupContext)(const char*, int, const char*);
1897 void (*FinishContext)(void**);
1898 } __Pyx_RefNannyAPIStruct;
1899 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1900 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1901 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1902 #ifdef WITH_THREAD
1903 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1904 if (acquire_gil) {\
1905 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1906 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1907 PyGILState_Release(__pyx_gilstate_save);\
1908 } else {\
1909 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1910 }
1911 #else
1912 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1913 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1914 #endif
1915 #define __Pyx_RefNannyFinishContext()\
1916 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1917 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1918 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1919 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1920 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1921 #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1922 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1923 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1924 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1925 #else
1926 #define __Pyx_RefNannyDeclarations
1927 #define __Pyx_RefNannySetupContext(name, acquire_gil)
1928 #define __Pyx_RefNannyFinishContext()
1929 #define __Pyx_INCREF(r) Py_INCREF(r)
1930 #define __Pyx_DECREF(r) Py_DECREF(r)
1931 #define __Pyx_GOTREF(r)
1932 #define __Pyx_GIVEREF(r)
1933 #define __Pyx_XINCREF(r) Py_XINCREF(r)
1934 #define __Pyx_XDECREF(r) Py_XDECREF(r)
1935 #define __Pyx_XGOTREF(r)
1936 #define __Pyx_XGIVEREF(r)
1937 #endif
1938 #define __Pyx_XDECREF_SET(r, v) do {\
1939 PyObject *tmp = (PyObject *) r;\
1940 r = v; __Pyx_XDECREF(tmp);\
1941 } while (0)
1942 #define __Pyx_DECREF_SET(r, v) do {\
1943 PyObject *tmp = (PyObject *) r;\
1944 r = v; __Pyx_DECREF(tmp);\
1945 } while (0)
1946 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1947 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1948
1949 /* PyObjectGetAttrStr.proto */
1950 #if CYTHON_USE_TYPE_SLOTS
1951 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1952 #else
1953 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1954 #endif
1955
1956 /* GetBuiltinName.proto */
1957 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1958
1959 /* PyFunctionFastCall.proto */
1960 #if CYTHON_FAST_PYCALL
1961 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1962 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1963 #if 1 || PY_VERSION_HEX < 0x030600B1
1964 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
1965 #else
1966 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1967 #endif
1968 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1969 (sizeof(char [1 - 2*!(cond)]) - 1)
1970 #ifndef Py_MEMBER_SIZE
1971 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1972 #endif
1973 static size_t __pyx_pyframe_localsplus_offset = 0;
1974 #include "frameobject.h"
1975 #define __Pxy_PyFrame_Initialize_Offsets()\
1976 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1977 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1978 #define __Pyx_PyFrame_GetLocalsplus(frame)\
1979 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1980 #endif
1981
1982 /* PyObjectCall.proto */
1983 #if CYTHON_COMPILING_IN_CPYTHON
1984 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1985 #else
1986 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1987 #endif
1988
1989 /* PyObjectCallMethO.proto */
1990 #if CYTHON_COMPILING_IN_CPYTHON
1991 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1992 #endif
1993
1994 /* PyObjectCallNoArg.proto */
1995 #if CYTHON_COMPILING_IN_CPYTHON
1996 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1997 #else
1998 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1999 #endif
2000
2001 /* PyCFunctionFastCall.proto */
2002 #if CYTHON_FAST_PYCCALL
2003 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
2004 #else
2005 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
2006 #endif
2007
2008 /* PyThreadStateGet.proto */
2009 #if CYTHON_FAST_THREAD_STATE
2010 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
2011 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
2012 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
2013 #else
2014 #define __Pyx_PyThreadState_declare
2015 #define __Pyx_PyThreadState_assign
2016 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
2017 #endif
2018
2019 /* PyErrFetchRestore.proto */
2020 #if CYTHON_FAST_THREAD_STATE
2021 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
2022 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
2023 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
2024 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
2025 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
2026 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2027 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2028 #if CYTHON_COMPILING_IN_CPYTHON
2029 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
2030 #else
2031 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2032 #endif
2033 #else
2034 #define __Pyx_PyErr_Clear() PyErr_Clear()
2035 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
2036 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
2037 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
2038 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
2039 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
2040 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
2041 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
2042 #endif
2043
2044 /* WriteUnraisableException.proto */
2045 static void __Pyx_WriteUnraisable(const char *name, int clineno,
2046 int lineno, const char *filename,
2047 int full_traceback, int nogil);
2048
2049 /* RaiseDoubleKeywords.proto */
2050 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
2051
2052 /* ParseKeywords.proto */
2053 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
2054 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
2055 const char* function_name);
2056
2057 /* RaiseArgTupleInvalid.proto */
2058 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
2059 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
2060
2061 /* PyDictVersioning.proto */
2062 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2063 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2064 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2065 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2066 (version_var) = __PYX_GET_DICT_VERSION(dict);\
2067 (cache_var) = (value);
2068 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2069 static PY_UINT64_T __pyx_dict_version = 0;\
2070 static PyObject *__pyx_dict_cached_value = NULL;\
2071 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2072 (VAR) = __pyx_dict_cached_value;\
2073 } else {\
2074 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2075 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2076 }\
2077 }
2078 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2079 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2080 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2081 #else
2082 #define __PYX_GET_DICT_VERSION(dict) (0)
2083 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2084 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2085 #endif
2086
2087 /* GetModuleGlobalName.proto */
2088 #if CYTHON_USE_DICT_VERSIONS
2089 #define __Pyx_GetModuleGlobalName(var, name) {\
2090 static PY_UINT64_T __pyx_dict_version = 0;\
2091 static PyObject *__pyx_dict_cached_value = NULL;\
2092 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
2093 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
2094 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2095 }
2096 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
2097 PY_UINT64_T __pyx_dict_version;\
2098 PyObject *__pyx_dict_cached_value;\
2099 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2100 }
2101 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2102 #else
2103 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2104 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2105 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
2106 #endif
2107
2108 /* PyObjectCallOneArg.proto */
2109 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2110
2111 /* RaiseException.proto */
2112 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2113
2114 /* ListAppend.proto */
2115 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx_PyList_Append(PyObject * list,PyObject * x)2116 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
2117 PyListObject* L = (PyListObject*) list;
2118 Py_ssize_t len = Py_SIZE(list);
2119 if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
2120 Py_INCREF(x);
2121 PyList_SET_ITEM(list, len, x);
2122 __Pyx_SET_SIZE(list, len + 1);
2123 return 0;
2124 }
2125 return PyList_Append(list, x);
2126 }
2127 #else
2128 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2129 #endif
2130
2131 /* PyObjectCall2Args.proto */
2132 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
2133
2134 /* PyObjectGetMethod.proto */
2135 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
2136
2137 /* PyObjectCallMethod1.proto */
2138 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
2139
2140 /* append.proto */
2141 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
2142
2143 /* ArgTypeTest.proto */
2144 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
2145 ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
2146 __Pyx__ArgTypeTest(obj, type, name, exact))
2147 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
2148
2149 /* GetItemInt.proto */
2150 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2151 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2152 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
2153 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
2154 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
2155 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2156 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2157 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2158 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2159 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2160 int wraparound, int boundscheck);
2161 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2162 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2163 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2164 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2165 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2166 int wraparound, int boundscheck);
2167 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2168 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2169 int is_list, int wraparound, int boundscheck);
2170
2171 /* ObjectGetItem.proto */
2172 #if CYTHON_USE_TYPE_SLOTS
2173 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
2174 #else
2175 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
2176 #endif
2177
2178 /* ListCompAppend.proto */
2179 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
__Pyx_ListComp_Append(PyObject * list,PyObject * x)2180 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
2181 PyListObject* L = (PyListObject*) list;
2182 Py_ssize_t len = Py_SIZE(list);
2183 if (likely(L->allocated > len)) {
2184 Py_INCREF(x);
2185 PyList_SET_ITEM(list, len, x);
2186 __Pyx_SET_SIZE(list, len + 1);
2187 return 0;
2188 }
2189 return PyList_Append(list, x);
2190 }
2191 #else
2192 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
2193 #endif
2194
2195 /* DictGetItem.proto */
2196 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
2197 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
2198 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
2199 (likely(PyDict_CheckExact(obj)) ?\
2200 __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
2201 #else
2202 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
2203 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
2204 #endif
2205
2206 /* RaiseTooManyValuesToUnpack.proto */
2207 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2208
2209 /* RaiseNeedMoreValuesToUnpack.proto */
2210 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2211
2212 /* RaiseNoneIterError.proto */
2213 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
2214
2215 /* ExtTypeTest.proto */
2216 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2217
2218 /* GetTopmostException.proto */
2219 #if CYTHON_USE_EXC_INFO_STACK
2220 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2221 #endif
2222
2223 /* SaveResetException.proto */
2224 #if CYTHON_FAST_THREAD_STATE
2225 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2226 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2227 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2228 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2229 #else
2230 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2231 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2232 #endif
2233
2234 /* PyErrExceptionMatches.proto */
2235 #if CYTHON_FAST_THREAD_STATE
2236 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2237 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2238 #else
2239 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2240 #endif
2241
2242 /* GetException.proto */
2243 #if CYTHON_FAST_THREAD_STATE
2244 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2245 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2246 #else
2247 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2248 #endif
2249
2250 /* PyObject_GenericGetAttrNoDict.proto */
2251 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2252 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2253 #else
2254 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2255 #endif
2256
2257 /* PyObject_GenericGetAttr.proto */
2258 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2259 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2260 #else
2261 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2262 #endif
2263
2264 /* SetVTable.proto */
2265 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
2266
2267 /* PyObjectGetAttrStrNoError.proto */
2268 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2269
2270 /* SetupReduce.proto */
2271 static int __Pyx_setup_reduce(PyObject* type_obj);
2272
2273 /* TypeImport.proto */
2274 #ifndef __PYX_HAVE_RT_ImportType_proto
2275 #define __PYX_HAVE_RT_ImportType_proto
2276 enum __Pyx_ImportType_CheckSize {
2277 __Pyx_ImportType_CheckSize_Error = 0,
2278 __Pyx_ImportType_CheckSize_Warn = 1,
2279 __Pyx_ImportType_CheckSize_Ignore = 2
2280 };
2281 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
2282 #endif
2283
2284 /* GetVTable.proto */
2285 static void* __Pyx_GetVtable(PyObject *dict);
2286
2287 /* Import.proto */
2288 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
2289
2290 /* ImportFrom.proto */
2291 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2292
2293 /* CLineInTraceback.proto */
2294 #ifdef CYTHON_CLINE_IN_TRACEBACK
2295 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2296 #else
2297 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2298 #endif
2299
2300 /* CodeObjectCache.proto */
2301 typedef struct {
2302 PyCodeObject* code_object;
2303 int code_line;
2304 } __Pyx_CodeObjectCacheEntry;
2305 struct __Pyx_CodeObjectCache {
2306 int count;
2307 int max_count;
2308 __Pyx_CodeObjectCacheEntry* entries;
2309 };
2310 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2311 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2312 static PyCodeObject *__pyx_find_code_object(int code_line);
2313 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2314
2315 /* AddTraceback.proto */
2316 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2317 int py_line, const char *filename);
2318
2319 /* CIntToPy.proto */
2320 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2321
2322 /* CIntToPy.proto */
2323 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2324
2325 /* RealImag.proto */
2326 #if CYTHON_CCOMPLEX
2327 #ifdef __cplusplus
2328 #define __Pyx_CREAL(z) ((z).real())
2329 #define __Pyx_CIMAG(z) ((z).imag())
2330 #else
2331 #define __Pyx_CREAL(z) (__real__(z))
2332 #define __Pyx_CIMAG(z) (__imag__(z))
2333 #endif
2334 #else
2335 #define __Pyx_CREAL(z) ((z).real)
2336 #define __Pyx_CIMAG(z) ((z).imag)
2337 #endif
2338 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2339 && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2340 #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2341 #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2342 #else
2343 #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2344 #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2345 #endif
2346
2347 /* Arithmetic.proto */
2348 #if CYTHON_CCOMPLEX
2349 #define __Pyx_c_eq_float(a, b) ((a)==(b))
2350 #define __Pyx_c_sum_float(a, b) ((a)+(b))
2351 #define __Pyx_c_diff_float(a, b) ((a)-(b))
2352 #define __Pyx_c_prod_float(a, b) ((a)*(b))
2353 #define __Pyx_c_quot_float(a, b) ((a)/(b))
2354 #define __Pyx_c_neg_float(a) (-(a))
2355 #ifdef __cplusplus
2356 #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2357 #define __Pyx_c_conj_float(z) (::std::conj(z))
2358 #if 1
2359 #define __Pyx_c_abs_float(z) (::std::abs(z))
2360 #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2361 #endif
2362 #else
2363 #define __Pyx_c_is_zero_float(z) ((z)==0)
2364 #define __Pyx_c_conj_float(z) (conjf(z))
2365 #if 1
2366 #define __Pyx_c_abs_float(z) (cabsf(z))
2367 #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2368 #endif
2369 #endif
2370 #else
2371 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2372 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2373 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2374 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2375 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2376 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2377 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2378 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2379 #if 1
2380 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2381 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2382 #endif
2383 #endif
2384
2385 /* Arithmetic.proto */
2386 #if CYTHON_CCOMPLEX
2387 #define __Pyx_c_eq_double(a, b) ((a)==(b))
2388 #define __Pyx_c_sum_double(a, b) ((a)+(b))
2389 #define __Pyx_c_diff_double(a, b) ((a)-(b))
2390 #define __Pyx_c_prod_double(a, b) ((a)*(b))
2391 #define __Pyx_c_quot_double(a, b) ((a)/(b))
2392 #define __Pyx_c_neg_double(a) (-(a))
2393 #ifdef __cplusplus
2394 #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2395 #define __Pyx_c_conj_double(z) (::std::conj(z))
2396 #if 1
2397 #define __Pyx_c_abs_double(z) (::std::abs(z))
2398 #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2399 #endif
2400 #else
2401 #define __Pyx_c_is_zero_double(z) ((z)==0)
2402 #define __Pyx_c_conj_double(z) (conj(z))
2403 #if 1
2404 #define __Pyx_c_abs_double(z) (cabs(z))
2405 #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2406 #endif
2407 #endif
2408 #else
2409 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2410 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2411 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2412 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2413 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2414 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2415 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2416 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2417 #if 1
2418 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2419 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2420 #endif
2421 #endif
2422
2423 /* CIntToPy.proto */
2424 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
2425
2426 /* CIntFromPy.proto */
2427 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2428
2429 /* CIntFromPy.proto */
2430 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2431
2432 /* FastTypeChecks.proto */
2433 #if CYTHON_COMPILING_IN_CPYTHON
2434 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2435 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2436 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2437 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2438 #else
2439 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2440 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2441 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2442 #endif
2443 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2444
2445 /* CheckBinaryVersion.proto */
2446 static int __Pyx_check_binary_version(void);
2447
2448 /* InitStrings.proto */
2449 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2450
2451 static PyObject *__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_setCppSelf(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, ICbcModel *__pyx_v_cppmodel); /* proto*/
2452 static PyObject *__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_setClpModel(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_clpmodel); /* proto*/
2453 static PyObject *__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *__pyx_v_generator, int __pyx_skip_dispatch, struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator *__pyx_optional_args); /* proto*/
2454
2455 /* Module declarations from 'cpython.buffer' */
2456
2457 /* Module declarations from 'libc.string' */
2458
2459 /* Module declarations from 'libc.stdio' */
2460
2461 /* Module declarations from '__builtin__' */
2462
2463 /* Module declarations from 'cpython.type' */
2464 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2465
2466 /* Module declarations from 'cpython.version' */
2467
2468 /* Module declarations from 'cpython.exc' */
2469
2470 /* Module declarations from 'cpython.module' */
2471
2472 /* Module declarations from 'cpython.mem' */
2473
2474 /* Module declarations from 'cpython.tuple' */
2475
2476 /* Module declarations from 'cpython.list' */
2477
2478 /* Module declarations from 'cpython.sequence' */
2479
2480 /* Module declarations from 'cpython.mapping' */
2481
2482 /* Module declarations from 'cpython.iterator' */
2483
2484 /* Module declarations from 'cpython.number' */
2485
2486 /* Module declarations from 'cpython.int' */
2487
2488 /* Module declarations from '__builtin__' */
2489
2490 /* Module declarations from 'cpython.bool' */
2491 static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
2492
2493 /* Module declarations from 'cpython.long' */
2494
2495 /* Module declarations from 'cpython.float' */
2496
2497 /* Module declarations from '__builtin__' */
2498
2499 /* Module declarations from 'cpython.complex' */
2500 static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
2501
2502 /* Module declarations from 'cpython.string' */
2503
2504 /* Module declarations from 'cpython.unicode' */
2505
2506 /* Module declarations from 'cpython.dict' */
2507
2508 /* Module declarations from 'cpython.instance' */
2509
2510 /* Module declarations from 'cpython.function' */
2511
2512 /* Module declarations from 'cpython.method' */
2513
2514 /* Module declarations from 'cpython.weakref' */
2515
2516 /* Module declarations from 'cpython.getargs' */
2517
2518 /* Module declarations from 'cpython.pythread' */
2519
2520 /* Module declarations from 'cpython.pystate' */
2521
2522 /* Module declarations from 'cpython.cobject' */
2523
2524 /* Module declarations from 'cpython.oldbuffer' */
2525
2526 /* Module declarations from 'cpython.set' */
2527
2528 /* Module declarations from 'cpython.bytes' */
2529
2530 /* Module declarations from 'cpython.pycapsule' */
2531
2532 /* Module declarations from 'cpython' */
2533
2534 /* Module declarations from 'cpython.object' */
2535
2536 /* Module declarations from 'cpython.ref' */
2537
2538 /* Module declarations from 'numpy' */
2539
2540 /* Module declarations from 'numpy' */
2541 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2542 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2543 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2544 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2545 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2546 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
2547
2548 /* Module declarations from 'cylp.cy.CyCgl' */
2549 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglCutGenerator = 0;
2550 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglAllDifferent = 0;
2551 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglClique = 0;
2552 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglKnapsackCover = 0;
2553 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglOddHole = 0;
2554 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglFlowCover = 0;
2555 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglGomory = 0;
2556 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglRedSplit = 0;
2557 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglLiftAndProject = 0;
2558 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglLandP = 0;
2559 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding = 0;
2560 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2 = 0;
2561 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglTwomir = 0;
2562 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglResidualCapacity = 0;
2563 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglPreProcess = 0;
2564 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglProbing = 0;
2565 static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglSimpleRounding = 0;
2566
2567 /* Module declarations from 'cylp.cy.CyCbcNode' */
2568 static PyTypeObject *__pyx_ptype_4cylp_2cy_9CyCbcNode_CyCbcNode = 0;
2569
2570 /* Module declarations from 'cylp.cy' */
2571
2572 /* Module declarations from 'cylp.cy.CyCoinIndexedVector' */
2573 static PyTypeObject *__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector = 0;
2574
2575 /* Module declarations from 'cylp.cy.CyClpPrimalColumnPivotBase' */
2576 static PyTypeObject *__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = 0;
2577
2578 /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */
2579 static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0;
2580
2581 /* Module declarations from 'cylp.cy.CyCoinModel' */
2582 static PyTypeObject *__pyx_ptype_4cylp_2cy_11CyCoinModel_CyCoinModel = 0;
2583
2584 /* Module declarations from 'cylp.cy.CyCoinPackedMatrix' */
2585 static PyTypeObject *__pyx_ptype_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix = 0;
2586
2587 /* Module declarations from 'libcpp.string' */
2588
2589 /* Module declarations from 'libcpp.vector' */
2590
2591 /* Module declarations from 'cylp.cy.CyClpSimplex' */
2592 static PyTypeObject *__pyx_ptype_4cylp_2cy_12CyClpSimplex_CyClpSimplex = 0;
2593 static PyTypeObject *__pyx_ptype_4cylp_2cy_12CyClpSimplex_VarStatus = 0;
2594
2595 /* Module declarations from 'cylp.cy.CyOsiSolverInterface' */
2596 static PyTypeObject *__pyx_ptype_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface = 0;
2597
2598 /* Module declarations from 'cylp.cy.CyOsiCuts' */
2599 static PyTypeObject *__pyx_ptype_4cylp_2cy_9CyOsiCuts_CyOsiCuts = 0;
2600
2601 /* Module declarations from 'cylp.cy.CyCglTreeInfo' */
2602 static PyTypeObject *__pyx_ptype_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo = 0;
2603
2604 /* Module declarations from 'cylp.cy.CyCglCutGeneratorBase' */
2605 static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase = 0;
2606
2607 /* Module declarations from 'cylp.cy.CyCutGeneratorPythonBase' */
2608 static PyTypeObject *__pyx_ptype_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase = 0;
2609
2610 /* Module declarations from 'libcpp' */
2611
2612 /* Module declarations from 'cylp.cy.CyCbcModel' */
2613 static PyTypeObject *__pyx_ptype_4cylp_2cy_10CyCbcModel_CyCbcModel = 0;
2614 static int __pyx_f_4cylp_2cy_10CyCbcModel_RunTest(void *, ICbcNode *, ICbcNode *); /*proto*/
2615 static bool __pyx_f_4cylp_2cy_10CyCbcModel_RunNewSolution(void *, ICbcModel *, double, int); /*proto*/
2616 static int __pyx_f_4cylp_2cy_10CyCbcModel_RunEvery1000Nodes(void *, ICbcModel *, int); /*proto*/
2617 #define __Pyx_MODULE_NAME "cylp.cy.CyCbcModel"
2618 extern int __pyx_module_is_main_cylp__cy__CyCbcModel;
2619 int __pyx_module_is_main_cylp__cy__CyCbcModel = 0;
2620
2621 /* Implementation of 'cylp.cy.CyCbcModel' */
2622 static PyObject *__pyx_builtin_ImportError;
2623 static PyObject *__pyx_builtin_zip;
2624 static PyObject *__pyx_builtin_AttributeError;
2625 static PyObject *__pyx_builtin_TypeError;
2626 static PyObject *__pyx_builtin_range;
2627 static PyObject *__pyx_builtin_ValueError;
2628 static PyObject *__pyx_builtin_RuntimeError;
2629 static const char __pyx_k_[] = "";
2630 static const char __pyx_k_zip[] = "zip";
2631 static const char __pyx_k_dims[] = "dims";
2632 static const char __pyx_k_inds[] = "inds";
2633 static const char __pyx_k_izip[] = "izip";
2634 static const char __pyx_k_keys[] = "keys";
2635 static const char __pyx_k_main[] = "__main__";
2636 static const char __pyx_k_name[] = "name";
2637 static const char __pyx_k_test[] = "__test__";
2638 static const char __pyx_k_class[] = "__class__";
2639 static const char __pyx_k_range[] = "range";
2640 static const char __pyx_k_unset[] = "unset";
2641 static const char __pyx_k_utf_8[] = "utf-8";
2642 static const char __pyx_k_append[] = "append";
2643 static const char __pyx_k_encode[] = "encode";
2644 static const char __pyx_k_import[] = "__import__";
2645 static const char __pyx_k_name_2[] = "__name__";
2646 static const char __pyx_k_normal[] = "normal";
2647 static const char __pyx_k_reduce[] = "__reduce__";
2648 static const char __pyx_k_compare[] = "compare";
2649 static const char __pyx_k_getitem[] = "__getitem__";
2650 static const char __pyx_k_indices[] = "indices";
2651 static const char __pyx_k_product[] = "product";
2652 static const char __pyx_k_getstate[] = "__getstate__";
2653 static const char __pyx_k_howOften[] = "howOften";
2654 static const char __pyx_k_setstate[] = "__setstate__";
2655 static const char __pyx_k_solution[] = "solution";
2656 static const char __pyx_k_varIndex[] = "varIndex";
2657 static const char __pyx_k_TypeError[] = "TypeError";
2658 static const char __pyx_k_cyLPModel[] = "cyLPModel";
2659 static const char __pyx_k_generator[] = "generator";
2660 static const char __pyx_k_itertools[] = "itertools";
2661 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2662 static const char __pyx_k_whatDepth[] = "whatDepth";
2663 static const char __pyx_k_CyCbcModel[] = "CyCbcModel";
2664 static const char __pyx_k_ValueError[] = "ValueError";
2665 static const char __pyx_k_atSolution[] = "atSolution";
2666 static const char __pyx_k_infeasible[] = "infeasible";
2667 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2668 static const char __pyx_k_ImportError[] = "ImportError";
2669 static const char __pyx_k_cylp_py_mip[] = "cylp.py.mip";
2670 static const char __pyx_k_newSolution[] = "newSolution";
2671 static const char __pyx_k_CyLPSolution[] = "CyLPSolution";
2672 static const char __pyx_k_RuntimeError[] = "RuntimeError";
2673 static const char __pyx_k_getVarByName[] = "getVarByName";
2674 static const char __pyx_k_howOftenInSub[] = "howOftenInSub";
2675 static const char __pyx_k_problemStatus[] = "problemStatus";
2676 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2677 static const char __pyx_k_variableNames[] = "variableNames";
2678 static const char __pyx_k_AttributeError[] = "AttributeError";
2679 static const char __pyx_k_every1000Nodes[] = "every1000Nodes";
2680 static const char __pyx_k_stopped_on_gap[] = "stopped on gap";
2681 static const char __pyx_k_whatDepthInSub[] = "whatDepthInSub";
2682 static const char __pyx_k_NodeCompareBase[] = "NodeCompareBase";
2683 static const char __pyx_k_addCutGenerator[] = "addCutGenerator";
2684 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2685 static const char __pyx_k_stopped_on_time[] = "stopped on time";
2686 static const char __pyx_k_stopped_on_nodes[] = "stopped on nodes";
2687 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2688 static const char __pyx_k_relaxation_infeasible[] = "relaxation infeasible";
2689 static const char __pyx_k_stopped_on_user_event[] = "stopped on user event";
2690 static const char __pyx_k_pythonCutGeneratorObject[] = "pythonCutGeneratorObject";
2691 static const char __pyx_k_cylp_py_modeling_CyLPModel[] = "cylp.py.modeling.CyLPModel";
2692 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
2693 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2694 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
2695 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
2696 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
2697 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
2698 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2699 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2700 static const char __pyx_k_setNodeCompare_argument_should_b[] = "setNodeCompare argument should be a NodeCompareBase object. Got %s";
2701 static const char __pyx_k_stopped_on_solutionslinear_relax[] = "stopped on solutionslinear relaxation unbounded";
2702 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
2703 static PyObject *__pyx_kp_s_;
2704 static PyObject *__pyx_n_s_AttributeError;
2705 static PyObject *__pyx_n_s_CyCbcModel;
2706 static PyObject *__pyx_n_s_CyLPSolution;
2707 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
2708 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
2709 static PyObject *__pyx_n_s_ImportError;
2710 static PyObject *__pyx_n_s_NodeCompareBase;
2711 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
2712 static PyObject *__pyx_n_s_RuntimeError;
2713 static PyObject *__pyx_n_s_TypeError;
2714 static PyObject *__pyx_n_s_ValueError;
2715 static PyObject *__pyx_n_s_addCutGenerator;
2716 static PyObject *__pyx_n_s_append;
2717 static PyObject *__pyx_n_s_atSolution;
2718 static PyObject *__pyx_n_s_class;
2719 static PyObject *__pyx_n_s_cline_in_traceback;
2720 static PyObject *__pyx_n_s_compare;
2721 static PyObject *__pyx_n_s_cyLPModel;
2722 static PyObject *__pyx_n_s_cylp_py_mip;
2723 static PyObject *__pyx_n_s_cylp_py_modeling_CyLPModel;
2724 static PyObject *__pyx_n_s_dims;
2725 static PyObject *__pyx_n_s_encode;
2726 static PyObject *__pyx_n_s_every1000Nodes;
2727 static PyObject *__pyx_n_s_generator;
2728 static PyObject *__pyx_n_s_getVarByName;
2729 static PyObject *__pyx_n_s_getitem;
2730 static PyObject *__pyx_n_s_getstate;
2731 static PyObject *__pyx_n_s_howOften;
2732 static PyObject *__pyx_n_s_howOftenInSub;
2733 static PyObject *__pyx_n_s_import;
2734 static PyObject *__pyx_n_s_indices;
2735 static PyObject *__pyx_n_s_inds;
2736 static PyObject *__pyx_n_s_infeasible;
2737 static PyObject *__pyx_n_s_itertools;
2738 static PyObject *__pyx_n_s_izip;
2739 static PyObject *__pyx_n_s_keys;
2740 static PyObject *__pyx_n_s_main;
2741 static PyObject *__pyx_n_s_name;
2742 static PyObject *__pyx_n_s_name_2;
2743 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
2744 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
2745 static PyObject *__pyx_n_s_newSolution;
2746 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2747 static PyObject *__pyx_n_s_normal;
2748 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2749 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2750 static PyObject *__pyx_n_s_problemStatus;
2751 static PyObject *__pyx_n_s_product;
2752 static PyObject *__pyx_n_s_pythonCutGeneratorObject;
2753 static PyObject *__pyx_n_s_pyx_vtable;
2754 static PyObject *__pyx_n_s_range;
2755 static PyObject *__pyx_n_s_reduce;
2756 static PyObject *__pyx_n_s_reduce_cython;
2757 static PyObject *__pyx_n_s_reduce_ex;
2758 static PyObject *__pyx_kp_s_relaxation_infeasible;
2759 static PyObject *__pyx_kp_s_setNodeCompare_argument_should_b;
2760 static PyObject *__pyx_n_s_setstate;
2761 static PyObject *__pyx_n_s_setstate_cython;
2762 static PyObject *__pyx_n_s_solution;
2763 static PyObject *__pyx_kp_s_stopped_on_gap;
2764 static PyObject *__pyx_kp_s_stopped_on_nodes;
2765 static PyObject *__pyx_kp_s_stopped_on_solutionslinear_relax;
2766 static PyObject *__pyx_kp_s_stopped_on_time;
2767 static PyObject *__pyx_kp_s_stopped_on_user_event;
2768 static PyObject *__pyx_n_s_test;
2769 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
2770 static PyObject *__pyx_n_s_unset;
2771 static PyObject *__pyx_kp_s_utf_8;
2772 static PyObject *__pyx_n_s_varIndex;
2773 static PyObject *__pyx_n_s_variableNames;
2774 static PyObject *__pyx_n_s_whatDepth;
2775 static PyObject *__pyx_n_s_whatDepthInSub;
2776 static PyObject *__pyx_n_s_zip;
2777 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel___cinit__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_cyLPModel); /* proto */
2778 static void __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_2__dealloc__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2779 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_4setNodeCompare(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_nodeCompareObject); /* proto */
2780 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6addCutGenerator(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *__pyx_v_generator, PyObject *__pyx_v_howOften, PyObject *__pyx_v_name, PyObject *__pyx_v_normal, PyObject *__pyx_v_atSolution, PyObject *__pyx_v_infeasible, PyObject *__pyx_v_howOftenInSub, PyObject *__pyx_v_whatDepth, PyObject *__pyx_v_whatDepthInSub); /* proto */
2781 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8addPythonCutGenerator(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_pythonCutGeneratorObject, PyObject *__pyx_v_howOften, PyObject *__pyx_v_name, PyObject *__pyx_v_normal, PyObject *__pyx_v_atSolution, PyObject *__pyx_v_infeasible, PyObject *__pyx_v_howOftenInSub, PyObject *__pyx_v_whatDepth, PyObject *__pyx_v_whatDepthInSub); /* proto */
2782 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_10solve(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2783 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2784 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2785 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2786 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2787 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2788 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2789 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2790 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2791 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2792 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2793 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicSolutions___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2794 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2795 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2796 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjValue___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2797 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2798 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2799 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2800 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2801 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2802 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2803 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2804 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2805 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2806 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2807 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2808 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2809 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2810 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2811 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2812 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2813 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2814 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */
2815 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2816 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2817 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
2818 static PyObject *__pyx_tp_new_4cylp_2cy_10CyCbcModel_CyCbcModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2819 static PyObject *__pyx_int_1;
2820 static PyObject *__pyx_int_neg_1;
2821 static PyObject *__pyx_int_neg_100;
2822 static PyObject *__pyx_tuple__2;
2823 static PyObject *__pyx_tuple__3;
2824 static PyObject *__pyx_tuple__4;
2825 static PyObject *__pyx_tuple__5;
2826 static PyObject *__pyx_tuple__6;
2827 static PyObject *__pyx_tuple__7;
2828 static PyObject *__pyx_tuple__8;
2829 static PyObject *__pyx_tuple__9;
2830 static PyObject *__pyx_tuple__10;
2831 /* Late includes */
2832
2833 /* "cylp/cy/CyCbcModel.pyx":14
2834 *
2835 *
2836 * cdef int RunTest(void* ptr, CppICbcNode*x, CppICbcNode*y): # <<<<<<<<<<<<<<
2837 * obj = <object> ptr
2838 * return obj.compare(CyCbcNode().setCppSelf(x),
2839 */
2840
__pyx_f_4cylp_2cy_10CyCbcModel_RunTest(void * __pyx_v_ptr,ICbcNode * __pyx_v_x,ICbcNode * __pyx_v_y)2841 static int __pyx_f_4cylp_2cy_10CyCbcModel_RunTest(void *__pyx_v_ptr, ICbcNode *__pyx_v_x, ICbcNode *__pyx_v_y) {
2842 PyObject *__pyx_v_obj = NULL;
2843 int __pyx_r;
2844 __Pyx_RefNannyDeclarations
2845 PyObject *__pyx_t_1 = NULL;
2846 PyObject *__pyx_t_2 = NULL;
2847 PyObject *__pyx_t_3 = NULL;
2848 PyObject *__pyx_t_4 = NULL;
2849 PyObject *__pyx_t_5 = NULL;
2850 int __pyx_t_6;
2851 PyObject *__pyx_t_7 = NULL;
2852 int __pyx_lineno = 0;
2853 const char *__pyx_filename = NULL;
2854 int __pyx_clineno = 0;
2855 __Pyx_RefNannySetupContext("RunTest", 0);
2856
2857 /* "cylp/cy/CyCbcModel.pyx":15
2858 *
2859 * cdef int RunTest(void* ptr, CppICbcNode*x, CppICbcNode*y):
2860 * obj = <object> ptr # <<<<<<<<<<<<<<
2861 * return obj.compare(CyCbcNode().setCppSelf(x),
2862 * CyCbcNode().setCppSelf(y))
2863 */
2864 __pyx_t_1 = ((PyObject *)__pyx_v_ptr);
2865 __Pyx_INCREF(__pyx_t_1);
2866 __pyx_v_obj = __pyx_t_1;
2867 __pyx_t_1 = 0;
2868
2869 /* "cylp/cy/CyCbcModel.pyx":16
2870 * cdef int RunTest(void* ptr, CppICbcNode*x, CppICbcNode*y):
2871 * obj = <object> ptr
2872 * return obj.compare(CyCbcNode().setCppSelf(x), # <<<<<<<<<<<<<<
2873 * CyCbcNode().setCppSelf(y))
2874 *
2875 */
2876 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_compare); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 16, __pyx_L1_error)
2877 __Pyx_GOTREF(__pyx_t_2);
2878 __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cylp_2cy_9CyCbcNode_CyCbcNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 16, __pyx_L1_error)
2879 __Pyx_GOTREF(__pyx_t_3);
2880 __pyx_t_4 = ((struct __pyx_vtabstruct_4cylp_2cy_9CyCbcNode_CyCbcNode *)((struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *)__pyx_t_3)->__pyx_vtab)->setCppSelf(((struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *)__pyx_t_3), __pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 16, __pyx_L1_error)
2881 __Pyx_GOTREF(__pyx_t_4);
2882 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2883
2884 /* "cylp/cy/CyCbcModel.pyx":17
2885 * obj = <object> ptr
2886 * return obj.compare(CyCbcNode().setCppSelf(x),
2887 * CyCbcNode().setCppSelf(y)) # <<<<<<<<<<<<<<
2888 *
2889 * cdef bool RunNewSolution(void* ptr, CppICbcModel* model,
2890 */
2891 __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cylp_2cy_9CyCbcNode_CyCbcNode)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 17, __pyx_L1_error)
2892 __Pyx_GOTREF(__pyx_t_3);
2893 __pyx_t_5 = ((struct __pyx_vtabstruct_4cylp_2cy_9CyCbcNode_CyCbcNode *)((struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *)__pyx_t_3)->__pyx_vtab)->setCppSelf(((struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *)__pyx_t_3), __pyx_v_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 17, __pyx_L1_error)
2894 __Pyx_GOTREF(__pyx_t_5);
2895 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2896 __pyx_t_3 = NULL;
2897 __pyx_t_6 = 0;
2898 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
2899 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
2900 if (likely(__pyx_t_3)) {
2901 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
2902 __Pyx_INCREF(__pyx_t_3);
2903 __Pyx_INCREF(function);
2904 __Pyx_DECREF_SET(__pyx_t_2, function);
2905 __pyx_t_6 = 1;
2906 }
2907 }
2908 #if CYTHON_FAST_PYCALL
2909 if (PyFunction_Check(__pyx_t_2)) {
2910 PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
2911 __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
2912 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
2913 __Pyx_GOTREF(__pyx_t_1);
2914 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2915 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2916 } else
2917 #endif
2918 #if CYTHON_FAST_PYCCALL
2919 if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
2920 PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_4, __pyx_t_5};
2921 __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
2922 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
2923 __Pyx_GOTREF(__pyx_t_1);
2924 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2925 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2926 } else
2927 #endif
2928 {
2929 __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 16, __pyx_L1_error)
2930 __Pyx_GOTREF(__pyx_t_7);
2931 if (__pyx_t_3) {
2932 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
2933 }
2934 __Pyx_GIVEREF(__pyx_t_4);
2935 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
2936 __Pyx_GIVEREF(__pyx_t_5);
2937 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_5);
2938 __pyx_t_4 = 0;
2939 __pyx_t_5 = 0;
2940 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
2941 __Pyx_GOTREF(__pyx_t_1);
2942 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
2943 }
2944 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2945
2946 /* "cylp/cy/CyCbcModel.pyx":16
2947 * cdef int RunTest(void* ptr, CppICbcNode*x, CppICbcNode*y):
2948 * obj = <object> ptr
2949 * return obj.compare(CyCbcNode().setCppSelf(x), # <<<<<<<<<<<<<<
2950 * CyCbcNode().setCppSelf(y))
2951 *
2952 */
2953 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 16, __pyx_L1_error)
2954 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2955 __pyx_r = __pyx_t_6;
2956 goto __pyx_L0;
2957
2958 /* "cylp/cy/CyCbcModel.pyx":14
2959 *
2960 *
2961 * cdef int RunTest(void* ptr, CppICbcNode*x, CppICbcNode*y): # <<<<<<<<<<<<<<
2962 * obj = <object> ptr
2963 * return obj.compare(CyCbcNode().setCppSelf(x),
2964 */
2965
2966 /* function exit code */
2967 __pyx_L1_error:;
2968 __Pyx_XDECREF(__pyx_t_1);
2969 __Pyx_XDECREF(__pyx_t_2);
2970 __Pyx_XDECREF(__pyx_t_3);
2971 __Pyx_XDECREF(__pyx_t_4);
2972 __Pyx_XDECREF(__pyx_t_5);
2973 __Pyx_XDECREF(__pyx_t_7);
2974 __Pyx_WriteUnraisable("cylp.cy.CyCbcModel.RunTest", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
2975 __pyx_r = 0;
2976 __pyx_L0:;
2977 __Pyx_XDECREF(__pyx_v_obj);
2978 __Pyx_RefNannyFinishContext();
2979 return __pyx_r;
2980 }
2981
2982 /* "cylp/cy/CyCbcModel.pyx":19
2983 * CyCbcNode().setCppSelf(y))
2984 *
2985 * cdef bool RunNewSolution(void* ptr, CppICbcModel* model, # <<<<<<<<<<<<<<
2986 * double objectiveAtContinuous,
2987 * int numberInfeasibilitiesAtContinuous):
2988 */
2989
__pyx_f_4cylp_2cy_10CyCbcModel_RunNewSolution(void * __pyx_v_ptr,ICbcModel * __pyx_v_model,double __pyx_v_objectiveAtContinuous,int __pyx_v_numberInfeasibilitiesAtContinuous)2990 static bool __pyx_f_4cylp_2cy_10CyCbcModel_RunNewSolution(void *__pyx_v_ptr, ICbcModel *__pyx_v_model, double __pyx_v_objectiveAtContinuous, int __pyx_v_numberInfeasibilitiesAtContinuous) {
2991 PyObject *__pyx_v_obj = NULL;
2992 bool __pyx_r;
2993 __Pyx_RefNannyDeclarations
2994 PyObject *__pyx_t_1 = NULL;
2995 PyObject *__pyx_t_2 = NULL;
2996 PyObject *__pyx_t_3 = NULL;
2997 PyObject *__pyx_t_4 = NULL;
2998 PyObject *__pyx_t_5 = NULL;
2999 PyObject *__pyx_t_6 = NULL;
3000 int __pyx_t_7;
3001 PyObject *__pyx_t_8 = NULL;
3002 bool __pyx_t_9;
3003 int __pyx_lineno = 0;
3004 const char *__pyx_filename = NULL;
3005 int __pyx_clineno = 0;
3006 __Pyx_RefNannySetupContext("RunNewSolution", 0);
3007
3008 /* "cylp/cy/CyCbcModel.pyx":22
3009 * double objectiveAtContinuous,
3010 * int numberInfeasibilitiesAtContinuous):
3011 * obj = <object> ptr # <<<<<<<<<<<<<<
3012 * return obj.newSolution(CyCbcModel().setCppSelf(model),
3013 * objectiveAtContinuous,
3014 */
3015 __pyx_t_1 = ((PyObject *)__pyx_v_ptr);
3016 __Pyx_INCREF(__pyx_t_1);
3017 __pyx_v_obj = __pyx_t_1;
3018 __pyx_t_1 = 0;
3019
3020 /* "cylp/cy/CyCbcModel.pyx":23
3021 * int numberInfeasibilitiesAtContinuous):
3022 * obj = <object> ptr
3023 * return obj.newSolution(CyCbcModel().setCppSelf(model), # <<<<<<<<<<<<<<
3024 * objectiveAtContinuous,
3025 * numberInfeasibilitiesAtContinuous)
3026 */
3027 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_newSolution); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
3028 __Pyx_GOTREF(__pyx_t_2);
3029 __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cylp_2cy_10CyCbcModel_CyCbcModel)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
3030 __Pyx_GOTREF(__pyx_t_3);
3031 __pyx_t_4 = ((struct __pyx_vtabstruct_4cylp_2cy_10CyCbcModel_CyCbcModel *)((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_t_3)->__pyx_vtab)->setCppSelf(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_t_3), __pyx_v_model); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 23, __pyx_L1_error)
3032 __Pyx_GOTREF(__pyx_t_4);
3033 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3034
3035 /* "cylp/cy/CyCbcModel.pyx":24
3036 * obj = <object> ptr
3037 * return obj.newSolution(CyCbcModel().setCppSelf(model),
3038 * objectiveAtContinuous, # <<<<<<<<<<<<<<
3039 * numberInfeasibilitiesAtContinuous)
3040 *
3041 */
3042 __pyx_t_3 = PyFloat_FromDouble(__pyx_v_objectiveAtContinuous); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 24, __pyx_L1_error)
3043 __Pyx_GOTREF(__pyx_t_3);
3044
3045 /* "cylp/cy/CyCbcModel.pyx":25
3046 * return obj.newSolution(CyCbcModel().setCppSelf(model),
3047 * objectiveAtContinuous,
3048 * numberInfeasibilitiesAtContinuous) # <<<<<<<<<<<<<<
3049 *
3050 * cdef int RunEvery1000Nodes(void* ptr, CppICbcModel* model, int numberNodes):
3051 */
3052 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numberInfeasibilitiesAtContinuous); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 25, __pyx_L1_error)
3053 __Pyx_GOTREF(__pyx_t_5);
3054 __pyx_t_6 = NULL;
3055 __pyx_t_7 = 0;
3056 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
3057 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
3058 if (likely(__pyx_t_6)) {
3059 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3060 __Pyx_INCREF(__pyx_t_6);
3061 __Pyx_INCREF(function);
3062 __Pyx_DECREF_SET(__pyx_t_2, function);
3063 __pyx_t_7 = 1;
3064 }
3065 }
3066 #if CYTHON_FAST_PYCALL
3067 if (PyFunction_Check(__pyx_t_2)) {
3068 PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_3, __pyx_t_5};
3069 __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
3070 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3071 __Pyx_GOTREF(__pyx_t_1);
3072 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3073 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3074 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3075 } else
3076 #endif
3077 #if CYTHON_FAST_PYCCALL
3078 if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
3079 PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_t_3, __pyx_t_5};
3080 __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
3081 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
3082 __Pyx_GOTREF(__pyx_t_1);
3083 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3084 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3085 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
3086 } else
3087 #endif
3088 {
3089 __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 23, __pyx_L1_error)
3090 __Pyx_GOTREF(__pyx_t_8);
3091 if (__pyx_t_6) {
3092 __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
3093 }
3094 __Pyx_GIVEREF(__pyx_t_4);
3095 PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
3096 __Pyx_GIVEREF(__pyx_t_3);
3097 PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
3098 __Pyx_GIVEREF(__pyx_t_5);
3099 PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
3100 __pyx_t_4 = 0;
3101 __pyx_t_3 = 0;
3102 __pyx_t_5 = 0;
3103 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error)
3104 __Pyx_GOTREF(__pyx_t_1);
3105 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
3106 }
3107 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3108
3109 /* "cylp/cy/CyCbcModel.pyx":23
3110 * int numberInfeasibilitiesAtContinuous):
3111 * obj = <object> ptr
3112 * return obj.newSolution(CyCbcModel().setCppSelf(model), # <<<<<<<<<<<<<<
3113 * objectiveAtContinuous,
3114 * numberInfeasibilitiesAtContinuous)
3115 */
3116 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 23, __pyx_L1_error)
3117 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3118 __pyx_r = __pyx_t_9;
3119 goto __pyx_L0;
3120
3121 /* "cylp/cy/CyCbcModel.pyx":19
3122 * CyCbcNode().setCppSelf(y))
3123 *
3124 * cdef bool RunNewSolution(void* ptr, CppICbcModel* model, # <<<<<<<<<<<<<<
3125 * double objectiveAtContinuous,
3126 * int numberInfeasibilitiesAtContinuous):
3127 */
3128
3129 /* function exit code */
3130 __pyx_L1_error:;
3131 __Pyx_XDECREF(__pyx_t_1);
3132 __Pyx_XDECREF(__pyx_t_2);
3133 __Pyx_XDECREF(__pyx_t_3);
3134 __Pyx_XDECREF(__pyx_t_4);
3135 __Pyx_XDECREF(__pyx_t_5);
3136 __Pyx_XDECREF(__pyx_t_6);
3137 __Pyx_XDECREF(__pyx_t_8);
3138 __Pyx_WriteUnraisable("cylp.cy.CyCbcModel.RunNewSolution", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
3139 __pyx_r = 0;
3140 __pyx_L0:;
3141 __Pyx_XDECREF(__pyx_v_obj);
3142 __Pyx_RefNannyFinishContext();
3143 return __pyx_r;
3144 }
3145
3146 /* "cylp/cy/CyCbcModel.pyx":27
3147 * numberInfeasibilitiesAtContinuous)
3148 *
3149 * cdef int RunEvery1000Nodes(void* ptr, CppICbcModel* model, int numberNodes): # <<<<<<<<<<<<<<
3150 * obj = <object> ptr
3151 * return obj.every1000Nodes(CyCbcModel().setCppSelf(model),
3152 */
3153
__pyx_f_4cylp_2cy_10CyCbcModel_RunEvery1000Nodes(void * __pyx_v_ptr,ICbcModel * __pyx_v_model,int __pyx_v_numberNodes)3154 static int __pyx_f_4cylp_2cy_10CyCbcModel_RunEvery1000Nodes(void *__pyx_v_ptr, ICbcModel *__pyx_v_model, int __pyx_v_numberNodes) {
3155 PyObject *__pyx_v_obj = NULL;
3156 int __pyx_r;
3157 __Pyx_RefNannyDeclarations
3158 PyObject *__pyx_t_1 = NULL;
3159 PyObject *__pyx_t_2 = NULL;
3160 PyObject *__pyx_t_3 = NULL;
3161 PyObject *__pyx_t_4 = NULL;
3162 PyObject *__pyx_t_5 = NULL;
3163 int __pyx_t_6;
3164 PyObject *__pyx_t_7 = NULL;
3165 int __pyx_lineno = 0;
3166 const char *__pyx_filename = NULL;
3167 int __pyx_clineno = 0;
3168 __Pyx_RefNannySetupContext("RunEvery1000Nodes", 0);
3169
3170 /* "cylp/cy/CyCbcModel.pyx":28
3171 *
3172 * cdef int RunEvery1000Nodes(void* ptr, CppICbcModel* model, int numberNodes):
3173 * obj = <object> ptr # <<<<<<<<<<<<<<
3174 * return obj.every1000Nodes(CyCbcModel().setCppSelf(model),
3175 * numberNodes)
3176 */
3177 __pyx_t_1 = ((PyObject *)__pyx_v_ptr);
3178 __Pyx_INCREF(__pyx_t_1);
3179 __pyx_v_obj = __pyx_t_1;
3180 __pyx_t_1 = 0;
3181
3182 /* "cylp/cy/CyCbcModel.pyx":29
3183 * cdef int RunEvery1000Nodes(void* ptr, CppICbcModel* model, int numberNodes):
3184 * obj = <object> ptr
3185 * return obj.every1000Nodes(CyCbcModel().setCppSelf(model), # <<<<<<<<<<<<<<
3186 * numberNodes)
3187 *
3188 */
3189 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_every1000Nodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
3190 __Pyx_GOTREF(__pyx_t_2);
3191 __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cylp_2cy_10CyCbcModel_CyCbcModel)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 29, __pyx_L1_error)
3192 __Pyx_GOTREF(__pyx_t_3);
3193 __pyx_t_4 = ((struct __pyx_vtabstruct_4cylp_2cy_10CyCbcModel_CyCbcModel *)((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_t_3)->__pyx_vtab)->setCppSelf(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_t_3), __pyx_v_model); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 29, __pyx_L1_error)
3194 __Pyx_GOTREF(__pyx_t_4);
3195 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3196
3197 /* "cylp/cy/CyCbcModel.pyx":30
3198 * obj = <object> ptr
3199 * return obj.every1000Nodes(CyCbcModel().setCppSelf(model),
3200 * numberNodes) # <<<<<<<<<<<<<<
3201 *
3202 * # Understandable messages to translate what branchAndBound() returns
3203 */
3204 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_numberNodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 30, __pyx_L1_error)
3205 __Pyx_GOTREF(__pyx_t_3);
3206 __pyx_t_5 = NULL;
3207 __pyx_t_6 = 0;
3208 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
3209 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
3210 if (likely(__pyx_t_5)) {
3211 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3212 __Pyx_INCREF(__pyx_t_5);
3213 __Pyx_INCREF(function);
3214 __Pyx_DECREF_SET(__pyx_t_2, function);
3215 __pyx_t_6 = 1;
3216 }
3217 }
3218 #if CYTHON_FAST_PYCALL
3219 if (PyFunction_Check(__pyx_t_2)) {
3220 PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_3};
3221 __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
3222 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3223 __Pyx_GOTREF(__pyx_t_1);
3224 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3225 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3226 } else
3227 #endif
3228 #if CYTHON_FAST_PYCCALL
3229 if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
3230 PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_3};
3231 __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
3232 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
3233 __Pyx_GOTREF(__pyx_t_1);
3234 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3235 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3236 } else
3237 #endif
3238 {
3239 __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 29, __pyx_L1_error)
3240 __Pyx_GOTREF(__pyx_t_7);
3241 if (__pyx_t_5) {
3242 __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
3243 }
3244 __Pyx_GIVEREF(__pyx_t_4);
3245 PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
3246 __Pyx_GIVEREF(__pyx_t_3);
3247 PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
3248 __pyx_t_4 = 0;
3249 __pyx_t_3 = 0;
3250 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
3251 __Pyx_GOTREF(__pyx_t_1);
3252 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3253 }
3254 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3255
3256 /* "cylp/cy/CyCbcModel.pyx":29
3257 * cdef int RunEvery1000Nodes(void* ptr, CppICbcModel* model, int numberNodes):
3258 * obj = <object> ptr
3259 * return obj.every1000Nodes(CyCbcModel().setCppSelf(model), # <<<<<<<<<<<<<<
3260 * numberNodes)
3261 *
3262 */
3263 __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 29, __pyx_L1_error)
3264 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3265 __pyx_r = __pyx_t_6;
3266 goto __pyx_L0;
3267
3268 /* "cylp/cy/CyCbcModel.pyx":27
3269 * numberInfeasibilitiesAtContinuous)
3270 *
3271 * cdef int RunEvery1000Nodes(void* ptr, CppICbcModel* model, int numberNodes): # <<<<<<<<<<<<<<
3272 * obj = <object> ptr
3273 * return obj.every1000Nodes(CyCbcModel().setCppSelf(model),
3274 */
3275
3276 /* function exit code */
3277 __pyx_L1_error:;
3278 __Pyx_XDECREF(__pyx_t_1);
3279 __Pyx_XDECREF(__pyx_t_2);
3280 __Pyx_XDECREF(__pyx_t_3);
3281 __Pyx_XDECREF(__pyx_t_4);
3282 __Pyx_XDECREF(__pyx_t_5);
3283 __Pyx_XDECREF(__pyx_t_7);
3284 __Pyx_WriteUnraisable("cylp.cy.CyCbcModel.RunEvery1000Nodes", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
3285 __pyx_r = 0;
3286 __pyx_L0:;
3287 __Pyx_XDECREF(__pyx_v_obj);
3288 __Pyx_RefNannyFinishContext();
3289 return __pyx_r;
3290 }
3291
3292 /* "cylp/cy/CyCbcModel.pyx":88
3293 * '''
3294 *
3295 * def __cinit__(self, cyLPModel=None): # <<<<<<<<<<<<<<
3296 * self.cyLPModel = cyLPModel
3297 * self.cutGenerators = []
3298 */
3299
3300 /* Python wrapper */
3301 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_1__cinit__(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)3302 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3303 PyObject *__pyx_v_cyLPModel = 0;
3304 int __pyx_lineno = 0;
3305 const char *__pyx_filename = NULL;
3306 int __pyx_clineno = 0;
3307 int __pyx_r;
3308 __Pyx_RefNannyDeclarations
3309 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
3310 {
3311 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cyLPModel,0};
3312 PyObject* values[1] = {0};
3313 values[0] = ((PyObject *)Py_None);
3314 if (unlikely(__pyx_kwds)) {
3315 Py_ssize_t kw_args;
3316 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
3317 switch (pos_args) {
3318 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3319 CYTHON_FALLTHROUGH;
3320 case 0: break;
3321 default: goto __pyx_L5_argtuple_error;
3322 }
3323 kw_args = PyDict_Size(__pyx_kwds);
3324 switch (pos_args) {
3325 case 0:
3326 if (kw_args > 0) {
3327 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cyLPModel);
3328 if (value) { values[0] = value; kw_args--; }
3329 }
3330 }
3331 if (unlikely(kw_args > 0)) {
3332 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 88, __pyx_L3_error)
3333 }
3334 } else {
3335 switch (PyTuple_GET_SIZE(__pyx_args)) {
3336 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
3337 CYTHON_FALLTHROUGH;
3338 case 0: break;
3339 default: goto __pyx_L5_argtuple_error;
3340 }
3341 }
3342 __pyx_v_cyLPModel = values[0];
3343 }
3344 goto __pyx_L4_argument_unpacking_done;
3345 __pyx_L5_argtuple_error:;
3346 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 88, __pyx_L3_error)
3347 __pyx_L3_error:;
3348 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3349 __Pyx_RefNannyFinishContext();
3350 return -1;
3351 __pyx_L4_argument_unpacking_done:;
3352 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel___cinit__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), __pyx_v_cyLPModel);
3353
3354 /* function exit code */
3355 __Pyx_RefNannyFinishContext();
3356 return __pyx_r;
3357 }
3358
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel___cinit__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_cyLPModel)3359 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel___cinit__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_cyLPModel) {
3360 int __pyx_r;
3361 __Pyx_RefNannyDeclarations
3362 PyObject *__pyx_t_1 = NULL;
3363 int __pyx_lineno = 0;
3364 const char *__pyx_filename = NULL;
3365 int __pyx_clineno = 0;
3366 __Pyx_RefNannySetupContext("__cinit__", 0);
3367
3368 /* "cylp/cy/CyCbcModel.pyx":89
3369 *
3370 * def __cinit__(self, cyLPModel=None):
3371 * self.cyLPModel = cyLPModel # <<<<<<<<<<<<<<
3372 * self.cutGenerators = []
3373 *
3374 */
3375 __Pyx_INCREF(__pyx_v_cyLPModel);
3376 __Pyx_GIVEREF(__pyx_v_cyLPModel);
3377 __Pyx_GOTREF(__pyx_v_self->cyLPModel);
3378 __Pyx_DECREF(__pyx_v_self->cyLPModel);
3379 __pyx_v_self->cyLPModel = __pyx_v_cyLPModel;
3380
3381 /* "cylp/cy/CyCbcModel.pyx":90
3382 * def __cinit__(self, cyLPModel=None):
3383 * self.cyLPModel = cyLPModel
3384 * self.cutGenerators = [] # <<<<<<<<<<<<<<
3385 *
3386 * def __dealloc__(self):
3387 */
3388 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
3389 __Pyx_GOTREF(__pyx_t_1);
3390 __Pyx_GIVEREF(__pyx_t_1);
3391 __Pyx_GOTREF(__pyx_v_self->cutGenerators);
3392 __Pyx_DECREF(__pyx_v_self->cutGenerators);
3393 __pyx_v_self->cutGenerators = __pyx_t_1;
3394 __pyx_t_1 = 0;
3395
3396 /* "cylp/cy/CyCbcModel.pyx":88
3397 * '''
3398 *
3399 * def __cinit__(self, cyLPModel=None): # <<<<<<<<<<<<<<
3400 * self.cyLPModel = cyLPModel
3401 * self.cutGenerators = []
3402 */
3403
3404 /* function exit code */
3405 __pyx_r = 0;
3406 goto __pyx_L0;
3407 __pyx_L1_error:;
3408 __Pyx_XDECREF(__pyx_t_1);
3409 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
3410 __pyx_r = -1;
3411 __pyx_L0:;
3412 __Pyx_RefNannyFinishContext();
3413 return __pyx_r;
3414 }
3415
3416 /* "cylp/cy/CyCbcModel.pyx":92
3417 * self.cutGenerators = []
3418 *
3419 * def __dealloc__(self): # <<<<<<<<<<<<<<
3420 * for generator in self.cutGenerators:
3421 * Py_DECREF(generator)
3422 */
3423
3424 /* Python wrapper */
3425 static void __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_3__dealloc__(PyObject * __pyx_v_self)3426 static void __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_3__dealloc__(PyObject *__pyx_v_self) {
3427 __Pyx_RefNannyDeclarations
3428 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
3429 __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_2__dealloc__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
3430
3431 /* function exit code */
3432 __Pyx_RefNannyFinishContext();
3433 }
3434
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_2__dealloc__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)3435 static void __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_2__dealloc__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
3436 PyObject *__pyx_v_generator = NULL;
3437 __Pyx_RefNannyDeclarations
3438 PyObject *__pyx_t_1 = NULL;
3439 Py_ssize_t __pyx_t_2;
3440 PyObject *(*__pyx_t_3)(PyObject *);
3441 PyObject *__pyx_t_4 = NULL;
3442 PyObject *__pyx_t_5 = NULL;
3443 PyObject *__pyx_t_6 = NULL;
3444 PyObject *__pyx_t_7 = NULL;
3445 int __pyx_t_8;
3446 int __pyx_lineno = 0;
3447 const char *__pyx_filename = NULL;
3448 int __pyx_clineno = 0;
3449 __Pyx_RefNannySetupContext("__dealloc__", 0);
3450
3451 /* "cylp/cy/CyCbcModel.pyx":93
3452 *
3453 * def __dealloc__(self):
3454 * for generator in self.cutGenerators: # <<<<<<<<<<<<<<
3455 * Py_DECREF(generator)
3456 *
3457 */
3458 if (likely(PyList_CheckExact(__pyx_v_self->cutGenerators)) || PyTuple_CheckExact(__pyx_v_self->cutGenerators)) {
3459 __pyx_t_1 = __pyx_v_self->cutGenerators; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
3460 __pyx_t_3 = NULL;
3461 } else {
3462 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->cutGenerators); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
3463 __Pyx_GOTREF(__pyx_t_1);
3464 __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error)
3465 }
3466 for (;;) {
3467 if (likely(!__pyx_t_3)) {
3468 if (likely(PyList_CheckExact(__pyx_t_1))) {
3469 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
3470 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3471 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 93, __pyx_L1_error)
3472 #else
3473 __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
3474 __Pyx_GOTREF(__pyx_t_4);
3475 #endif
3476 } else {
3477 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
3478 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
3479 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 93, __pyx_L1_error)
3480 #else
3481 __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error)
3482 __Pyx_GOTREF(__pyx_t_4);
3483 #endif
3484 }
3485 } else {
3486 __pyx_t_4 = __pyx_t_3(__pyx_t_1);
3487 if (unlikely(!__pyx_t_4)) {
3488 PyObject* exc_type = PyErr_Occurred();
3489 if (exc_type) {
3490 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
3491 else __PYX_ERR(0, 93, __pyx_L1_error)
3492 }
3493 break;
3494 }
3495 __Pyx_GOTREF(__pyx_t_4);
3496 }
3497 __Pyx_XDECREF_SET(__pyx_v_generator, __pyx_t_4);
3498 __pyx_t_4 = 0;
3499
3500 /* "cylp/cy/CyCbcModel.pyx":94
3501 * def __dealloc__(self):
3502 * for generator in self.cutGenerators:
3503 * Py_DECREF(generator) # <<<<<<<<<<<<<<
3504 *
3505 * try:
3506 */
3507 Py_DECREF(__pyx_v_generator);
3508
3509 /* "cylp/cy/CyCbcModel.pyx":93
3510 *
3511 * def __dealloc__(self):
3512 * for generator in self.cutGenerators: # <<<<<<<<<<<<<<
3513 * Py_DECREF(generator)
3514 *
3515 */
3516 }
3517 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3518
3519 /* "cylp/cy/CyCbcModel.pyx":96
3520 * Py_DECREF(generator)
3521 *
3522 * try: # <<<<<<<<<<<<<<
3523 * if self.CppSelf:
3524 * del self.CppSelf
3525 */
3526 {
3527 (void)__pyx_t_5; (void)__pyx_t_6; (void)__pyx_t_7; /* mark used */
3528 /*try:*/ {
3529
3530 /* "cylp/cy/CyCbcModel.pyx":97
3531 *
3532 * try:
3533 * if self.CppSelf: # <<<<<<<<<<<<<<
3534 * del self.CppSelf
3535 * except AttributeError:
3536 */
3537 __pyx_t_8 = (__pyx_v_self->CppSelf != 0);
3538 if (__pyx_t_8) {
3539
3540 /* "cylp/cy/CyCbcModel.pyx":98
3541 * try:
3542 * if self.CppSelf:
3543 * del self.CppSelf # <<<<<<<<<<<<<<
3544 * except AttributeError:
3545 * pass
3546 */
3547 delete __pyx_v_self->CppSelf;
3548
3549 /* "cylp/cy/CyCbcModel.pyx":97
3550 *
3551 * try:
3552 * if self.CppSelf: # <<<<<<<<<<<<<<
3553 * del self.CppSelf
3554 * except AttributeError:
3555 */
3556 }
3557
3558 /* "cylp/cy/CyCbcModel.pyx":96
3559 * Py_DECREF(generator)
3560 *
3561 * try: # <<<<<<<<<<<<<<
3562 * if self.CppSelf:
3563 * del self.CppSelf
3564 */
3565 }
3566 }
3567
3568 /* "cylp/cy/CyCbcModel.pyx":92
3569 * self.cutGenerators = []
3570 *
3571 * def __dealloc__(self): # <<<<<<<<<<<<<<
3572 * for generator in self.cutGenerators:
3573 * Py_DECREF(generator)
3574 */
3575
3576 /* function exit code */
3577 goto __pyx_L0;
3578 __pyx_L1_error:;
3579 __Pyx_XDECREF(__pyx_t_1);
3580 __Pyx_XDECREF(__pyx_t_4);
3581 __Pyx_WriteUnraisable("cylp.cy.CyCbcModel.CyCbcModel.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
3582 __pyx_L0:;
3583 __Pyx_XDECREF(__pyx_v_generator);
3584 __Pyx_RefNannyFinishContext();
3585 }
3586
3587 /* "cylp/cy/CyCbcModel.pyx":102
3588 * pass
3589 *
3590 * cdef setCppSelf(self, CppICbcModel* cppmodel): # <<<<<<<<<<<<<<
3591 * self.CppSelf = cppmodel
3592 * return self
3593 */
3594
__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_setCppSelf(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,ICbcModel * __pyx_v_cppmodel)3595 static PyObject *__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_setCppSelf(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, ICbcModel *__pyx_v_cppmodel) {
3596 PyObject *__pyx_r = NULL;
3597 __Pyx_RefNannyDeclarations
3598 __Pyx_RefNannySetupContext("setCppSelf", 0);
3599
3600 /* "cylp/cy/CyCbcModel.pyx":103
3601 *
3602 * cdef setCppSelf(self, CppICbcModel* cppmodel):
3603 * self.CppSelf = cppmodel # <<<<<<<<<<<<<<
3604 * return self
3605 *
3606 */
3607 __pyx_v_self->CppSelf = __pyx_v_cppmodel;
3608
3609 /* "cylp/cy/CyCbcModel.pyx":104
3610 * cdef setCppSelf(self, CppICbcModel* cppmodel):
3611 * self.CppSelf = cppmodel
3612 * return self # <<<<<<<<<<<<<<
3613 *
3614 * cdef setClpModel(self, clpmodel):
3615 */
3616 __Pyx_XDECREF(__pyx_r);
3617 __Pyx_INCREF(((PyObject *)__pyx_v_self));
3618 __pyx_r = ((PyObject *)__pyx_v_self);
3619 goto __pyx_L0;
3620
3621 /* "cylp/cy/CyCbcModel.pyx":102
3622 * pass
3623 *
3624 * cdef setCppSelf(self, CppICbcModel* cppmodel): # <<<<<<<<<<<<<<
3625 * self.CppSelf = cppmodel
3626 * return self
3627 */
3628
3629 /* function exit code */
3630 __pyx_L0:;
3631 __Pyx_XGIVEREF(__pyx_r);
3632 __Pyx_RefNannyFinishContext();
3633 return __pyx_r;
3634 }
3635
3636 /* "cylp/cy/CyCbcModel.pyx":106
3637 * return self
3638 *
3639 * cdef setClpModel(self, clpmodel): # <<<<<<<<<<<<<<
3640 * self.clpModel = clpmodel
3641 * return self
3642 */
3643
__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_setClpModel(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_clpmodel)3644 static PyObject *__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_setClpModel(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_clpmodel) {
3645 PyObject *__pyx_r = NULL;
3646 __Pyx_RefNannyDeclarations
3647 __Pyx_RefNannySetupContext("setClpModel", 0);
3648
3649 /* "cylp/cy/CyCbcModel.pyx":107
3650 *
3651 * cdef setClpModel(self, clpmodel):
3652 * self.clpModel = clpmodel # <<<<<<<<<<<<<<
3653 * return self
3654 *
3655 */
3656 __Pyx_INCREF(__pyx_v_clpmodel);
3657 __Pyx_GIVEREF(__pyx_v_clpmodel);
3658 __Pyx_GOTREF(__pyx_v_self->clpModel);
3659 __Pyx_DECREF(__pyx_v_self->clpModel);
3660 __pyx_v_self->clpModel = __pyx_v_clpmodel;
3661
3662 /* "cylp/cy/CyCbcModel.pyx":108
3663 * cdef setClpModel(self, clpmodel):
3664 * self.clpModel = clpmodel
3665 * return self # <<<<<<<<<<<<<<
3666 *
3667 * def setNodeCompare(self, nodeCompareObject):
3668 */
3669 __Pyx_XDECREF(__pyx_r);
3670 __Pyx_INCREF(((PyObject *)__pyx_v_self));
3671 __pyx_r = ((PyObject *)__pyx_v_self);
3672 goto __pyx_L0;
3673
3674 /* "cylp/cy/CyCbcModel.pyx":106
3675 * return self
3676 *
3677 * cdef setClpModel(self, clpmodel): # <<<<<<<<<<<<<<
3678 * self.clpModel = clpmodel
3679 * return self
3680 */
3681
3682 /* function exit code */
3683 __pyx_L0:;
3684 __Pyx_XGIVEREF(__pyx_r);
3685 __Pyx_RefNannyFinishContext();
3686 return __pyx_r;
3687 }
3688
3689 /* "cylp/cy/CyCbcModel.pyx":110
3690 * return self
3691 *
3692 * def setNodeCompare(self, nodeCompareObject): # <<<<<<<<<<<<<<
3693 * if not isinstance(nodeCompareObject, NodeCompareBase):
3694 * raise TypeError('setNodeCompare argument should be a ' \
3695 */
3696
3697 /* Python wrapper */
3698 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_5setNodeCompare(PyObject *__pyx_v_self, PyObject *__pyx_v_nodeCompareObject); /*proto*/
3699 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_4setNodeCompare[] = "CyCbcModel.setNodeCompare(self, nodeCompareObject)";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_5setNodeCompare(PyObject * __pyx_v_self,PyObject * __pyx_v_nodeCompareObject)3700 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_5setNodeCompare(PyObject *__pyx_v_self, PyObject *__pyx_v_nodeCompareObject) {
3701 PyObject *__pyx_r = 0;
3702 __Pyx_RefNannyDeclarations
3703 __Pyx_RefNannySetupContext("setNodeCompare (wrapper)", 0);
3704 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_4setNodeCompare(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_nodeCompareObject));
3705
3706 /* function exit code */
3707 __Pyx_RefNannyFinishContext();
3708 return __pyx_r;
3709 }
3710
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_4setNodeCompare(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_nodeCompareObject)3711 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_4setNodeCompare(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_nodeCompareObject) {
3712 PyObject *__pyx_r = NULL;
3713 __Pyx_RefNannyDeclarations
3714 PyObject *__pyx_t_1 = NULL;
3715 int __pyx_t_2;
3716 int __pyx_t_3;
3717 PyObject *__pyx_t_4 = NULL;
3718 int __pyx_lineno = 0;
3719 const char *__pyx_filename = NULL;
3720 int __pyx_clineno = 0;
3721 __Pyx_RefNannySetupContext("setNodeCompare", 0);
3722
3723 /* "cylp/cy/CyCbcModel.pyx":111
3724 *
3725 * def setNodeCompare(self, nodeCompareObject):
3726 * if not isinstance(nodeCompareObject, NodeCompareBase): # <<<<<<<<<<<<<<
3727 * raise TypeError('setNodeCompare argument should be a ' \
3728 * 'NodeCompareBase object. Got %s' %
3729 */
3730 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_NodeCompareBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
3731 __Pyx_GOTREF(__pyx_t_1);
3732 __pyx_t_2 = PyObject_IsInstance(__pyx_v_nodeCompareObject, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 111, __pyx_L1_error)
3733 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3734 __pyx_t_3 = ((!(__pyx_t_2 != 0)) != 0);
3735 if (unlikely(__pyx_t_3)) {
3736
3737 /* "cylp/cy/CyCbcModel.pyx":114
3738 * raise TypeError('setNodeCompare argument should be a ' \
3739 * 'NodeCompareBase object. Got %s' %
3740 * nodeCompareObject.__class__) # <<<<<<<<<<<<<<
3741 *
3742 * self.CppSelf.setNodeCompare(<PyObject*>nodeCompareObject,
3743 */
3744 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_nodeCompareObject, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
3745 __Pyx_GOTREF(__pyx_t_1);
3746
3747 /* "cylp/cy/CyCbcModel.pyx":113
3748 * if not isinstance(nodeCompareObject, NodeCompareBase):
3749 * raise TypeError('setNodeCompare argument should be a ' \
3750 * 'NodeCompareBase object. Got %s' % # <<<<<<<<<<<<<<
3751 * nodeCompareObject.__class__)
3752 *
3753 */
3754 __pyx_t_4 = __Pyx_PyString_FormatSafe(__pyx_kp_s_setNodeCompare_argument_should_b, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 113, __pyx_L1_error)
3755 __Pyx_GOTREF(__pyx_t_4);
3756 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3757
3758 /* "cylp/cy/CyCbcModel.pyx":112
3759 * def setNodeCompare(self, nodeCompareObject):
3760 * if not isinstance(nodeCompareObject, NodeCompareBase):
3761 * raise TypeError('setNodeCompare argument should be a ' \ # <<<<<<<<<<<<<<
3762 * 'NodeCompareBase object. Got %s' %
3763 * nodeCompareObject.__class__)
3764 */
3765 __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
3766 __Pyx_GOTREF(__pyx_t_1);
3767 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3768 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
3769 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3770 __PYX_ERR(0, 112, __pyx_L1_error)
3771
3772 /* "cylp/cy/CyCbcModel.pyx":111
3773 *
3774 * def setNodeCompare(self, nodeCompareObject):
3775 * if not isinstance(nodeCompareObject, NodeCompareBase): # <<<<<<<<<<<<<<
3776 * raise TypeError('setNodeCompare argument should be a ' \
3777 * 'NodeCompareBase object. Got %s' %
3778 */
3779 }
3780
3781 /* "cylp/cy/CyCbcModel.pyx":116
3782 * nodeCompareObject.__class__)
3783 *
3784 * self.CppSelf.setNodeCompare(<PyObject*>nodeCompareObject, # <<<<<<<<<<<<<<
3785 * RunTest, RunNewSolution, RunEvery1000Nodes)
3786 *
3787 */
3788 __pyx_v_self->CppSelf->setNodeCompare(((PyObject *)__pyx_v_nodeCompareObject), __pyx_f_4cylp_2cy_10CyCbcModel_RunTest, __pyx_f_4cylp_2cy_10CyCbcModel_RunNewSolution, __pyx_f_4cylp_2cy_10CyCbcModel_RunEvery1000Nodes);
3789
3790 /* "cylp/cy/CyCbcModel.pyx":110
3791 * return self
3792 *
3793 * def setNodeCompare(self, nodeCompareObject): # <<<<<<<<<<<<<<
3794 * if not isinstance(nodeCompareObject, NodeCompareBase):
3795 * raise TypeError('setNodeCompare argument should be a ' \
3796 */
3797
3798 /* function exit code */
3799 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3800 goto __pyx_L0;
3801 __pyx_L1_error:;
3802 __Pyx_XDECREF(__pyx_t_1);
3803 __Pyx_XDECREF(__pyx_t_4);
3804 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.setNodeCompare", __pyx_clineno, __pyx_lineno, __pyx_filename);
3805 __pyx_r = NULL;
3806 __pyx_L0:;
3807 __Pyx_XGIVEREF(__pyx_r);
3808 __Pyx_RefNannyFinishContext();
3809 return __pyx_r;
3810 }
3811
3812 /* "cylp/cy/CyCbcModel.pyx":119
3813 * RunTest, RunNewSolution, RunEvery1000Nodes)
3814 *
3815 * cpdef addCutGenerator(self, CyCglCutGenerator generator, # <<<<<<<<<<<<<<
3816 * howOften=1, name="", normal=True, atSolution=False,
3817 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
3818 */
3819
3820 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_7addCutGenerator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator * __pyx_v_generator,int __pyx_skip_dispatch,struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator * __pyx_optional_args)3821 static PyObject *__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *__pyx_v_generator, int __pyx_skip_dispatch, struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator *__pyx_optional_args) {
3822 PyObject *__pyx_v_howOften = ((PyObject *)__pyx_int_1);
3823 PyObject *__pyx_v_name = ((PyObject *)__pyx_kp_s_);
3824
3825 /* "cylp/cy/CyCbcModel.pyx":120
3826 *
3827 * cpdef addCutGenerator(self, CyCglCutGenerator generator,
3828 * howOften=1, name="", normal=True, atSolution=False, # <<<<<<<<<<<<<<
3829 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
3830 * whatDepthInSub=-1):
3831 */
3832 PyObject *__pyx_v_normal = ((PyObject *)Py_True);
3833 PyObject *__pyx_v_atSolution = ((PyObject *)Py_False);
3834
3835 /* "cylp/cy/CyCbcModel.pyx":121
3836 * cpdef addCutGenerator(self, CyCglCutGenerator generator,
3837 * howOften=1, name="", normal=True, atSolution=False,
3838 * infeasible=False, howOftenInSub=-100, whatDepth=-1, # <<<<<<<<<<<<<<
3839 * whatDepthInSub=-1):
3840 * self.cutGenerators.append(generator)
3841 */
3842 PyObject *__pyx_v_infeasible = ((PyObject *)Py_False);
3843 PyObject *__pyx_v_howOftenInSub = ((PyObject *)__pyx_int_neg_100);
3844 PyObject *__pyx_v_whatDepth = ((PyObject *)__pyx_int_neg_1);
3845 PyObject *__pyx_v_whatDepthInSub = ((PyObject *)__pyx_int_neg_1);
3846 PyObject *__pyx_r = NULL;
3847 __Pyx_RefNannyDeclarations
3848 PyObject *__pyx_t_1 = NULL;
3849 PyObject *__pyx_t_2 = NULL;
3850 PyObject *__pyx_t_3 = NULL;
3851 PyObject *__pyx_t_4 = NULL;
3852 int __pyx_t_5;
3853 PyObject *__pyx_t_6 = NULL;
3854 int __pyx_t_7;
3855 int __pyx_t_8;
3856 int __pyx_t_9;
3857 char *__pyx_t_10;
3858 int __pyx_t_11;
3859 int __pyx_t_12;
3860 int __pyx_t_13;
3861 int __pyx_t_14;
3862 int __pyx_lineno = 0;
3863 const char *__pyx_filename = NULL;
3864 int __pyx_clineno = 0;
3865 __Pyx_RefNannySetupContext("addCutGenerator", 0);
3866 if (__pyx_optional_args) {
3867 if (__pyx_optional_args->__pyx_n > 0) {
3868 __pyx_v_howOften = __pyx_optional_args->howOften;
3869 if (__pyx_optional_args->__pyx_n > 1) {
3870 __pyx_v_name = __pyx_optional_args->name;
3871 if (__pyx_optional_args->__pyx_n > 2) {
3872 __pyx_v_normal = __pyx_optional_args->normal;
3873 if (__pyx_optional_args->__pyx_n > 3) {
3874 __pyx_v_atSolution = __pyx_optional_args->atSolution;
3875 if (__pyx_optional_args->__pyx_n > 4) {
3876 __pyx_v_infeasible = __pyx_optional_args->infeasible;
3877 if (__pyx_optional_args->__pyx_n > 5) {
3878 __pyx_v_howOftenInSub = __pyx_optional_args->howOftenInSub;
3879 if (__pyx_optional_args->__pyx_n > 6) {
3880 __pyx_v_whatDepth = __pyx_optional_args->whatDepth;
3881 if (__pyx_optional_args->__pyx_n > 7) {
3882 __pyx_v_whatDepthInSub = __pyx_optional_args->whatDepthInSub;
3883 }
3884 }
3885 }
3886 }
3887 }
3888 }
3889 }
3890 }
3891 }
3892 __Pyx_INCREF(__pyx_v_name);
3893
3894 /* "cylp/cy/CyCbcModel.pyx":119
3895 * RunTest, RunNewSolution, RunEvery1000Nodes)
3896 *
3897 * cpdef addCutGenerator(self, CyCglCutGenerator generator, # <<<<<<<<<<<<<<
3898 * howOften=1, name="", normal=True, atSolution=False,
3899 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
3900 */
3901 /* Check if called by wrapper */
3902 if (unlikely(__pyx_skip_dispatch)) ;
3903 /* Check if overridden in Python */
3904 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
3905 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
3906 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
3907 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
3908 PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
3909 #endif
3910 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_addCutGenerator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
3911 __Pyx_GOTREF(__pyx_t_1);
3912 if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_7addCutGenerator)) {
3913 __Pyx_XDECREF(__pyx_r);
3914 __Pyx_INCREF(__pyx_t_1);
3915 __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
3916 __pyx_t_5 = 0;
3917 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3918 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3919 if (likely(__pyx_t_4)) {
3920 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3921 __Pyx_INCREF(__pyx_t_4);
3922 __Pyx_INCREF(function);
3923 __Pyx_DECREF_SET(__pyx_t_3, function);
3924 __pyx_t_5 = 1;
3925 }
3926 }
3927 #if CYTHON_FAST_PYCALL
3928 if (PyFunction_Check(__pyx_t_3)) {
3929 PyObject *__pyx_temp[10] = {__pyx_t_4, ((PyObject *)__pyx_v_generator), __pyx_v_howOften, __pyx_v_name, __pyx_v_normal, __pyx_v_atSolution, __pyx_v_infeasible, __pyx_v_howOftenInSub, __pyx_v_whatDepth, __pyx_v_whatDepthInSub};
3930 __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 9+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
3931 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3932 __Pyx_GOTREF(__pyx_t_2);
3933 } else
3934 #endif
3935 #if CYTHON_FAST_PYCCALL
3936 if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
3937 PyObject *__pyx_temp[10] = {__pyx_t_4, ((PyObject *)__pyx_v_generator), __pyx_v_howOften, __pyx_v_name, __pyx_v_normal, __pyx_v_atSolution, __pyx_v_infeasible, __pyx_v_howOftenInSub, __pyx_v_whatDepth, __pyx_v_whatDepthInSub};
3938 __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 9+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
3939 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3940 __Pyx_GOTREF(__pyx_t_2);
3941 } else
3942 #endif
3943 {
3944 __pyx_t_6 = PyTuple_New(9+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L1_error)
3945 __Pyx_GOTREF(__pyx_t_6);
3946 if (__pyx_t_4) {
3947 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
3948 }
3949 __Pyx_INCREF(((PyObject *)__pyx_v_generator));
3950 __Pyx_GIVEREF(((PyObject *)__pyx_v_generator));
3951 PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_generator));
3952 __Pyx_INCREF(__pyx_v_howOften);
3953 __Pyx_GIVEREF(__pyx_v_howOften);
3954 PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_howOften);
3955 __Pyx_INCREF(__pyx_v_name);
3956 __Pyx_GIVEREF(__pyx_v_name);
3957 PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_name);
3958 __Pyx_INCREF(__pyx_v_normal);
3959 __Pyx_GIVEREF(__pyx_v_normal);
3960 PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_normal);
3961 __Pyx_INCREF(__pyx_v_atSolution);
3962 __Pyx_GIVEREF(__pyx_v_atSolution);
3963 PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_atSolution);
3964 __Pyx_INCREF(__pyx_v_infeasible);
3965 __Pyx_GIVEREF(__pyx_v_infeasible);
3966 PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_5, __pyx_v_infeasible);
3967 __Pyx_INCREF(__pyx_v_howOftenInSub);
3968 __Pyx_GIVEREF(__pyx_v_howOftenInSub);
3969 PyTuple_SET_ITEM(__pyx_t_6, 6+__pyx_t_5, __pyx_v_howOftenInSub);
3970 __Pyx_INCREF(__pyx_v_whatDepth);
3971 __Pyx_GIVEREF(__pyx_v_whatDepth);
3972 PyTuple_SET_ITEM(__pyx_t_6, 7+__pyx_t_5, __pyx_v_whatDepth);
3973 __Pyx_INCREF(__pyx_v_whatDepthInSub);
3974 __Pyx_GIVEREF(__pyx_v_whatDepthInSub);
3975 PyTuple_SET_ITEM(__pyx_t_6, 8+__pyx_t_5, __pyx_v_whatDepthInSub);
3976 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
3977 __Pyx_GOTREF(__pyx_t_2);
3978 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
3979 }
3980 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3981 __pyx_r = __pyx_t_2;
3982 __pyx_t_2 = 0;
3983 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3984 goto __pyx_L0;
3985 }
3986 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
3987 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
3988 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
3989 if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) {
3990 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
3991 }
3992 #endif
3993 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3994 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
3995 }
3996 #endif
3997 }
3998
3999 /* "cylp/cy/CyCbcModel.pyx":123
4000 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
4001 * whatDepthInSub=-1):
4002 * self.cutGenerators.append(generator) # <<<<<<<<<<<<<<
4003 * Py_INCREF(generator)
4004 * if isinstance(name, str):
4005 */
4006 __pyx_t_7 = __Pyx_PyObject_Append(__pyx_v_self->cutGenerators, ((PyObject *)__pyx_v_generator)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 123, __pyx_L1_error)
4007
4008 /* "cylp/cy/CyCbcModel.pyx":124
4009 * whatDepthInSub=-1):
4010 * self.cutGenerators.append(generator)
4011 * Py_INCREF(generator) # <<<<<<<<<<<<<<
4012 * if isinstance(name, str):
4013 * # Cast strings/unicode to bytes
4014 */
4015 Py_INCREF(((PyObject *)__pyx_v_generator));
4016
4017 /* "cylp/cy/CyCbcModel.pyx":125
4018 * self.cutGenerators.append(generator)
4019 * Py_INCREF(generator)
4020 * if isinstance(name, str): # <<<<<<<<<<<<<<
4021 * # Cast strings/unicode to bytes
4022 * name = name.encode('utf-8')
4023 */
4024 __pyx_t_8 = PyString_Check(__pyx_v_name);
4025 __pyx_t_9 = (__pyx_t_8 != 0);
4026 if (__pyx_t_9) {
4027
4028 /* "cylp/cy/CyCbcModel.pyx":127
4029 * if isinstance(name, str):
4030 * # Cast strings/unicode to bytes
4031 * name = name.encode('utf-8') # <<<<<<<<<<<<<<
4032 * self.CppSelf.addCutGenerator(generator.CppSelf, howOften,
4033 * name, normal, atSolution,
4034 */
4035 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
4036 __Pyx_GOTREF(__pyx_t_2);
4037 __pyx_t_3 = NULL;
4038 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
4039 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4040 if (likely(__pyx_t_3)) {
4041 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4042 __Pyx_INCREF(__pyx_t_3);
4043 __Pyx_INCREF(function);
4044 __Pyx_DECREF_SET(__pyx_t_2, function);
4045 }
4046 }
4047 __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s_utf_8);
4048 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4049 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
4050 __Pyx_GOTREF(__pyx_t_1);
4051 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4052 __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1);
4053 __pyx_t_1 = 0;
4054
4055 /* "cylp/cy/CyCbcModel.pyx":125
4056 * self.cutGenerators.append(generator)
4057 * Py_INCREF(generator)
4058 * if isinstance(name, str): # <<<<<<<<<<<<<<
4059 * # Cast strings/unicode to bytes
4060 * name = name.encode('utf-8')
4061 */
4062 }
4063
4064 /* "cylp/cy/CyCbcModel.pyx":128
4065 * # Cast strings/unicode to bytes
4066 * name = name.encode('utf-8')
4067 * self.CppSelf.addCutGenerator(generator.CppSelf, howOften, # <<<<<<<<<<<<<<
4068 * name, normal, atSolution,
4069 * infeasible, howOftenInSub, whatDepth,
4070 */
4071 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_howOften); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 128, __pyx_L1_error)
4072
4073 /* "cylp/cy/CyCbcModel.pyx":129
4074 * name = name.encode('utf-8')
4075 * self.CppSelf.addCutGenerator(generator.CppSelf, howOften,
4076 * name, normal, atSolution, # <<<<<<<<<<<<<<
4077 * infeasible, howOftenInSub, whatDepth,
4078 * whatDepthInSub)
4079 */
4080 __pyx_t_10 = __Pyx_PyObject_AsWritableString(__pyx_v_name); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error)
4081 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_normal); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error)
4082 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_atSolution); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 129, __pyx_L1_error)
4083
4084 /* "cylp/cy/CyCbcModel.pyx":130
4085 * self.CppSelf.addCutGenerator(generator.CppSelf, howOften,
4086 * name, normal, atSolution,
4087 * infeasible, howOftenInSub, whatDepth, # <<<<<<<<<<<<<<
4088 * whatDepthInSub)
4089 *
4090 */
4091 __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_infeasible); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L1_error)
4092 __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_v_howOftenInSub); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L1_error)
4093 __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_whatDepth); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L1_error)
4094
4095 /* "cylp/cy/CyCbcModel.pyx":131
4096 * name, normal, atSolution,
4097 * infeasible, howOftenInSub, whatDepth,
4098 * whatDepthInSub) # <<<<<<<<<<<<<<
4099 *
4100 * def addPythonCutGenerator(self, pythonCutGeneratorObject,
4101 */
4102 __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_v_whatDepthInSub); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 131, __pyx_L1_error)
4103
4104 /* "cylp/cy/CyCbcModel.pyx":128
4105 * # Cast strings/unicode to bytes
4106 * name = name.encode('utf-8')
4107 * self.CppSelf.addCutGenerator(generator.CppSelf, howOften, # <<<<<<<<<<<<<<
4108 * name, normal, atSolution,
4109 * infeasible, howOftenInSub, whatDepth,
4110 */
4111 __pyx_v_self->CppSelf->addCutGenerator(__pyx_v_generator->CppSelf, __pyx_t_5, __pyx_t_10, __pyx_t_9, __pyx_t_8, __pyx_t_11, __pyx_t_12, __pyx_t_13, __pyx_t_14);
4112
4113 /* "cylp/cy/CyCbcModel.pyx":119
4114 * RunTest, RunNewSolution, RunEvery1000Nodes)
4115 *
4116 * cpdef addCutGenerator(self, CyCglCutGenerator generator, # <<<<<<<<<<<<<<
4117 * howOften=1, name="", normal=True, atSolution=False,
4118 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
4119 */
4120
4121 /* function exit code */
4122 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4123 goto __pyx_L0;
4124 __pyx_L1_error:;
4125 __Pyx_XDECREF(__pyx_t_1);
4126 __Pyx_XDECREF(__pyx_t_2);
4127 __Pyx_XDECREF(__pyx_t_3);
4128 __Pyx_XDECREF(__pyx_t_4);
4129 __Pyx_XDECREF(__pyx_t_6);
4130 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.addCutGenerator", __pyx_clineno, __pyx_lineno, __pyx_filename);
4131 __pyx_r = 0;
4132 __pyx_L0:;
4133 __Pyx_XDECREF(__pyx_v_name);
4134 __Pyx_XGIVEREF(__pyx_r);
4135 __Pyx_RefNannyFinishContext();
4136 return __pyx_r;
4137 }
4138
4139 /* Python wrapper */
4140 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_7addCutGenerator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4141 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_6addCutGenerator[] = "CyCbcModel.addCutGenerator(self, CyCglCutGenerator generator, howOften=1, name='', normal=True, atSolution=False, infeasible=False, howOftenInSub=-100, whatDepth=-1, whatDepthInSub=-1)";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_7addCutGenerator(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)4142 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_7addCutGenerator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4143 struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *__pyx_v_generator = 0;
4144 PyObject *__pyx_v_howOften = 0;
4145 PyObject *__pyx_v_name = 0;
4146 PyObject *__pyx_v_normal = 0;
4147 PyObject *__pyx_v_atSolution = 0;
4148 PyObject *__pyx_v_infeasible = 0;
4149 PyObject *__pyx_v_howOftenInSub = 0;
4150 PyObject *__pyx_v_whatDepth = 0;
4151 PyObject *__pyx_v_whatDepthInSub = 0;
4152 int __pyx_lineno = 0;
4153 const char *__pyx_filename = NULL;
4154 int __pyx_clineno = 0;
4155 PyObject *__pyx_r = 0;
4156 __Pyx_RefNannyDeclarations
4157 __Pyx_RefNannySetupContext("addCutGenerator (wrapper)", 0);
4158 {
4159 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_generator,&__pyx_n_s_howOften,&__pyx_n_s_name,&__pyx_n_s_normal,&__pyx_n_s_atSolution,&__pyx_n_s_infeasible,&__pyx_n_s_howOftenInSub,&__pyx_n_s_whatDepth,&__pyx_n_s_whatDepthInSub,0};
4160 PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
4161 values[1] = ((PyObject *)__pyx_int_1);
4162 values[2] = ((PyObject *)__pyx_kp_s_);
4163
4164 /* "cylp/cy/CyCbcModel.pyx":120
4165 *
4166 * cpdef addCutGenerator(self, CyCglCutGenerator generator,
4167 * howOften=1, name="", normal=True, atSolution=False, # <<<<<<<<<<<<<<
4168 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
4169 * whatDepthInSub=-1):
4170 */
4171 values[3] = ((PyObject *)Py_True);
4172 values[4] = ((PyObject *)Py_False);
4173
4174 /* "cylp/cy/CyCbcModel.pyx":121
4175 * cpdef addCutGenerator(self, CyCglCutGenerator generator,
4176 * howOften=1, name="", normal=True, atSolution=False,
4177 * infeasible=False, howOftenInSub=-100, whatDepth=-1, # <<<<<<<<<<<<<<
4178 * whatDepthInSub=-1):
4179 * self.cutGenerators.append(generator)
4180 */
4181 values[5] = ((PyObject *)Py_False);
4182 values[6] = ((PyObject *)__pyx_int_neg_100);
4183 values[7] = ((PyObject *)__pyx_int_neg_1);
4184 values[8] = ((PyObject *)__pyx_int_neg_1);
4185 if (unlikely(__pyx_kwds)) {
4186 Py_ssize_t kw_args;
4187 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4188 switch (pos_args) {
4189 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4190 CYTHON_FALLTHROUGH;
4191 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4192 CYTHON_FALLTHROUGH;
4193 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4194 CYTHON_FALLTHROUGH;
4195 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4196 CYTHON_FALLTHROUGH;
4197 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4198 CYTHON_FALLTHROUGH;
4199 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4200 CYTHON_FALLTHROUGH;
4201 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4202 CYTHON_FALLTHROUGH;
4203 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4204 CYTHON_FALLTHROUGH;
4205 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4206 CYTHON_FALLTHROUGH;
4207 case 0: break;
4208 default: goto __pyx_L5_argtuple_error;
4209 }
4210 kw_args = PyDict_Size(__pyx_kwds);
4211 switch (pos_args) {
4212 case 0:
4213 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_generator)) != 0)) kw_args--;
4214 else goto __pyx_L5_argtuple_error;
4215 CYTHON_FALLTHROUGH;
4216 case 1:
4217 if (kw_args > 0) {
4218 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_howOften);
4219 if (value) { values[1] = value; kw_args--; }
4220 }
4221 CYTHON_FALLTHROUGH;
4222 case 2:
4223 if (kw_args > 0) {
4224 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
4225 if (value) { values[2] = value; kw_args--; }
4226 }
4227 CYTHON_FALLTHROUGH;
4228 case 3:
4229 if (kw_args > 0) {
4230 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal);
4231 if (value) { values[3] = value; kw_args--; }
4232 }
4233 CYTHON_FALLTHROUGH;
4234 case 4:
4235 if (kw_args > 0) {
4236 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_atSolution);
4237 if (value) { values[4] = value; kw_args--; }
4238 }
4239 CYTHON_FALLTHROUGH;
4240 case 5:
4241 if (kw_args > 0) {
4242 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_infeasible);
4243 if (value) { values[5] = value; kw_args--; }
4244 }
4245 CYTHON_FALLTHROUGH;
4246 case 6:
4247 if (kw_args > 0) {
4248 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_howOftenInSub);
4249 if (value) { values[6] = value; kw_args--; }
4250 }
4251 CYTHON_FALLTHROUGH;
4252 case 7:
4253 if (kw_args > 0) {
4254 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_whatDepth);
4255 if (value) { values[7] = value; kw_args--; }
4256 }
4257 CYTHON_FALLTHROUGH;
4258 case 8:
4259 if (kw_args > 0) {
4260 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_whatDepthInSub);
4261 if (value) { values[8] = value; kw_args--; }
4262 }
4263 }
4264 if (unlikely(kw_args > 0)) {
4265 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addCutGenerator") < 0)) __PYX_ERR(0, 119, __pyx_L3_error)
4266 }
4267 } else {
4268 switch (PyTuple_GET_SIZE(__pyx_args)) {
4269 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4270 CYTHON_FALLTHROUGH;
4271 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4272 CYTHON_FALLTHROUGH;
4273 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4274 CYTHON_FALLTHROUGH;
4275 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4276 CYTHON_FALLTHROUGH;
4277 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4278 CYTHON_FALLTHROUGH;
4279 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4280 CYTHON_FALLTHROUGH;
4281 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4282 CYTHON_FALLTHROUGH;
4283 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4284 CYTHON_FALLTHROUGH;
4285 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4286 break;
4287 default: goto __pyx_L5_argtuple_error;
4288 }
4289 }
4290 __pyx_v_generator = ((struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *)values[0]);
4291 __pyx_v_howOften = values[1];
4292 __pyx_v_name = values[2];
4293 __pyx_v_normal = values[3];
4294 __pyx_v_atSolution = values[4];
4295 __pyx_v_infeasible = values[5];
4296 __pyx_v_howOftenInSub = values[6];
4297 __pyx_v_whatDepth = values[7];
4298 __pyx_v_whatDepthInSub = values[8];
4299 }
4300 goto __pyx_L4_argument_unpacking_done;
4301 __pyx_L5_argtuple_error:;
4302 __Pyx_RaiseArgtupleInvalid("addCutGenerator", 0, 1, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 119, __pyx_L3_error)
4303 __pyx_L3_error:;
4304 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.addCutGenerator", __pyx_clineno, __pyx_lineno, __pyx_filename);
4305 __Pyx_RefNannyFinishContext();
4306 return NULL;
4307 __pyx_L4_argument_unpacking_done:;
4308 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_generator), __pyx_ptype_4cylp_2cy_5CyCgl_CyCglCutGenerator, 1, "generator", 0))) __PYX_ERR(0, 119, __pyx_L1_error)
4309 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6addCutGenerator(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), __pyx_v_generator, __pyx_v_howOften, __pyx_v_name, __pyx_v_normal, __pyx_v_atSolution, __pyx_v_infeasible, __pyx_v_howOftenInSub, __pyx_v_whatDepth, __pyx_v_whatDepthInSub);
4310
4311 /* "cylp/cy/CyCbcModel.pyx":119
4312 * RunTest, RunNewSolution, RunEvery1000Nodes)
4313 *
4314 * cpdef addCutGenerator(self, CyCglCutGenerator generator, # <<<<<<<<<<<<<<
4315 * howOften=1, name="", normal=True, atSolution=False,
4316 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
4317 */
4318
4319 /* function exit code */
4320 goto __pyx_L0;
4321 __pyx_L1_error:;
4322 __pyx_r = NULL;
4323 __pyx_L0:;
4324 __Pyx_RefNannyFinishContext();
4325 return __pyx_r;
4326 }
4327
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6addCutGenerator(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator * __pyx_v_generator,PyObject * __pyx_v_howOften,PyObject * __pyx_v_name,PyObject * __pyx_v_normal,PyObject * __pyx_v_atSolution,PyObject * __pyx_v_infeasible,PyObject * __pyx_v_howOftenInSub,PyObject * __pyx_v_whatDepth,PyObject * __pyx_v_whatDepthInSub)4328 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6addCutGenerator(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *__pyx_v_generator, PyObject *__pyx_v_howOften, PyObject *__pyx_v_name, PyObject *__pyx_v_normal, PyObject *__pyx_v_atSolution, PyObject *__pyx_v_infeasible, PyObject *__pyx_v_howOftenInSub, PyObject *__pyx_v_whatDepth, PyObject *__pyx_v_whatDepthInSub) {
4329 PyObject *__pyx_r = NULL;
4330 __Pyx_RefNannyDeclarations
4331 PyObject *__pyx_t_1 = NULL;
4332 struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator __pyx_t_2;
4333 int __pyx_lineno = 0;
4334 const char *__pyx_filename = NULL;
4335 int __pyx_clineno = 0;
4336 __Pyx_RefNannySetupContext("addCutGenerator", 0);
4337 __Pyx_XDECREF(__pyx_r);
4338 __pyx_t_2.__pyx_n = 8;
4339 __pyx_t_2.howOften = __pyx_v_howOften;
4340 __pyx_t_2.name = __pyx_v_name;
4341 __pyx_t_2.normal = __pyx_v_normal;
4342 __pyx_t_2.atSolution = __pyx_v_atSolution;
4343 __pyx_t_2.infeasible = __pyx_v_infeasible;
4344 __pyx_t_2.howOftenInSub = __pyx_v_howOftenInSub;
4345 __pyx_t_2.whatDepth = __pyx_v_whatDepth;
4346 __pyx_t_2.whatDepthInSub = __pyx_v_whatDepthInSub;
4347 __pyx_t_1 = __pyx_vtabptr_4cylp_2cy_10CyCbcModel_CyCbcModel->addCutGenerator(__pyx_v_self, __pyx_v_generator, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
4348 __Pyx_GOTREF(__pyx_t_1);
4349 __pyx_r = __pyx_t_1;
4350 __pyx_t_1 = 0;
4351 goto __pyx_L0;
4352
4353 /* function exit code */
4354 __pyx_L1_error:;
4355 __Pyx_XDECREF(__pyx_t_1);
4356 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.addCutGenerator", __pyx_clineno, __pyx_lineno, __pyx_filename);
4357 __pyx_r = NULL;
4358 __pyx_L0:;
4359 __Pyx_XGIVEREF(__pyx_r);
4360 __Pyx_RefNannyFinishContext();
4361 return __pyx_r;
4362 }
4363
4364 /* "cylp/cy/CyCbcModel.pyx":133
4365 * whatDepthInSub)
4366 *
4367 * def addPythonCutGenerator(self, pythonCutGeneratorObject, # <<<<<<<<<<<<<<
4368 * howOften=1, name="", normal=True, atSolution=False,
4369 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
4370 */
4371
4372 /* Python wrapper */
4373 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_9addPythonCutGenerator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4374 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_8addPythonCutGenerator[] = "CyCbcModel.addPythonCutGenerator(self, pythonCutGeneratorObject, howOften=1, name='', normal=True, atSolution=False, infeasible=False, howOftenInSub=-100, whatDepth=-1, whatDepthInSub=-1)";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_9addPythonCutGenerator(PyObject * __pyx_v_self,PyObject * __pyx_args,PyObject * __pyx_kwds)4375 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_9addPythonCutGenerator(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
4376 PyObject *__pyx_v_pythonCutGeneratorObject = 0;
4377 PyObject *__pyx_v_howOften = 0;
4378 PyObject *__pyx_v_name = 0;
4379 PyObject *__pyx_v_normal = 0;
4380 PyObject *__pyx_v_atSolution = 0;
4381 PyObject *__pyx_v_infeasible = 0;
4382 PyObject *__pyx_v_howOftenInSub = 0;
4383 PyObject *__pyx_v_whatDepth = 0;
4384 PyObject *__pyx_v_whatDepthInSub = 0;
4385 int __pyx_lineno = 0;
4386 const char *__pyx_filename = NULL;
4387 int __pyx_clineno = 0;
4388 PyObject *__pyx_r = 0;
4389 __Pyx_RefNannyDeclarations
4390 __Pyx_RefNannySetupContext("addPythonCutGenerator (wrapper)", 0);
4391 {
4392 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pythonCutGeneratorObject,&__pyx_n_s_howOften,&__pyx_n_s_name,&__pyx_n_s_normal,&__pyx_n_s_atSolution,&__pyx_n_s_infeasible,&__pyx_n_s_howOftenInSub,&__pyx_n_s_whatDepth,&__pyx_n_s_whatDepthInSub,0};
4393 PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
4394 values[1] = ((PyObject *)__pyx_int_1);
4395 values[2] = ((PyObject *)__pyx_kp_s_);
4396
4397 /* "cylp/cy/CyCbcModel.pyx":134
4398 *
4399 * def addPythonCutGenerator(self, pythonCutGeneratorObject,
4400 * howOften=1, name="", normal=True, atSolution=False, # <<<<<<<<<<<<<<
4401 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
4402 * whatDepthInSub=-1):
4403 */
4404 values[3] = ((PyObject *)Py_True);
4405 values[4] = ((PyObject *)Py_False);
4406
4407 /* "cylp/cy/CyCbcModel.pyx":135
4408 * def addPythonCutGenerator(self, pythonCutGeneratorObject,
4409 * howOften=1, name="", normal=True, atSolution=False,
4410 * infeasible=False, howOftenInSub=-100, whatDepth=-1, # <<<<<<<<<<<<<<
4411 * whatDepthInSub=-1):
4412 * cdef CyCutGeneratorPythonBase generator = \
4413 */
4414 values[5] = ((PyObject *)Py_False);
4415 values[6] = ((PyObject *)__pyx_int_neg_100);
4416 values[7] = ((PyObject *)__pyx_int_neg_1);
4417 values[8] = ((PyObject *)__pyx_int_neg_1);
4418 if (unlikely(__pyx_kwds)) {
4419 Py_ssize_t kw_args;
4420 const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
4421 switch (pos_args) {
4422 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4423 CYTHON_FALLTHROUGH;
4424 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4425 CYTHON_FALLTHROUGH;
4426 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4427 CYTHON_FALLTHROUGH;
4428 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4429 CYTHON_FALLTHROUGH;
4430 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4431 CYTHON_FALLTHROUGH;
4432 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4433 CYTHON_FALLTHROUGH;
4434 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4435 CYTHON_FALLTHROUGH;
4436 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4437 CYTHON_FALLTHROUGH;
4438 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4439 CYTHON_FALLTHROUGH;
4440 case 0: break;
4441 default: goto __pyx_L5_argtuple_error;
4442 }
4443 kw_args = PyDict_Size(__pyx_kwds);
4444 switch (pos_args) {
4445 case 0:
4446 if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pythonCutGeneratorObject)) != 0)) kw_args--;
4447 else goto __pyx_L5_argtuple_error;
4448 CYTHON_FALLTHROUGH;
4449 case 1:
4450 if (kw_args > 0) {
4451 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_howOften);
4452 if (value) { values[1] = value; kw_args--; }
4453 }
4454 CYTHON_FALLTHROUGH;
4455 case 2:
4456 if (kw_args > 0) {
4457 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
4458 if (value) { values[2] = value; kw_args--; }
4459 }
4460 CYTHON_FALLTHROUGH;
4461 case 3:
4462 if (kw_args > 0) {
4463 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal);
4464 if (value) { values[3] = value; kw_args--; }
4465 }
4466 CYTHON_FALLTHROUGH;
4467 case 4:
4468 if (kw_args > 0) {
4469 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_atSolution);
4470 if (value) { values[4] = value; kw_args--; }
4471 }
4472 CYTHON_FALLTHROUGH;
4473 case 5:
4474 if (kw_args > 0) {
4475 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_infeasible);
4476 if (value) { values[5] = value; kw_args--; }
4477 }
4478 CYTHON_FALLTHROUGH;
4479 case 6:
4480 if (kw_args > 0) {
4481 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_howOftenInSub);
4482 if (value) { values[6] = value; kw_args--; }
4483 }
4484 CYTHON_FALLTHROUGH;
4485 case 7:
4486 if (kw_args > 0) {
4487 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_whatDepth);
4488 if (value) { values[7] = value; kw_args--; }
4489 }
4490 CYTHON_FALLTHROUGH;
4491 case 8:
4492 if (kw_args > 0) {
4493 PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_whatDepthInSub);
4494 if (value) { values[8] = value; kw_args--; }
4495 }
4496 }
4497 if (unlikely(kw_args > 0)) {
4498 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addPythonCutGenerator") < 0)) __PYX_ERR(0, 133, __pyx_L3_error)
4499 }
4500 } else {
4501 switch (PyTuple_GET_SIZE(__pyx_args)) {
4502 case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
4503 CYTHON_FALLTHROUGH;
4504 case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
4505 CYTHON_FALLTHROUGH;
4506 case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
4507 CYTHON_FALLTHROUGH;
4508 case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
4509 CYTHON_FALLTHROUGH;
4510 case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
4511 CYTHON_FALLTHROUGH;
4512 case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
4513 CYTHON_FALLTHROUGH;
4514 case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
4515 CYTHON_FALLTHROUGH;
4516 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
4517 CYTHON_FALLTHROUGH;
4518 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
4519 break;
4520 default: goto __pyx_L5_argtuple_error;
4521 }
4522 }
4523 __pyx_v_pythonCutGeneratorObject = values[0];
4524 __pyx_v_howOften = values[1];
4525 __pyx_v_name = values[2];
4526 __pyx_v_normal = values[3];
4527 __pyx_v_atSolution = values[4];
4528 __pyx_v_infeasible = values[5];
4529 __pyx_v_howOftenInSub = values[6];
4530 __pyx_v_whatDepth = values[7];
4531 __pyx_v_whatDepthInSub = values[8];
4532 }
4533 goto __pyx_L4_argument_unpacking_done;
4534 __pyx_L5_argtuple_error:;
4535 __Pyx_RaiseArgtupleInvalid("addPythonCutGenerator", 0, 1, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 133, __pyx_L3_error)
4536 __pyx_L3_error:;
4537 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.addPythonCutGenerator", __pyx_clineno, __pyx_lineno, __pyx_filename);
4538 __Pyx_RefNannyFinishContext();
4539 return NULL;
4540 __pyx_L4_argument_unpacking_done:;
4541 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8addPythonCutGenerator(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), __pyx_v_pythonCutGeneratorObject, __pyx_v_howOften, __pyx_v_name, __pyx_v_normal, __pyx_v_atSolution, __pyx_v_infeasible, __pyx_v_howOftenInSub, __pyx_v_whatDepth, __pyx_v_whatDepthInSub);
4542
4543 /* "cylp/cy/CyCbcModel.pyx":133
4544 * whatDepthInSub)
4545 *
4546 * def addPythonCutGenerator(self, pythonCutGeneratorObject, # <<<<<<<<<<<<<<
4547 * howOften=1, name="", normal=True, atSolution=False,
4548 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
4549 */
4550
4551 /* function exit code */
4552 __Pyx_RefNannyFinishContext();
4553 return __pyx_r;
4554 }
4555
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8addPythonCutGenerator(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_pythonCutGeneratorObject,PyObject * __pyx_v_howOften,PyObject * __pyx_v_name,PyObject * __pyx_v_normal,PyObject * __pyx_v_atSolution,PyObject * __pyx_v_infeasible,PyObject * __pyx_v_howOftenInSub,PyObject * __pyx_v_whatDepth,PyObject * __pyx_v_whatDepthInSub)4556 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8addPythonCutGenerator(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_pythonCutGeneratorObject, PyObject *__pyx_v_howOften, PyObject *__pyx_v_name, PyObject *__pyx_v_normal, PyObject *__pyx_v_atSolution, PyObject *__pyx_v_infeasible, PyObject *__pyx_v_howOftenInSub, PyObject *__pyx_v_whatDepth, PyObject *__pyx_v_whatDepthInSub) {
4557 struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase *__pyx_v_generator = 0;
4558 PyObject *__pyx_r = NULL;
4559 __Pyx_RefNannyDeclarations
4560 PyObject *__pyx_t_1 = NULL;
4561 int __pyx_t_2;
4562 char *__pyx_t_3;
4563 int __pyx_t_4;
4564 int __pyx_t_5;
4565 int __pyx_t_6;
4566 int __pyx_t_7;
4567 int __pyx_t_8;
4568 int __pyx_t_9;
4569 int __pyx_lineno = 0;
4570 const char *__pyx_filename = NULL;
4571 int __pyx_clineno = 0;
4572 __Pyx_RefNannySetupContext("addPythonCutGenerator", 0);
4573
4574 /* "cylp/cy/CyCbcModel.pyx":138
4575 * whatDepthInSub=-1):
4576 * cdef CyCutGeneratorPythonBase generator = \
4577 * CyCutGeneratorPythonBase(pythonCutGeneratorObject) # <<<<<<<<<<<<<<
4578 * generator.cyLPModel = self.cyLPModel
4579 * self.CppSelf.addCutGenerator(<CppCglCutGenerator*>generator.CppSelf,
4580 */
4581 __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase), __pyx_v_pythonCutGeneratorObject); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
4582 __Pyx_GOTREF(__pyx_t_1);
4583 __pyx_v_generator = ((struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase *)__pyx_t_1);
4584 __pyx_t_1 = 0;
4585
4586 /* "cylp/cy/CyCbcModel.pyx":139
4587 * cdef CyCutGeneratorPythonBase generator = \
4588 * CyCutGeneratorPythonBase(pythonCutGeneratorObject)
4589 * generator.cyLPModel = self.cyLPModel # <<<<<<<<<<<<<<
4590 * self.CppSelf.addCutGenerator(<CppCglCutGenerator*>generator.CppSelf,
4591 * howOften, name, normal, atSolution,
4592 */
4593 __pyx_t_1 = __pyx_v_self->cyLPModel;
4594 __Pyx_INCREF(__pyx_t_1);
4595 __Pyx_GIVEREF(__pyx_t_1);
4596 __Pyx_GOTREF(__pyx_v_generator->cyLPModel);
4597 __Pyx_DECREF(__pyx_v_generator->cyLPModel);
4598 __pyx_v_generator->cyLPModel = __pyx_t_1;
4599 __pyx_t_1 = 0;
4600
4601 /* "cylp/cy/CyCbcModel.pyx":141
4602 * generator.cyLPModel = self.cyLPModel
4603 * self.CppSelf.addCutGenerator(<CppCglCutGenerator*>generator.CppSelf,
4604 * howOften, name, normal, atSolution, # <<<<<<<<<<<<<<
4605 * infeasible, howOftenInSub, whatDepth,
4606 * whatDepthInSub)
4607 */
4608 __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_howOften); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
4609 __pyx_t_3 = __Pyx_PyObject_AsWritableString(__pyx_v_name); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
4610 __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_normal); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
4611 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_atSolution); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
4612
4613 /* "cylp/cy/CyCbcModel.pyx":142
4614 * self.CppSelf.addCutGenerator(<CppCglCutGenerator*>generator.CppSelf,
4615 * howOften, name, normal, atSolution,
4616 * infeasible, howOftenInSub, whatDepth, # <<<<<<<<<<<<<<
4617 * whatDepthInSub)
4618 *
4619 */
4620 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_infeasible); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L1_error)
4621 __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_v_howOftenInSub); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L1_error)
4622 __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_whatDepth); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L1_error)
4623
4624 /* "cylp/cy/CyCbcModel.pyx":143
4625 * howOften, name, normal, atSolution,
4626 * infeasible, howOftenInSub, whatDepth,
4627 * whatDepthInSub) # <<<<<<<<<<<<<<
4628 *
4629 * def solve(self):
4630 */
4631 __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_whatDepthInSub); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 143, __pyx_L1_error)
4632
4633 /* "cylp/cy/CyCbcModel.pyx":140
4634 * CyCutGeneratorPythonBase(pythonCutGeneratorObject)
4635 * generator.cyLPModel = self.cyLPModel
4636 * self.CppSelf.addCutGenerator(<CppCglCutGenerator*>generator.CppSelf, # <<<<<<<<<<<<<<
4637 * howOften, name, normal, atSolution,
4638 * infeasible, howOftenInSub, whatDepth,
4639 */
4640 __pyx_v_self->CppSelf->addCutGenerator(((CglCutGenerator *)__pyx_v_generator->__pyx_base.CppSelf), __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9);
4641
4642 /* "cylp/cy/CyCbcModel.pyx":133
4643 * whatDepthInSub)
4644 *
4645 * def addPythonCutGenerator(self, pythonCutGeneratorObject, # <<<<<<<<<<<<<<
4646 * howOften=1, name="", normal=True, atSolution=False,
4647 * infeasible=False, howOftenInSub=-100, whatDepth=-1,
4648 */
4649
4650 /* function exit code */
4651 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4652 goto __pyx_L0;
4653 __pyx_L1_error:;
4654 __Pyx_XDECREF(__pyx_t_1);
4655 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.addPythonCutGenerator", __pyx_clineno, __pyx_lineno, __pyx_filename);
4656 __pyx_r = NULL;
4657 __pyx_L0:;
4658 __Pyx_XDECREF((PyObject *)__pyx_v_generator);
4659 __Pyx_XGIVEREF(__pyx_r);
4660 __Pyx_RefNannyFinishContext();
4661 return __pyx_r;
4662 }
4663
4664 /* "cylp/cy/CyCbcModel.pyx":145
4665 * whatDepthInSub)
4666 *
4667 * def solve(self): # <<<<<<<<<<<<<<
4668 * '''
4669 * Call CbcMain. Solve the problem using the same parameters used by CbcSolver.
4670 */
4671
4672 /* Python wrapper */
4673 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_11solve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4674 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_10solve[] = "CyCbcModel.solve(self)\n\n Call CbcMain. Solve the problem using the same parameters used by CbcSolver.\n Equivalent to solving the model from the command line using cbc's binary.\n ";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_11solve(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)4675 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_11solve(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4676 PyObject *__pyx_r = 0;
4677 __Pyx_RefNannyDeclarations
4678 __Pyx_RefNannySetupContext("solve (wrapper)", 0);
4679 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_10solve(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
4680
4681 /* function exit code */
4682 __Pyx_RefNannyFinishContext();
4683 return __pyx_r;
4684 }
4685
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_10solve(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)4686 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_10solve(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
4687 PyObject *__pyx_r = NULL;
4688 __Pyx_RefNannyDeclarations
4689 PyObject *__pyx_t_1 = NULL;
4690 int __pyx_lineno = 0;
4691 const char *__pyx_filename = NULL;
4692 int __pyx_clineno = 0;
4693 __Pyx_RefNannySetupContext("solve", 0);
4694
4695 /* "cylp/cy/CyCbcModel.pyx":150
4696 * Equivalent to solving the model from the command line using cbc's binary.
4697 * '''
4698 * return self.CppSelf.cbcMain() # <<<<<<<<<<<<<<
4699 *
4700 * property status:
4701 */
4702 __Pyx_XDECREF(__pyx_r);
4703 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->cbcMain()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
4704 __Pyx_GOTREF(__pyx_t_1);
4705 __pyx_r = __pyx_t_1;
4706 __pyx_t_1 = 0;
4707 goto __pyx_L0;
4708
4709 /* "cylp/cy/CyCbcModel.pyx":145
4710 * whatDepthInSub)
4711 *
4712 * def solve(self): # <<<<<<<<<<<<<<
4713 * '''
4714 * Call CbcMain. Solve the problem using the same parameters used by CbcSolver.
4715 */
4716
4717 /* function exit code */
4718 __pyx_L1_error:;
4719 __Pyx_XDECREF(__pyx_t_1);
4720 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.solve", __pyx_clineno, __pyx_lineno, __pyx_filename);
4721 __pyx_r = NULL;
4722 __pyx_L0:;
4723 __Pyx_XGIVEREF(__pyx_r);
4724 __Pyx_RefNannyFinishContext();
4725 return __pyx_r;
4726 }
4727
4728 /* "cylp/cy/CyCbcModel.pyx":153
4729 *
4730 * property status:
4731 * def __get__(self): # <<<<<<<<<<<<<<
4732 * # secondaryStatus() should be used instead of status() (??)
4733 * #if self.isRelaxationInfeasible():
4734 */
4735
4736 /* Python wrapper */
4737 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status_1__get__(PyObject * __pyx_v_self)4738 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status_1__get__(PyObject *__pyx_v_self) {
4739 PyObject *__pyx_r = 0;
4740 __Pyx_RefNannyDeclarations
4741 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4742 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
4743
4744 /* function exit code */
4745 __Pyx_RefNannyFinishContext();
4746 return __pyx_r;
4747 }
4748
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)4749 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
4750 PyObject *__pyx_r = NULL;
4751 __Pyx_RefNannyDeclarations
4752 PyObject *__pyx_t_1 = NULL;
4753 int __pyx_t_2;
4754 PyObject *__pyx_t_3 = NULL;
4755 int __pyx_lineno = 0;
4756 const char *__pyx_filename = NULL;
4757 int __pyx_clineno = 0;
4758 __Pyx_RefNannySetupContext("__get__", 0);
4759
4760 /* "cylp/cy/CyCbcModel.pyx":160
4761 * # return 'relaxation abondoned'
4762 * #return problemStatus[self.CppSelf.status()]
4763 * return problemStatus[self.CppSelf.secondaryStatus()] # <<<<<<<<<<<<<<
4764 *
4765 * property logLevel:
4766 */
4767 __Pyx_XDECREF(__pyx_r);
4768 __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_problemStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error)
4769 __Pyx_GOTREF(__pyx_t_1);
4770 __pyx_t_2 = __pyx_v_self->CppSelf->secondaryStatus();
4771 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error)
4772 __Pyx_GOTREF(__pyx_t_3);
4773 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4774 __pyx_r = __pyx_t_3;
4775 __pyx_t_3 = 0;
4776 goto __pyx_L0;
4777
4778 /* "cylp/cy/CyCbcModel.pyx":153
4779 *
4780 * property status:
4781 * def __get__(self): # <<<<<<<<<<<<<<
4782 * # secondaryStatus() should be used instead of status() (??)
4783 * #if self.isRelaxationInfeasible():
4784 */
4785
4786 /* function exit code */
4787 __pyx_L1_error:;
4788 __Pyx_XDECREF(__pyx_t_1);
4789 __Pyx_XDECREF(__pyx_t_3);
4790 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4791 __pyx_r = NULL;
4792 __pyx_L0:;
4793 __Pyx_XGIVEREF(__pyx_r);
4794 __Pyx_RefNannyFinishContext();
4795 return __pyx_r;
4796 }
4797
4798 /* "cylp/cy/CyCbcModel.pyx":163
4799 *
4800 * property logLevel:
4801 * def __get__(self): # <<<<<<<<<<<<<<
4802 * return self.CppSelf.logLevel()
4803 *
4804 */
4805
4806 /* Python wrapper */
4807 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_1__get__(PyObject * __pyx_v_self)4808 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_1__get__(PyObject *__pyx_v_self) {
4809 PyObject *__pyx_r = 0;
4810 __Pyx_RefNannyDeclarations
4811 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
4812 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
4813
4814 /* function exit code */
4815 __Pyx_RefNannyFinishContext();
4816 return __pyx_r;
4817 }
4818
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)4819 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
4820 PyObject *__pyx_r = NULL;
4821 __Pyx_RefNannyDeclarations
4822 PyObject *__pyx_t_1 = NULL;
4823 int __pyx_lineno = 0;
4824 const char *__pyx_filename = NULL;
4825 int __pyx_clineno = 0;
4826 __Pyx_RefNannySetupContext("__get__", 0);
4827
4828 /* "cylp/cy/CyCbcModel.pyx":164
4829 * property logLevel:
4830 * def __get__(self):
4831 * return self.CppSelf.logLevel() # <<<<<<<<<<<<<<
4832 *
4833 * def __set__(self, value):
4834 */
4835 __Pyx_XDECREF(__pyx_r);
4836 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->logLevel()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
4837 __Pyx_GOTREF(__pyx_t_1);
4838 __pyx_r = __pyx_t_1;
4839 __pyx_t_1 = 0;
4840 goto __pyx_L0;
4841
4842 /* "cylp/cy/CyCbcModel.pyx":163
4843 *
4844 * property logLevel:
4845 * def __get__(self): # <<<<<<<<<<<<<<
4846 * return self.CppSelf.logLevel()
4847 *
4848 */
4849
4850 /* function exit code */
4851 __pyx_L1_error:;
4852 __Pyx_XDECREF(__pyx_t_1);
4853 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.logLevel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4854 __pyx_r = NULL;
4855 __pyx_L0:;
4856 __Pyx_XGIVEREF(__pyx_r);
4857 __Pyx_RefNannyFinishContext();
4858 return __pyx_r;
4859 }
4860
4861 /* "cylp/cy/CyCbcModel.pyx":166
4862 * return self.CppSelf.logLevel()
4863 *
4864 * def __set__(self, value): # <<<<<<<<<<<<<<
4865 * self.CppSelf.setLogLevel(value)
4866 *
4867 */
4868
4869 /* Python wrapper */
4870 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)4871 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
4872 int __pyx_r;
4873 __Pyx_RefNannyDeclarations
4874 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
4875 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_value));
4876
4877 /* function exit code */
4878 __Pyx_RefNannyFinishContext();
4879 return __pyx_r;
4880 }
4881
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_value)4882 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value) {
4883 int __pyx_r;
4884 __Pyx_RefNannyDeclarations
4885 int __pyx_t_1;
4886 int __pyx_lineno = 0;
4887 const char *__pyx_filename = NULL;
4888 int __pyx_clineno = 0;
4889 __Pyx_RefNannySetupContext("__set__", 0);
4890
4891 /* "cylp/cy/CyCbcModel.pyx":167
4892 *
4893 * def __set__(self, value):
4894 * self.CppSelf.setLogLevel(value) # <<<<<<<<<<<<<<
4895 *
4896 * def isRelaxationInfeasible(self):
4897 */
4898 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error)
4899 __pyx_v_self->CppSelf->setLogLevel(__pyx_t_1);
4900
4901 /* "cylp/cy/CyCbcModel.pyx":166
4902 * return self.CppSelf.logLevel()
4903 *
4904 * def __set__(self, value): # <<<<<<<<<<<<<<
4905 * self.CppSelf.setLogLevel(value)
4906 *
4907 */
4908
4909 /* function exit code */
4910 __pyx_r = 0;
4911 goto __pyx_L0;
4912 __pyx_L1_error:;
4913 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.logLevel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
4914 __pyx_r = -1;
4915 __pyx_L0:;
4916 __Pyx_RefNannyFinishContext();
4917 return __pyx_r;
4918 }
4919
4920 /* "cylp/cy/CyCbcModel.pyx":169
4921 * self.CppSelf.setLogLevel(value)
4922 *
4923 * def isRelaxationInfeasible(self): # <<<<<<<<<<<<<<
4924 * return self.CppSelf.isInitialSolveProvenPrimalInfeasible()
4925 *
4926 */
4927
4928 /* Python wrapper */
4929 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13isRelaxationInfeasible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4930 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible[] = "CyCbcModel.isRelaxationInfeasible(self)";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13isRelaxationInfeasible(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)4931 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13isRelaxationInfeasible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4932 PyObject *__pyx_r = 0;
4933 __Pyx_RefNannyDeclarations
4934 __Pyx_RefNannySetupContext("isRelaxationInfeasible (wrapper)", 0);
4935 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
4936
4937 /* function exit code */
4938 __Pyx_RefNannyFinishContext();
4939 return __pyx_r;
4940 }
4941
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)4942 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
4943 PyObject *__pyx_r = NULL;
4944 __Pyx_RefNannyDeclarations
4945 PyObject *__pyx_t_1 = NULL;
4946 int __pyx_lineno = 0;
4947 const char *__pyx_filename = NULL;
4948 int __pyx_clineno = 0;
4949 __Pyx_RefNannySetupContext("isRelaxationInfeasible", 0);
4950
4951 /* "cylp/cy/CyCbcModel.pyx":170
4952 *
4953 * def isRelaxationInfeasible(self):
4954 * return self.CppSelf.isInitialSolveProvenPrimalInfeasible() # <<<<<<<<<<<<<<
4955 *
4956 * def isRelaxationDualInfeasible(self):
4957 */
4958 __Pyx_XDECREF(__pyx_r);
4959 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenPrimalInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
4960 __Pyx_GOTREF(__pyx_t_1);
4961 __pyx_r = __pyx_t_1;
4962 __pyx_t_1 = 0;
4963 goto __pyx_L0;
4964
4965 /* "cylp/cy/CyCbcModel.pyx":169
4966 * self.CppSelf.setLogLevel(value)
4967 *
4968 * def isRelaxationInfeasible(self): # <<<<<<<<<<<<<<
4969 * return self.CppSelf.isInitialSolveProvenPrimalInfeasible()
4970 *
4971 */
4972
4973 /* function exit code */
4974 __pyx_L1_error:;
4975 __Pyx_XDECREF(__pyx_t_1);
4976 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.isRelaxationInfeasible", __pyx_clineno, __pyx_lineno, __pyx_filename);
4977 __pyx_r = NULL;
4978 __pyx_L0:;
4979 __Pyx_XGIVEREF(__pyx_r);
4980 __Pyx_RefNannyFinishContext();
4981 return __pyx_r;
4982 }
4983
4984 /* "cylp/cy/CyCbcModel.pyx":172
4985 * return self.CppSelf.isInitialSolveProvenPrimalInfeasible()
4986 *
4987 * def isRelaxationDualInfeasible(self): # <<<<<<<<<<<<<<
4988 * return self.CppSelf.isInitialSolveProvenDualInfeasible()
4989 *
4990 */
4991
4992 /* Python wrapper */
4993 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_15isRelaxationDualInfeasible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4994 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible[] = "CyCbcModel.isRelaxationDualInfeasible(self)";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_15isRelaxationDualInfeasible(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)4995 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_15isRelaxationDualInfeasible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4996 PyObject *__pyx_r = 0;
4997 __Pyx_RefNannyDeclarations
4998 __Pyx_RefNannySetupContext("isRelaxationDualInfeasible (wrapper)", 0);
4999 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
5000
5001 /* function exit code */
5002 __Pyx_RefNannyFinishContext();
5003 return __pyx_r;
5004 }
5005
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)5006 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
5007 PyObject *__pyx_r = NULL;
5008 __Pyx_RefNannyDeclarations
5009 PyObject *__pyx_t_1 = NULL;
5010 int __pyx_lineno = 0;
5011 const char *__pyx_filename = NULL;
5012 int __pyx_clineno = 0;
5013 __Pyx_RefNannySetupContext("isRelaxationDualInfeasible", 0);
5014
5015 /* "cylp/cy/CyCbcModel.pyx":173
5016 *
5017 * def isRelaxationDualInfeasible(self):
5018 * return self.CppSelf.isInitialSolveProvenDualInfeasible() # <<<<<<<<<<<<<<
5019 *
5020 * def isRelaxationOptimal(self):
5021 */
5022 __Pyx_XDECREF(__pyx_r);
5023 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenDualInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
5024 __Pyx_GOTREF(__pyx_t_1);
5025 __pyx_r = __pyx_t_1;
5026 __pyx_t_1 = 0;
5027 goto __pyx_L0;
5028
5029 /* "cylp/cy/CyCbcModel.pyx":172
5030 * return self.CppSelf.isInitialSolveProvenPrimalInfeasible()
5031 *
5032 * def isRelaxationDualInfeasible(self): # <<<<<<<<<<<<<<
5033 * return self.CppSelf.isInitialSolveProvenDualInfeasible()
5034 *
5035 */
5036
5037 /* function exit code */
5038 __pyx_L1_error:;
5039 __Pyx_XDECREF(__pyx_t_1);
5040 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.isRelaxationDualInfeasible", __pyx_clineno, __pyx_lineno, __pyx_filename);
5041 __pyx_r = NULL;
5042 __pyx_L0:;
5043 __Pyx_XGIVEREF(__pyx_r);
5044 __Pyx_RefNannyFinishContext();
5045 return __pyx_r;
5046 }
5047
5048 /* "cylp/cy/CyCbcModel.pyx":175
5049 * return self.CppSelf.isInitialSolveProvenDualInfeasible()
5050 *
5051 * def isRelaxationOptimal(self): # <<<<<<<<<<<<<<
5052 * return self.CppSelf.isInitialSolveProvenOptimal()
5053 *
5054 */
5055
5056 /* Python wrapper */
5057 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17isRelaxationOptimal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5058 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal[] = "CyCbcModel.isRelaxationOptimal(self)";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17isRelaxationOptimal(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)5059 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17isRelaxationOptimal(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5060 PyObject *__pyx_r = 0;
5061 __Pyx_RefNannyDeclarations
5062 __Pyx_RefNannySetupContext("isRelaxationOptimal (wrapper)", 0);
5063 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
5064
5065 /* function exit code */
5066 __Pyx_RefNannyFinishContext();
5067 return __pyx_r;
5068 }
5069
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)5070 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
5071 PyObject *__pyx_r = NULL;
5072 __Pyx_RefNannyDeclarations
5073 PyObject *__pyx_t_1 = NULL;
5074 int __pyx_lineno = 0;
5075 const char *__pyx_filename = NULL;
5076 int __pyx_clineno = 0;
5077 __Pyx_RefNannySetupContext("isRelaxationOptimal", 0);
5078
5079 /* "cylp/cy/CyCbcModel.pyx":176
5080 *
5081 * def isRelaxationOptimal(self):
5082 * return self.CppSelf.isInitialSolveProvenOptimal() # <<<<<<<<<<<<<<
5083 *
5084 * def isRelaxationAbondoned(self):
5085 */
5086 __Pyx_XDECREF(__pyx_r);
5087 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenOptimal()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
5088 __Pyx_GOTREF(__pyx_t_1);
5089 __pyx_r = __pyx_t_1;
5090 __pyx_t_1 = 0;
5091 goto __pyx_L0;
5092
5093 /* "cylp/cy/CyCbcModel.pyx":175
5094 * return self.CppSelf.isInitialSolveProvenDualInfeasible()
5095 *
5096 * def isRelaxationOptimal(self): # <<<<<<<<<<<<<<
5097 * return self.CppSelf.isInitialSolveProvenOptimal()
5098 *
5099 */
5100
5101 /* function exit code */
5102 __pyx_L1_error:;
5103 __Pyx_XDECREF(__pyx_t_1);
5104 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.isRelaxationOptimal", __pyx_clineno, __pyx_lineno, __pyx_filename);
5105 __pyx_r = NULL;
5106 __pyx_L0:;
5107 __Pyx_XGIVEREF(__pyx_r);
5108 __Pyx_RefNannyFinishContext();
5109 return __pyx_r;
5110 }
5111
5112 /* "cylp/cy/CyCbcModel.pyx":178
5113 * return self.CppSelf.isInitialSolveProvenOptimal()
5114 *
5115 * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<<
5116 * return self.CppSelf.isInitialSolveAbandoned()
5117 *
5118 */
5119
5120 /* Python wrapper */
5121 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5122 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned[] = "CyCbcModel.isRelaxationAbondoned(self)";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)5123 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5124 PyObject *__pyx_r = 0;
5125 __Pyx_RefNannyDeclarations
5126 __Pyx_RefNannySetupContext("isRelaxationAbondoned (wrapper)", 0);
5127 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
5128
5129 /* function exit code */
5130 __Pyx_RefNannyFinishContext();
5131 return __pyx_r;
5132 }
5133
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)5134 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
5135 PyObject *__pyx_r = NULL;
5136 __Pyx_RefNannyDeclarations
5137 PyObject *__pyx_t_1 = NULL;
5138 int __pyx_lineno = 0;
5139 const char *__pyx_filename = NULL;
5140 int __pyx_clineno = 0;
5141 __Pyx_RefNannySetupContext("isRelaxationAbondoned", 0);
5142
5143 /* "cylp/cy/CyCbcModel.pyx":179
5144 *
5145 * def isRelaxationAbondoned(self):
5146 * return self.CppSelf.isInitialSolveAbandoned() # <<<<<<<<<<<<<<
5147 *
5148 * property osiSolverInteface:
5149 */
5150 __Pyx_XDECREF(__pyx_r);
5151 __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveAbandoned()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error)
5152 __Pyx_GOTREF(__pyx_t_1);
5153 __pyx_r = __pyx_t_1;
5154 __pyx_t_1 = 0;
5155 goto __pyx_L0;
5156
5157 /* "cylp/cy/CyCbcModel.pyx":178
5158 * return self.CppSelf.isInitialSolveProvenOptimal()
5159 *
5160 * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<<
5161 * return self.CppSelf.isInitialSolveAbandoned()
5162 *
5163 */
5164
5165 /* function exit code */
5166 __pyx_L1_error:;
5167 __Pyx_XDECREF(__pyx_t_1);
5168 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.isRelaxationAbondoned", __pyx_clineno, __pyx_lineno, __pyx_filename);
5169 __pyx_r = NULL;
5170 __pyx_L0:;
5171 __Pyx_XGIVEREF(__pyx_r);
5172 __Pyx_RefNannyFinishContext();
5173 return __pyx_r;
5174 }
5175
5176 /* "cylp/cy/CyCbcModel.pyx":182
5177 *
5178 * property osiSolverInteface:
5179 * def __get__(self): # <<<<<<<<<<<<<<
5180 * cdef CyOsiSolverInterface osi = CyOsiSolverInterface()
5181 * osi.setCppSelf(self.CppSelf.solver())
5182 */
5183
5184 /* Python wrapper */
5185 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface_1__get__(PyObject * __pyx_v_self)5186 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface_1__get__(PyObject *__pyx_v_self) {
5187 PyObject *__pyx_r = 0;
5188 __Pyx_RefNannyDeclarations
5189 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5190 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
5191
5192 /* function exit code */
5193 __Pyx_RefNannyFinishContext();
5194 return __pyx_r;
5195 }
5196
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)5197 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
5198 struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *__pyx_v_osi = 0;
5199 PyObject *__pyx_r = NULL;
5200 __Pyx_RefNannyDeclarations
5201 PyObject *__pyx_t_1 = NULL;
5202 int __pyx_lineno = 0;
5203 const char *__pyx_filename = NULL;
5204 int __pyx_clineno = 0;
5205 __Pyx_RefNannySetupContext("__get__", 0);
5206
5207 /* "cylp/cy/CyCbcModel.pyx":183
5208 * property osiSolverInteface:
5209 * def __get__(self):
5210 * cdef CyOsiSolverInterface osi = CyOsiSolverInterface() # <<<<<<<<<<<<<<
5211 * osi.setCppSelf(self.CppSelf.solver())
5212 * return osi
5213 */
5214 __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
5215 __Pyx_GOTREF(__pyx_t_1);
5216 __pyx_v_osi = ((struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *)__pyx_t_1);
5217 __pyx_t_1 = 0;
5218
5219 /* "cylp/cy/CyCbcModel.pyx":184
5220 * def __get__(self):
5221 * cdef CyOsiSolverInterface osi = CyOsiSolverInterface()
5222 * osi.setCppSelf(self.CppSelf.solver()) # <<<<<<<<<<<<<<
5223 * return osi
5224 *
5225 */
5226 __pyx_t_1 = ((struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *)__pyx_v_osi->__pyx_vtab)->setCppSelf(__pyx_v_osi, __pyx_v_self->CppSelf->solver()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error)
5227 __Pyx_GOTREF(__pyx_t_1);
5228 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5229
5230 /* "cylp/cy/CyCbcModel.pyx":185
5231 * cdef CyOsiSolverInterface osi = CyOsiSolverInterface()
5232 * osi.setCppSelf(self.CppSelf.solver())
5233 * return osi # <<<<<<<<<<<<<<
5234 *
5235 * property primalVariableSolution:
5236 */
5237 __Pyx_XDECREF(__pyx_r);
5238 __Pyx_INCREF(((PyObject *)__pyx_v_osi));
5239 __pyx_r = ((PyObject *)__pyx_v_osi);
5240 goto __pyx_L0;
5241
5242 /* "cylp/cy/CyCbcModel.pyx":182
5243 *
5244 * property osiSolverInteface:
5245 * def __get__(self): # <<<<<<<<<<<<<<
5246 * cdef CyOsiSolverInterface osi = CyOsiSolverInterface()
5247 * osi.setCppSelf(self.CppSelf.solver())
5248 */
5249
5250 /* function exit code */
5251 __pyx_L1_error:;
5252 __Pyx_XDECREF(__pyx_t_1);
5253 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.osiSolverInteface.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5254 __pyx_r = NULL;
5255 __pyx_L0:;
5256 __Pyx_XDECREF((PyObject *)__pyx_v_osi);
5257 __Pyx_XGIVEREF(__pyx_r);
5258 __Pyx_RefNannyFinishContext();
5259 return __pyx_r;
5260 }
5261
5262 /* "cylp/cy/CyCbcModel.pyx":188
5263 *
5264 * property primalVariableSolution:
5265 * def __get__(self): # <<<<<<<<<<<<<<
5266 * ret = <object>self.CppSelf.getPrimalVariableSolution()
5267 * if self.cyLPModel:
5268 */
5269
5270 /* Python wrapper */
5271 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution_1__get__(PyObject * __pyx_v_self)5272 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution_1__get__(PyObject *__pyx_v_self) {
5273 PyObject *__pyx_r = 0;
5274 __Pyx_RefNannyDeclarations
5275 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5276 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
5277
5278 /* function exit code */
5279 __Pyx_RefNannyFinishContext();
5280 return __pyx_r;
5281 }
5282
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)5283 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
5284 PyObject *__pyx_v_ret = NULL;
5285 PyObject *__pyx_v_m = NULL;
5286 PyObject *__pyx_v_inds = NULL;
5287 PyObject *__pyx_v_d = NULL;
5288 PyObject *__pyx_v_v = NULL;
5289 PyObject *__pyx_v_var = NULL;
5290 PyObject *__pyx_v_dimRanges = NULL;
5291 PyObject *__pyx_v_element = NULL;
5292 PyObject *__pyx_v_names = NULL;
5293 PyObject *__pyx_v_i = NULL;
5294 PyObject *__pyx_r = NULL;
5295 __Pyx_RefNannyDeclarations
5296 PyObject *__pyx_t_1;
5297 PyObject *__pyx_t_2 = NULL;
5298 int __pyx_t_3;
5299 PyObject *__pyx_t_4 = NULL;
5300 PyObject *__pyx_t_5 = NULL;
5301 Py_ssize_t __pyx_t_6;
5302 PyObject *(*__pyx_t_7)(PyObject *);
5303 PyObject *__pyx_t_8 = NULL;
5304 Py_ssize_t __pyx_t_9;
5305 PyObject *(*__pyx_t_10)(PyObject *);
5306 PyObject *__pyx_t_11 = NULL;
5307 int __pyx_lineno = 0;
5308 const char *__pyx_filename = NULL;
5309 int __pyx_clineno = 0;
5310 __Pyx_RefNannySetupContext("__get__", 0);
5311
5312 /* "cylp/cy/CyCbcModel.pyx":189
5313 * property primalVariableSolution:
5314 * def __get__(self):
5315 * ret = <object>self.CppSelf.getPrimalVariableSolution() # <<<<<<<<<<<<<<
5316 * if self.cyLPModel:
5317 * m = self.cyLPModel
5318 */
5319 __pyx_t_1 = __pyx_v_self->CppSelf->getPrimalVariableSolution();
5320 __pyx_t_2 = ((PyObject *)__pyx_t_1);
5321 __Pyx_INCREF(__pyx_t_2);
5322 __pyx_v_ret = __pyx_t_2;
5323 __pyx_t_2 = 0;
5324
5325 /* "cylp/cy/CyCbcModel.pyx":190
5326 * def __get__(self):
5327 * ret = <object>self.CppSelf.getPrimalVariableSolution()
5328 * if self.cyLPModel: # <<<<<<<<<<<<<<
5329 * m = self.cyLPModel
5330 * inds = m.inds
5331 */
5332 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->cyLPModel); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 190, __pyx_L1_error)
5333 if (__pyx_t_3) {
5334
5335 /* "cylp/cy/CyCbcModel.pyx":191
5336 * ret = <object>self.CppSelf.getPrimalVariableSolution()
5337 * if self.cyLPModel:
5338 * m = self.cyLPModel # <<<<<<<<<<<<<<
5339 * inds = m.inds
5340 * d = {}
5341 */
5342 __pyx_t_2 = __pyx_v_self->cyLPModel;
5343 __Pyx_INCREF(__pyx_t_2);
5344 __pyx_v_m = __pyx_t_2;
5345 __pyx_t_2 = 0;
5346
5347 /* "cylp/cy/CyCbcModel.pyx":192
5348 * if self.cyLPModel:
5349 * m = self.cyLPModel
5350 * inds = m.inds # <<<<<<<<<<<<<<
5351 * d = {}
5352 * for v in inds.varIndex.keys():
5353 */
5354 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_inds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
5355 __Pyx_GOTREF(__pyx_t_2);
5356 __pyx_v_inds = __pyx_t_2;
5357 __pyx_t_2 = 0;
5358
5359 /* "cylp/cy/CyCbcModel.pyx":193
5360 * m = self.cyLPModel
5361 * inds = m.inds
5362 * d = {} # <<<<<<<<<<<<<<
5363 * for v in inds.varIndex.keys():
5364 * d[v] = ret[inds.varIndex[v]]
5365 */
5366 __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
5367 __Pyx_GOTREF(__pyx_t_2);
5368 __pyx_v_d = __pyx_t_2;
5369 __pyx_t_2 = 0;
5370
5371 /* "cylp/cy/CyCbcModel.pyx":194
5372 * inds = m.inds
5373 * d = {}
5374 * for v in inds.varIndex.keys(): # <<<<<<<<<<<<<<
5375 * d[v] = ret[inds.varIndex[v]]
5376 * var = m.getVarByName(v)
5377 */
5378 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error)
5379 __Pyx_GOTREF(__pyx_t_4);
5380 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error)
5381 __Pyx_GOTREF(__pyx_t_5);
5382 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5383 __pyx_t_4 = NULL;
5384 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
5385 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
5386 if (likely(__pyx_t_4)) {
5387 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
5388 __Pyx_INCREF(__pyx_t_4);
5389 __Pyx_INCREF(function);
5390 __Pyx_DECREF_SET(__pyx_t_5, function);
5391 }
5392 }
5393 __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
5394 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5395 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
5396 __Pyx_GOTREF(__pyx_t_2);
5397 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5398 if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
5399 __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
5400 __pyx_t_7 = NULL;
5401 } else {
5402 __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error)
5403 __Pyx_GOTREF(__pyx_t_5);
5404 __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error)
5405 }
5406 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5407 for (;;) {
5408 if (likely(!__pyx_t_7)) {
5409 if (likely(PyList_CheckExact(__pyx_t_5))) {
5410 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
5411 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5412 __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 194, __pyx_L1_error)
5413 #else
5414 __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
5415 __Pyx_GOTREF(__pyx_t_2);
5416 #endif
5417 } else {
5418 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
5419 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5420 __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 194, __pyx_L1_error)
5421 #else
5422 __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
5423 __Pyx_GOTREF(__pyx_t_2);
5424 #endif
5425 }
5426 } else {
5427 __pyx_t_2 = __pyx_t_7(__pyx_t_5);
5428 if (unlikely(!__pyx_t_2)) {
5429 PyObject* exc_type = PyErr_Occurred();
5430 if (exc_type) {
5431 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5432 else __PYX_ERR(0, 194, __pyx_L1_error)
5433 }
5434 break;
5435 }
5436 __Pyx_GOTREF(__pyx_t_2);
5437 }
5438 __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2);
5439 __pyx_t_2 = 0;
5440
5441 /* "cylp/cy/CyCbcModel.pyx":195
5442 * d = {}
5443 * for v in inds.varIndex.keys():
5444 * d[v] = ret[inds.varIndex[v]] # <<<<<<<<<<<<<<
5445 * var = m.getVarByName(v)
5446 * if var.dims:
5447 */
5448 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
5449 __Pyx_GOTREF(__pyx_t_2);
5450 __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error)
5451 __Pyx_GOTREF(__pyx_t_4);
5452 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5453 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
5454 __Pyx_GOTREF(__pyx_t_2);
5455 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5456 if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 195, __pyx_L1_error)
5457 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5458
5459 /* "cylp/cy/CyCbcModel.pyx":196
5460 * for v in inds.varIndex.keys():
5461 * d[v] = ret[inds.varIndex[v]]
5462 * var = m.getVarByName(v) # <<<<<<<<<<<<<<
5463 * if var.dims:
5464 * d[v] = CyLPSolution()
5465 */
5466 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_getVarByName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
5467 __Pyx_GOTREF(__pyx_t_4);
5468 __pyx_t_8 = NULL;
5469 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
5470 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
5471 if (likely(__pyx_t_8)) {
5472 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
5473 __Pyx_INCREF(__pyx_t_8);
5474 __Pyx_INCREF(function);
5475 __Pyx_DECREF_SET(__pyx_t_4, function);
5476 }
5477 }
5478 __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_v);
5479 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5480 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error)
5481 __Pyx_GOTREF(__pyx_t_2);
5482 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5483 __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_2);
5484 __pyx_t_2 = 0;
5485
5486 /* "cylp/cy/CyCbcModel.pyx":197
5487 * d[v] = ret[inds.varIndex[v]]
5488 * var = m.getVarByName(v)
5489 * if var.dims: # <<<<<<<<<<<<<<
5490 * d[v] = CyLPSolution()
5491 * dimRanges = [range(i) for i in var.dims]
5492 */
5493 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
5494 __Pyx_GOTREF(__pyx_t_2);
5495 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 197, __pyx_L1_error)
5496 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5497 if (__pyx_t_3) {
5498
5499 /* "cylp/cy/CyCbcModel.pyx":198
5500 * var = m.getVarByName(v)
5501 * if var.dims:
5502 * d[v] = CyLPSolution() # <<<<<<<<<<<<<<
5503 * dimRanges = [range(i) for i in var.dims]
5504 * for element in product(*dimRanges):
5505 */
5506 __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error)
5507 __Pyx_GOTREF(__pyx_t_4);
5508 __pyx_t_8 = NULL;
5509 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5510 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
5511 if (likely(__pyx_t_8)) {
5512 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
5513 __Pyx_INCREF(__pyx_t_8);
5514 __Pyx_INCREF(function);
5515 __Pyx_DECREF_SET(__pyx_t_4, function);
5516 }
5517 }
5518 __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
5519 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
5520 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
5521 __Pyx_GOTREF(__pyx_t_2);
5522 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5523 if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 198, __pyx_L1_error)
5524 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5525
5526 /* "cylp/cy/CyCbcModel.pyx":199
5527 * if var.dims:
5528 * d[v] = CyLPSolution()
5529 * dimRanges = [range(i) for i in var.dims] # <<<<<<<<<<<<<<
5530 * for element in product(*dimRanges):
5531 * d[v][element] = ret[var.__getitem__(element).indices[0]]
5532 */
5533 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error)
5534 __Pyx_GOTREF(__pyx_t_2);
5535 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
5536 __Pyx_GOTREF(__pyx_t_4);
5537 if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
5538 __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
5539 __pyx_t_10 = NULL;
5540 } else {
5541 __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 199, __pyx_L1_error)
5542 __Pyx_GOTREF(__pyx_t_8);
5543 __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 199, __pyx_L1_error)
5544 }
5545 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5546 for (;;) {
5547 if (likely(!__pyx_t_10)) {
5548 if (likely(PyList_CheckExact(__pyx_t_8))) {
5549 if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
5550 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5551 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 199, __pyx_L1_error)
5552 #else
5553 __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
5554 __Pyx_GOTREF(__pyx_t_4);
5555 #endif
5556 } else {
5557 if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
5558 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5559 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 199, __pyx_L1_error)
5560 #else
5561 __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
5562 __Pyx_GOTREF(__pyx_t_4);
5563 #endif
5564 }
5565 } else {
5566 __pyx_t_4 = __pyx_t_10(__pyx_t_8);
5567 if (unlikely(!__pyx_t_4)) {
5568 PyObject* exc_type = PyErr_Occurred();
5569 if (exc_type) {
5570 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5571 else __PYX_ERR(0, 199, __pyx_L1_error)
5572 }
5573 break;
5574 }
5575 __Pyx_GOTREF(__pyx_t_4);
5576 }
5577 __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
5578 __pyx_t_4 = 0;
5579 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error)
5580 __Pyx_GOTREF(__pyx_t_4);
5581 if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 199, __pyx_L1_error)
5582 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5583 }
5584 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5585 __Pyx_XDECREF_SET(__pyx_v_dimRanges, ((PyObject*)__pyx_t_2));
5586 __pyx_t_2 = 0;
5587
5588 /* "cylp/cy/CyCbcModel.pyx":200
5589 * d[v] = CyLPSolution()
5590 * dimRanges = [range(i) for i in var.dims]
5591 * for element in product(*dimRanges): # <<<<<<<<<<<<<<
5592 * d[v][element] = ret[var.__getitem__(element).indices[0]]
5593 * ret = d
5594 */
5595 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_product); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
5596 __Pyx_GOTREF(__pyx_t_2);
5597 __pyx_t_8 = PySequence_Tuple(__pyx_v_dimRanges); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 200, __pyx_L1_error)
5598 __Pyx_GOTREF(__pyx_t_8);
5599 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error)
5600 __Pyx_GOTREF(__pyx_t_4);
5601 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5602 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5603 if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
5604 __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0;
5605 __pyx_t_10 = NULL;
5606 } else {
5607 __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 200, __pyx_L1_error)
5608 __Pyx_GOTREF(__pyx_t_8);
5609 __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 200, __pyx_L1_error)
5610 }
5611 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5612 for (;;) {
5613 if (likely(!__pyx_t_10)) {
5614 if (likely(PyList_CheckExact(__pyx_t_8))) {
5615 if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break;
5616 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5617 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 200, __pyx_L1_error)
5618 #else
5619 __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error)
5620 __Pyx_GOTREF(__pyx_t_4);
5621 #endif
5622 } else {
5623 if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
5624 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5625 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 200, __pyx_L1_error)
5626 #else
5627 __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error)
5628 __Pyx_GOTREF(__pyx_t_4);
5629 #endif
5630 }
5631 } else {
5632 __pyx_t_4 = __pyx_t_10(__pyx_t_8);
5633 if (unlikely(!__pyx_t_4)) {
5634 PyObject* exc_type = PyErr_Occurred();
5635 if (exc_type) {
5636 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5637 else __PYX_ERR(0, 200, __pyx_L1_error)
5638 }
5639 break;
5640 }
5641 __Pyx_GOTREF(__pyx_t_4);
5642 }
5643 __Pyx_XDECREF_SET(__pyx_v_element, __pyx_t_4);
5644 __pyx_t_4 = 0;
5645
5646 /* "cylp/cy/CyCbcModel.pyx":201
5647 * dimRanges = [range(i) for i in var.dims]
5648 * for element in product(*dimRanges):
5649 * d[v][element] = ret[var.__getitem__(element).indices[0]] # <<<<<<<<<<<<<<
5650 * ret = d
5651 * else:
5652 */
5653 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
5654 __Pyx_GOTREF(__pyx_t_2);
5655 __pyx_t_11 = NULL;
5656 if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
5657 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
5658 if (likely(__pyx_t_11)) {
5659 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5660 __Pyx_INCREF(__pyx_t_11);
5661 __Pyx_INCREF(function);
5662 __Pyx_DECREF_SET(__pyx_t_2, function);
5663 }
5664 }
5665 __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_element);
5666 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
5667 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
5668 __Pyx_GOTREF(__pyx_t_4);
5669 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5670 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
5671 __Pyx_GOTREF(__pyx_t_2);
5672 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5673 __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
5674 __Pyx_GOTREF(__pyx_t_4);
5675 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5676 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error)
5677 __Pyx_GOTREF(__pyx_t_2);
5678 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5679 __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_d, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error)
5680 __Pyx_GOTREF(__pyx_t_4);
5681 if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_element, __pyx_t_2) < 0)) __PYX_ERR(0, 201, __pyx_L1_error)
5682 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5683 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5684
5685 /* "cylp/cy/CyCbcModel.pyx":200
5686 * d[v] = CyLPSolution()
5687 * dimRanges = [range(i) for i in var.dims]
5688 * for element in product(*dimRanges): # <<<<<<<<<<<<<<
5689 * d[v][element] = ret[var.__getitem__(element).indices[0]]
5690 * ret = d
5691 */
5692 }
5693 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5694
5695 /* "cylp/cy/CyCbcModel.pyx":197
5696 * d[v] = ret[inds.varIndex[v]]
5697 * var = m.getVarByName(v)
5698 * if var.dims: # <<<<<<<<<<<<<<
5699 * d[v] = CyLPSolution()
5700 * dimRanges = [range(i) for i in var.dims]
5701 */
5702 }
5703
5704 /* "cylp/cy/CyCbcModel.pyx":194
5705 * inds = m.inds
5706 * d = {}
5707 * for v in inds.varIndex.keys(): # <<<<<<<<<<<<<<
5708 * d[v] = ret[inds.varIndex[v]]
5709 * var = m.getVarByName(v)
5710 */
5711 }
5712 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5713
5714 /* "cylp/cy/CyCbcModel.pyx":202
5715 * for element in product(*dimRanges):
5716 * d[v][element] = ret[var.__getitem__(element).indices[0]]
5717 * ret = d # <<<<<<<<<<<<<<
5718 * else:
5719 * names = self.clpModel.variableNames
5720 */
5721 __Pyx_INCREF(__pyx_v_d);
5722 __Pyx_DECREF_SET(__pyx_v_ret, __pyx_v_d);
5723
5724 /* "cylp/cy/CyCbcModel.pyx":190
5725 * def __get__(self):
5726 * ret = <object>self.CppSelf.getPrimalVariableSolution()
5727 * if self.cyLPModel: # <<<<<<<<<<<<<<
5728 * m = self.cyLPModel
5729 * inds = m.inds
5730 */
5731 goto __pyx_L3;
5732 }
5733
5734 /* "cylp/cy/CyCbcModel.pyx":204
5735 * ret = d
5736 * else:
5737 * names = self.clpModel.variableNames # <<<<<<<<<<<<<<
5738 * if names:
5739 * d = CyLPSolution()
5740 */
5741 /*else*/ {
5742 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->clpModel, __pyx_n_s_variableNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error)
5743 __Pyx_GOTREF(__pyx_t_5);
5744 __pyx_v_names = __pyx_t_5;
5745 __pyx_t_5 = 0;
5746
5747 /* "cylp/cy/CyCbcModel.pyx":205
5748 * else:
5749 * names = self.clpModel.variableNames
5750 * if names: # <<<<<<<<<<<<<<
5751 * d = CyLPSolution()
5752 * for i in range(len(names)):
5753 */
5754 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_names); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 205, __pyx_L1_error)
5755 if (__pyx_t_3) {
5756
5757 /* "cylp/cy/CyCbcModel.pyx":206
5758 * names = self.clpModel.variableNames
5759 * if names:
5760 * d = CyLPSolution() # <<<<<<<<<<<<<<
5761 * for i in range(len(names)):
5762 * d[names[i]] = ret[i]
5763 */
5764 __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L1_error)
5765 __Pyx_GOTREF(__pyx_t_8);
5766 __pyx_t_2 = NULL;
5767 if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
5768 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
5769 if (likely(__pyx_t_2)) {
5770 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
5771 __Pyx_INCREF(__pyx_t_2);
5772 __Pyx_INCREF(function);
5773 __Pyx_DECREF_SET(__pyx_t_8, function);
5774 }
5775 }
5776 __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
5777 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5778 if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error)
5779 __Pyx_GOTREF(__pyx_t_5);
5780 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5781 __pyx_v_d = __pyx_t_5;
5782 __pyx_t_5 = 0;
5783
5784 /* "cylp/cy/CyCbcModel.pyx":207
5785 * if names:
5786 * d = CyLPSolution()
5787 * for i in range(len(names)): # <<<<<<<<<<<<<<
5788 * d[names[i]] = ret[i]
5789 * ret = d
5790 */
5791 __pyx_t_6 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 207, __pyx_L1_error)
5792 __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error)
5793 __Pyx_GOTREF(__pyx_t_5);
5794 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error)
5795 __Pyx_GOTREF(__pyx_t_8);
5796 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5797 if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
5798 __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
5799 __pyx_t_7 = NULL;
5800 } else {
5801 __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error)
5802 __Pyx_GOTREF(__pyx_t_5);
5803 __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L1_error)
5804 }
5805 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5806 for (;;) {
5807 if (likely(!__pyx_t_7)) {
5808 if (likely(PyList_CheckExact(__pyx_t_5))) {
5809 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
5810 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5811 __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
5812 #else
5813 __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error)
5814 __Pyx_GOTREF(__pyx_t_8);
5815 #endif
5816 } else {
5817 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
5818 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
5819 __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 207, __pyx_L1_error)
5820 #else
5821 __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error)
5822 __Pyx_GOTREF(__pyx_t_8);
5823 #endif
5824 }
5825 } else {
5826 __pyx_t_8 = __pyx_t_7(__pyx_t_5);
5827 if (unlikely(!__pyx_t_8)) {
5828 PyObject* exc_type = PyErr_Occurred();
5829 if (exc_type) {
5830 if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
5831 else __PYX_ERR(0, 207, __pyx_L1_error)
5832 }
5833 break;
5834 }
5835 __Pyx_GOTREF(__pyx_t_8);
5836 }
5837 __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
5838 __pyx_t_8 = 0;
5839
5840 /* "cylp/cy/CyCbcModel.pyx":208
5841 * d = CyLPSolution()
5842 * for i in range(len(names)):
5843 * d[names[i]] = ret[i] # <<<<<<<<<<<<<<
5844 * ret = d
5845 * return ret
5846 */
5847 __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L1_error)
5848 __Pyx_GOTREF(__pyx_t_8);
5849 __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_names, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
5850 __Pyx_GOTREF(__pyx_t_2);
5851 if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_t_2, __pyx_t_8) < 0)) __PYX_ERR(0, 208, __pyx_L1_error)
5852 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5853 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
5854
5855 /* "cylp/cy/CyCbcModel.pyx":207
5856 * if names:
5857 * d = CyLPSolution()
5858 * for i in range(len(names)): # <<<<<<<<<<<<<<
5859 * d[names[i]] = ret[i]
5860 * ret = d
5861 */
5862 }
5863 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5864
5865 /* "cylp/cy/CyCbcModel.pyx":209
5866 * for i in range(len(names)):
5867 * d[names[i]] = ret[i]
5868 * ret = d # <<<<<<<<<<<<<<
5869 * return ret
5870 *
5871 */
5872 __Pyx_INCREF(__pyx_v_d);
5873 __Pyx_DECREF_SET(__pyx_v_ret, __pyx_v_d);
5874
5875 /* "cylp/cy/CyCbcModel.pyx":205
5876 * else:
5877 * names = self.clpModel.variableNames
5878 * if names: # <<<<<<<<<<<<<<
5879 * d = CyLPSolution()
5880 * for i in range(len(names)):
5881 */
5882 }
5883 }
5884 __pyx_L3:;
5885
5886 /* "cylp/cy/CyCbcModel.pyx":210
5887 * d[names[i]] = ret[i]
5888 * ret = d
5889 * return ret # <<<<<<<<<<<<<<
5890 *
5891 * property solutionCount:
5892 */
5893 __Pyx_XDECREF(__pyx_r);
5894 __Pyx_INCREF(__pyx_v_ret);
5895 __pyx_r = __pyx_v_ret;
5896 goto __pyx_L0;
5897
5898 /* "cylp/cy/CyCbcModel.pyx":188
5899 *
5900 * property primalVariableSolution:
5901 * def __get__(self): # <<<<<<<<<<<<<<
5902 * ret = <object>self.CppSelf.getPrimalVariableSolution()
5903 * if self.cyLPModel:
5904 */
5905
5906 /* function exit code */
5907 __pyx_L1_error:;
5908 __Pyx_XDECREF(__pyx_t_2);
5909 __Pyx_XDECREF(__pyx_t_4);
5910 __Pyx_XDECREF(__pyx_t_5);
5911 __Pyx_XDECREF(__pyx_t_8);
5912 __Pyx_XDECREF(__pyx_t_11);
5913 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.primalVariableSolution.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5914 __pyx_r = NULL;
5915 __pyx_L0:;
5916 __Pyx_XDECREF(__pyx_v_ret);
5917 __Pyx_XDECREF(__pyx_v_m);
5918 __Pyx_XDECREF(__pyx_v_inds);
5919 __Pyx_XDECREF(__pyx_v_d);
5920 __Pyx_XDECREF(__pyx_v_v);
5921 __Pyx_XDECREF(__pyx_v_var);
5922 __Pyx_XDECREF(__pyx_v_dimRanges);
5923 __Pyx_XDECREF(__pyx_v_element);
5924 __Pyx_XDECREF(__pyx_v_names);
5925 __Pyx_XDECREF(__pyx_v_i);
5926 __Pyx_XGIVEREF(__pyx_r);
5927 __Pyx_RefNannyFinishContext();
5928 return __pyx_r;
5929 }
5930
5931 /* "cylp/cy/CyCbcModel.pyx":213
5932 *
5933 * property solutionCount:
5934 * def __get__(self): # <<<<<<<<<<<<<<
5935 * return self.CppSelf.getSolutionCount()
5936 *
5937 */
5938
5939 /* Python wrapper */
5940 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount_1__get__(PyObject * __pyx_v_self)5941 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount_1__get__(PyObject *__pyx_v_self) {
5942 PyObject *__pyx_r = 0;
5943 __Pyx_RefNannyDeclarations
5944 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5945 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
5946
5947 /* function exit code */
5948 __Pyx_RefNannyFinishContext();
5949 return __pyx_r;
5950 }
5951
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)5952 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
5953 PyObject *__pyx_r = NULL;
5954 __Pyx_RefNannyDeclarations
5955 PyObject *__pyx_t_1 = NULL;
5956 int __pyx_lineno = 0;
5957 const char *__pyx_filename = NULL;
5958 int __pyx_clineno = 0;
5959 __Pyx_RefNannySetupContext("__get__", 0);
5960
5961 /* "cylp/cy/CyCbcModel.pyx":214
5962 * property solutionCount:
5963 * def __get__(self):
5964 * return self.CppSelf.getSolutionCount() # <<<<<<<<<<<<<<
5965 *
5966 * property numberHeuristicSolutions:
5967 */
5968 __Pyx_XDECREF(__pyx_r);
5969 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getSolutionCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
5970 __Pyx_GOTREF(__pyx_t_1);
5971 __pyx_r = __pyx_t_1;
5972 __pyx_t_1 = 0;
5973 goto __pyx_L0;
5974
5975 /* "cylp/cy/CyCbcModel.pyx":213
5976 *
5977 * property solutionCount:
5978 * def __get__(self): # <<<<<<<<<<<<<<
5979 * return self.CppSelf.getSolutionCount()
5980 *
5981 */
5982
5983 /* function exit code */
5984 __pyx_L1_error:;
5985 __Pyx_XDECREF(__pyx_t_1);
5986 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.solutionCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5987 __pyx_r = NULL;
5988 __pyx_L0:;
5989 __Pyx_XGIVEREF(__pyx_r);
5990 __Pyx_RefNannyFinishContext();
5991 return __pyx_r;
5992 }
5993
5994 /* "cylp/cy/CyCbcModel.pyx":217
5995 *
5996 * property numberHeuristicSolutions:
5997 * def __get__(self): # <<<<<<<<<<<<<<
5998 * return self.CppSelf.getNumberHeuristicSolutions()
5999 *
6000 */
6001
6002 /* Python wrapper */
6003 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicSolutions_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicSolutions_1__get__(PyObject * __pyx_v_self)6004 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicSolutions_1__get__(PyObject *__pyx_v_self) {
6005 PyObject *__pyx_r = 0;
6006 __Pyx_RefNannyDeclarations
6007 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6008 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicSolutions___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6009
6010 /* function exit code */
6011 __Pyx_RefNannyFinishContext();
6012 return __pyx_r;
6013 }
6014
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicSolutions___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6015 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicSolutions___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6016 PyObject *__pyx_r = NULL;
6017 __Pyx_RefNannyDeclarations
6018 PyObject *__pyx_t_1 = NULL;
6019 int __pyx_lineno = 0;
6020 const char *__pyx_filename = NULL;
6021 int __pyx_clineno = 0;
6022 __Pyx_RefNannySetupContext("__get__", 0);
6023
6024 /* "cylp/cy/CyCbcModel.pyx":218
6025 * property numberHeuristicSolutions:
6026 * def __get__(self):
6027 * return self.CppSelf.getNumberHeuristicSolutions() # <<<<<<<<<<<<<<
6028 *
6029 * property nodeCount:
6030 */
6031 __Pyx_XDECREF(__pyx_r);
6032 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberHeuristicSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error)
6033 __Pyx_GOTREF(__pyx_t_1);
6034 __pyx_r = __pyx_t_1;
6035 __pyx_t_1 = 0;
6036 goto __pyx_L0;
6037
6038 /* "cylp/cy/CyCbcModel.pyx":217
6039 *
6040 * property numberHeuristicSolutions:
6041 * def __get__(self): # <<<<<<<<<<<<<<
6042 * return self.CppSelf.getNumberHeuristicSolutions()
6043 *
6044 */
6045
6046 /* function exit code */
6047 __pyx_L1_error:;
6048 __Pyx_XDECREF(__pyx_t_1);
6049 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.numberHeuristicSolutions.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6050 __pyx_r = NULL;
6051 __pyx_L0:;
6052 __Pyx_XGIVEREF(__pyx_r);
6053 __Pyx_RefNannyFinishContext();
6054 return __pyx_r;
6055 }
6056
6057 /* "cylp/cy/CyCbcModel.pyx":221
6058 *
6059 * property nodeCount:
6060 * def __get__(self): # <<<<<<<<<<<<<<
6061 * return self.CppSelf.getNodeCount()
6062 *
6063 */
6064
6065 /* Python wrapper */
6066 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount_1__get__(PyObject * __pyx_v_self)6067 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount_1__get__(PyObject *__pyx_v_self) {
6068 PyObject *__pyx_r = 0;
6069 __Pyx_RefNannyDeclarations
6070 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6071 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6072
6073 /* function exit code */
6074 __Pyx_RefNannyFinishContext();
6075 return __pyx_r;
6076 }
6077
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6078 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6079 PyObject *__pyx_r = NULL;
6080 __Pyx_RefNannyDeclarations
6081 PyObject *__pyx_t_1 = NULL;
6082 int __pyx_lineno = 0;
6083 const char *__pyx_filename = NULL;
6084 int __pyx_clineno = 0;
6085 __Pyx_RefNannySetupContext("__get__", 0);
6086
6087 /* "cylp/cy/CyCbcModel.pyx":222
6088 * property nodeCount:
6089 * def __get__(self):
6090 * return self.CppSelf.getNodeCount() # <<<<<<<<<<<<<<
6091 *
6092 * property objectiveValue:
6093 */
6094 __Pyx_XDECREF(__pyx_r);
6095 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNodeCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
6096 __Pyx_GOTREF(__pyx_t_1);
6097 __pyx_r = __pyx_t_1;
6098 __pyx_t_1 = 0;
6099 goto __pyx_L0;
6100
6101 /* "cylp/cy/CyCbcModel.pyx":221
6102 *
6103 * property nodeCount:
6104 * def __get__(self): # <<<<<<<<<<<<<<
6105 * return self.CppSelf.getNodeCount()
6106 *
6107 */
6108
6109 /* function exit code */
6110 __pyx_L1_error:;
6111 __Pyx_XDECREF(__pyx_t_1);
6112 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.nodeCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6113 __pyx_r = NULL;
6114 __pyx_L0:;
6115 __Pyx_XGIVEREF(__pyx_r);
6116 __Pyx_RefNannyFinishContext();
6117 return __pyx_r;
6118 }
6119
6120 /* "cylp/cy/CyCbcModel.pyx":225
6121 *
6122 * property objectiveValue:
6123 * def __get__(self): # <<<<<<<<<<<<<<
6124 * return self.CppSelf.getObjValue()
6125 *
6126 */
6127
6128 /* Python wrapper */
6129 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue_1__get__(PyObject * __pyx_v_self)6130 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue_1__get__(PyObject *__pyx_v_self) {
6131 PyObject *__pyx_r = 0;
6132 __Pyx_RefNannyDeclarations
6133 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6134 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6135
6136 /* function exit code */
6137 __Pyx_RefNannyFinishContext();
6138 return __pyx_r;
6139 }
6140
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6141 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6142 PyObject *__pyx_r = NULL;
6143 __Pyx_RefNannyDeclarations
6144 PyObject *__pyx_t_1 = NULL;
6145 int __pyx_lineno = 0;
6146 const char *__pyx_filename = NULL;
6147 int __pyx_clineno = 0;
6148 __Pyx_RefNannySetupContext("__get__", 0);
6149
6150 /* "cylp/cy/CyCbcModel.pyx":226
6151 * property objectiveValue:
6152 * def __get__(self):
6153 * return self.CppSelf.getObjValue() # <<<<<<<<<<<<<<
6154 *
6155 * property bestPossibleObjValue:
6156 */
6157 __Pyx_XDECREF(__pyx_r);
6158 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
6159 __Pyx_GOTREF(__pyx_t_1);
6160 __pyx_r = __pyx_t_1;
6161 __pyx_t_1 = 0;
6162 goto __pyx_L0;
6163
6164 /* "cylp/cy/CyCbcModel.pyx":225
6165 *
6166 * property objectiveValue:
6167 * def __get__(self): # <<<<<<<<<<<<<<
6168 * return self.CppSelf.getObjValue()
6169 *
6170 */
6171
6172 /* function exit code */
6173 __pyx_L1_error:;
6174 __Pyx_XDECREF(__pyx_t_1);
6175 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.objectiveValue.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6176 __pyx_r = NULL;
6177 __pyx_L0:;
6178 __Pyx_XGIVEREF(__pyx_r);
6179 __Pyx_RefNannyFinishContext();
6180 return __pyx_r;
6181 }
6182
6183 /* "cylp/cy/CyCbcModel.pyx":229
6184 *
6185 * property bestPossibleObjValue:
6186 * def __get__(self): # <<<<<<<<<<<<<<
6187 * return self.CppSelf.getBestPossibleObjValue()
6188 *
6189 */
6190
6191 /* Python wrapper */
6192 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjValue_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjValue_1__get__(PyObject * __pyx_v_self)6193 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjValue_1__get__(PyObject *__pyx_v_self) {
6194 PyObject *__pyx_r = 0;
6195 __Pyx_RefNannyDeclarations
6196 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6197 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjValue___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6198
6199 /* function exit code */
6200 __Pyx_RefNannyFinishContext();
6201 return __pyx_r;
6202 }
6203
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjValue___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6204 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjValue___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6205 PyObject *__pyx_r = NULL;
6206 __Pyx_RefNannyDeclarations
6207 PyObject *__pyx_t_1 = NULL;
6208 int __pyx_lineno = 0;
6209 const char *__pyx_filename = NULL;
6210 int __pyx_clineno = 0;
6211 __Pyx_RefNannySetupContext("__get__", 0);
6212
6213 /* "cylp/cy/CyCbcModel.pyx":230
6214 * property bestPossibleObjValue:
6215 * def __get__(self):
6216 * return self.CppSelf.getBestPossibleObjValue() # <<<<<<<<<<<<<<
6217 *
6218 * property numberObjects:
6219 */
6220 __Pyx_XDECREF(__pyx_r);
6221 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getBestPossibleObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
6222 __Pyx_GOTREF(__pyx_t_1);
6223 __pyx_r = __pyx_t_1;
6224 __pyx_t_1 = 0;
6225 goto __pyx_L0;
6226
6227 /* "cylp/cy/CyCbcModel.pyx":229
6228 *
6229 * property bestPossibleObjValue:
6230 * def __get__(self): # <<<<<<<<<<<<<<
6231 * return self.CppSelf.getBestPossibleObjValue()
6232 *
6233 */
6234
6235 /* function exit code */
6236 __pyx_L1_error:;
6237 __Pyx_XDECREF(__pyx_t_1);
6238 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.bestPossibleObjValue.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6239 __pyx_r = NULL;
6240 __pyx_L0:;
6241 __Pyx_XGIVEREF(__pyx_r);
6242 __Pyx_RefNannyFinishContext();
6243 return __pyx_r;
6244 }
6245
6246 /* "cylp/cy/CyCbcModel.pyx":233
6247 *
6248 * property numberObjects:
6249 * def __get__(self): # <<<<<<<<<<<<<<
6250 * return self.CppSelf.numberObjects()
6251 *
6252 */
6253
6254 /* Python wrapper */
6255 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects_1__get__(PyObject * __pyx_v_self)6256 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects_1__get__(PyObject *__pyx_v_self) {
6257 PyObject *__pyx_r = 0;
6258 __Pyx_RefNannyDeclarations
6259 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6260 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6261
6262 /* function exit code */
6263 __Pyx_RefNannyFinishContext();
6264 return __pyx_r;
6265 }
6266
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6267 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6268 PyObject *__pyx_r = NULL;
6269 __Pyx_RefNannyDeclarations
6270 PyObject *__pyx_t_1 = NULL;
6271 int __pyx_lineno = 0;
6272 const char *__pyx_filename = NULL;
6273 int __pyx_clineno = 0;
6274 __Pyx_RefNannySetupContext("__get__", 0);
6275
6276 /* "cylp/cy/CyCbcModel.pyx":234
6277 * property numberObjects:
6278 * def __get__(self):
6279 * return self.CppSelf.numberObjects() # <<<<<<<<<<<<<<
6280 *
6281 * property integerTolerance:
6282 */
6283 __Pyx_XDECREF(__pyx_r);
6284 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->numberObjects()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
6285 __Pyx_GOTREF(__pyx_t_1);
6286 __pyx_r = __pyx_t_1;
6287 __pyx_t_1 = 0;
6288 goto __pyx_L0;
6289
6290 /* "cylp/cy/CyCbcModel.pyx":233
6291 *
6292 * property numberObjects:
6293 * def __get__(self): # <<<<<<<<<<<<<<
6294 * return self.CppSelf.numberObjects()
6295 *
6296 */
6297
6298 /* function exit code */
6299 __pyx_L1_error:;
6300 __Pyx_XDECREF(__pyx_t_1);
6301 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.numberObjects.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6302 __pyx_r = NULL;
6303 __pyx_L0:;
6304 __Pyx_XGIVEREF(__pyx_r);
6305 __Pyx_RefNannyFinishContext();
6306 return __pyx_r;
6307 }
6308
6309 /* "cylp/cy/CyCbcModel.pyx":237
6310 *
6311 * property integerTolerance:
6312 * def __get__(self): # <<<<<<<<<<<<<<
6313 * return self.CppSelf.getIntegerTolerance()
6314 *
6315 */
6316
6317 /* Python wrapper */
6318 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_1__get__(PyObject * __pyx_v_self)6319 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_1__get__(PyObject *__pyx_v_self) {
6320 PyObject *__pyx_r = 0;
6321 __Pyx_RefNannyDeclarations
6322 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6323 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6324
6325 /* function exit code */
6326 __Pyx_RefNannyFinishContext();
6327 return __pyx_r;
6328 }
6329
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6330 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6331 PyObject *__pyx_r = NULL;
6332 __Pyx_RefNannyDeclarations
6333 PyObject *__pyx_t_1 = NULL;
6334 int __pyx_lineno = 0;
6335 const char *__pyx_filename = NULL;
6336 int __pyx_clineno = 0;
6337 __Pyx_RefNannySetupContext("__get__", 0);
6338
6339 /* "cylp/cy/CyCbcModel.pyx":238
6340 * property integerTolerance:
6341 * def __get__(self):
6342 * return self.CppSelf.getIntegerTolerance() # <<<<<<<<<<<<<<
6343 *
6344 * def __set__(self, value):
6345 */
6346 __Pyx_XDECREF(__pyx_r);
6347 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getIntegerTolerance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
6348 __Pyx_GOTREF(__pyx_t_1);
6349 __pyx_r = __pyx_t_1;
6350 __pyx_t_1 = 0;
6351 goto __pyx_L0;
6352
6353 /* "cylp/cy/CyCbcModel.pyx":237
6354 *
6355 * property integerTolerance:
6356 * def __get__(self): # <<<<<<<<<<<<<<
6357 * return self.CppSelf.getIntegerTolerance()
6358 *
6359 */
6360
6361 /* function exit code */
6362 __pyx_L1_error:;
6363 __Pyx_XDECREF(__pyx_t_1);
6364 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.integerTolerance.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6365 __pyx_r = NULL;
6366 __pyx_L0:;
6367 __Pyx_XGIVEREF(__pyx_r);
6368 __Pyx_RefNannyFinishContext();
6369 return __pyx_r;
6370 }
6371
6372 /* "cylp/cy/CyCbcModel.pyx":240
6373 * return self.CppSelf.getIntegerTolerance()
6374 *
6375 * def __set__(self, value): # <<<<<<<<<<<<<<
6376 * self.CppSelf.setIntegerTolerance(value)
6377 *
6378 */
6379
6380 /* Python wrapper */
6381 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6382 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6383 int __pyx_r;
6384 __Pyx_RefNannyDeclarations
6385 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6386 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_2__set__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6387
6388 /* function exit code */
6389 __Pyx_RefNannyFinishContext();
6390 return __pyx_r;
6391 }
6392
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_value)6393 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value) {
6394 int __pyx_r;
6395 __Pyx_RefNannyDeclarations
6396 double __pyx_t_1;
6397 int __pyx_lineno = 0;
6398 const char *__pyx_filename = NULL;
6399 int __pyx_clineno = 0;
6400 __Pyx_RefNannySetupContext("__set__", 0);
6401
6402 /* "cylp/cy/CyCbcModel.pyx":241
6403 *
6404 * def __set__(self, value):
6405 * self.CppSelf.setIntegerTolerance(value) # <<<<<<<<<<<<<<
6406 *
6407 * property maximumSeconds:
6408 */
6409 __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L1_error)
6410 (void)(__pyx_v_self->CppSelf->setIntegerTolerance(__pyx_t_1));
6411
6412 /* "cylp/cy/CyCbcModel.pyx":240
6413 * return self.CppSelf.getIntegerTolerance()
6414 *
6415 * def __set__(self, value): # <<<<<<<<<<<<<<
6416 * self.CppSelf.setIntegerTolerance(value)
6417 *
6418 */
6419
6420 /* function exit code */
6421 __pyx_r = 0;
6422 goto __pyx_L0;
6423 __pyx_L1_error:;
6424 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.integerTolerance.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6425 __pyx_r = -1;
6426 __pyx_L0:;
6427 __Pyx_RefNannyFinishContext();
6428 return __pyx_r;
6429 }
6430
6431 /* "cylp/cy/CyCbcModel.pyx":244
6432 *
6433 * property maximumSeconds:
6434 * def __get__(self): # <<<<<<<<<<<<<<
6435 * return self.CppSelf.getMaximumSeconds()
6436 *
6437 */
6438
6439 /* Python wrapper */
6440 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_1__get__(PyObject * __pyx_v_self)6441 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_1__get__(PyObject *__pyx_v_self) {
6442 PyObject *__pyx_r = 0;
6443 __Pyx_RefNannyDeclarations
6444 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6445 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6446
6447 /* function exit code */
6448 __Pyx_RefNannyFinishContext();
6449 return __pyx_r;
6450 }
6451
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6452 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6453 PyObject *__pyx_r = NULL;
6454 __Pyx_RefNannyDeclarations
6455 PyObject *__pyx_t_1 = NULL;
6456 int __pyx_lineno = 0;
6457 const char *__pyx_filename = NULL;
6458 int __pyx_clineno = 0;
6459 __Pyx_RefNannySetupContext("__get__", 0);
6460
6461 /* "cylp/cy/CyCbcModel.pyx":245
6462 * property maximumSeconds:
6463 * def __get__(self):
6464 * return self.CppSelf.getMaximumSeconds() # <<<<<<<<<<<<<<
6465 *
6466 * def __set__(self, value):
6467 */
6468 __Pyx_XDECREF(__pyx_r);
6469 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getMaximumSeconds()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
6470 __Pyx_GOTREF(__pyx_t_1);
6471 __pyx_r = __pyx_t_1;
6472 __pyx_t_1 = 0;
6473 goto __pyx_L0;
6474
6475 /* "cylp/cy/CyCbcModel.pyx":244
6476 *
6477 * property maximumSeconds:
6478 * def __get__(self): # <<<<<<<<<<<<<<
6479 * return self.CppSelf.getMaximumSeconds()
6480 *
6481 */
6482
6483 /* function exit code */
6484 __pyx_L1_error:;
6485 __Pyx_XDECREF(__pyx_t_1);
6486 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.maximumSeconds.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6487 __pyx_r = NULL;
6488 __pyx_L0:;
6489 __Pyx_XGIVEREF(__pyx_r);
6490 __Pyx_RefNannyFinishContext();
6491 return __pyx_r;
6492 }
6493
6494 /* "cylp/cy/CyCbcModel.pyx":247
6495 * return self.CppSelf.getMaximumSeconds()
6496 *
6497 * def __set__(self, value): # <<<<<<<<<<<<<<
6498 * self.CppSelf.setMaximumSeconds(value)
6499 *
6500 */
6501
6502 /* Python wrapper */
6503 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6504 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6505 int __pyx_r;
6506 __Pyx_RefNannyDeclarations
6507 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6508 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_2__set__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6509
6510 /* function exit code */
6511 __Pyx_RefNannyFinishContext();
6512 return __pyx_r;
6513 }
6514
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_value)6515 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value) {
6516 int __pyx_r;
6517 __Pyx_RefNannyDeclarations
6518 double __pyx_t_1;
6519 int __pyx_lineno = 0;
6520 const char *__pyx_filename = NULL;
6521 int __pyx_clineno = 0;
6522 __Pyx_RefNannySetupContext("__set__", 0);
6523
6524 /* "cylp/cy/CyCbcModel.pyx":248
6525 *
6526 * def __set__(self, value):
6527 * self.CppSelf.setMaximumSeconds(value) # <<<<<<<<<<<<<<
6528 *
6529 * property maximumNodes:
6530 */
6531 __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L1_error)
6532 (void)(__pyx_v_self->CppSelf->setMaximumSeconds(__pyx_t_1));
6533
6534 /* "cylp/cy/CyCbcModel.pyx":247
6535 * return self.CppSelf.getMaximumSeconds()
6536 *
6537 * def __set__(self, value): # <<<<<<<<<<<<<<
6538 * self.CppSelf.setMaximumSeconds(value)
6539 *
6540 */
6541
6542 /* function exit code */
6543 __pyx_r = 0;
6544 goto __pyx_L0;
6545 __pyx_L1_error:;
6546 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.maximumSeconds.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6547 __pyx_r = -1;
6548 __pyx_L0:;
6549 __Pyx_RefNannyFinishContext();
6550 return __pyx_r;
6551 }
6552
6553 /* "cylp/cy/CyCbcModel.pyx":251
6554 *
6555 * property maximumNodes:
6556 * def __get__(self): # <<<<<<<<<<<<<<
6557 * return self.CppSelf.getMaximumNodes()
6558 *
6559 */
6560
6561 /* Python wrapper */
6562 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_1__get__(PyObject * __pyx_v_self)6563 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_1__get__(PyObject *__pyx_v_self) {
6564 PyObject *__pyx_r = 0;
6565 __Pyx_RefNannyDeclarations
6566 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6567 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6568
6569 /* function exit code */
6570 __Pyx_RefNannyFinishContext();
6571 return __pyx_r;
6572 }
6573
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6574 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6575 PyObject *__pyx_r = NULL;
6576 __Pyx_RefNannyDeclarations
6577 PyObject *__pyx_t_1 = NULL;
6578 int __pyx_lineno = 0;
6579 const char *__pyx_filename = NULL;
6580 int __pyx_clineno = 0;
6581 __Pyx_RefNannySetupContext("__get__", 0);
6582
6583 /* "cylp/cy/CyCbcModel.pyx":252
6584 * property maximumNodes:
6585 * def __get__(self):
6586 * return self.CppSelf.getMaximumNodes() # <<<<<<<<<<<<<<
6587 *
6588 * def __set__(self, value):
6589 */
6590 __Pyx_XDECREF(__pyx_r);
6591 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumNodes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
6592 __Pyx_GOTREF(__pyx_t_1);
6593 __pyx_r = __pyx_t_1;
6594 __pyx_t_1 = 0;
6595 goto __pyx_L0;
6596
6597 /* "cylp/cy/CyCbcModel.pyx":251
6598 *
6599 * property maximumNodes:
6600 * def __get__(self): # <<<<<<<<<<<<<<
6601 * return self.CppSelf.getMaximumNodes()
6602 *
6603 */
6604
6605 /* function exit code */
6606 __pyx_L1_error:;
6607 __Pyx_XDECREF(__pyx_t_1);
6608 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.maximumNodes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6609 __pyx_r = NULL;
6610 __pyx_L0:;
6611 __Pyx_XGIVEREF(__pyx_r);
6612 __Pyx_RefNannyFinishContext();
6613 return __pyx_r;
6614 }
6615
6616 /* "cylp/cy/CyCbcModel.pyx":254
6617 * return self.CppSelf.getMaximumNodes()
6618 *
6619 * def __set__(self, value): # <<<<<<<<<<<<<<
6620 * self.CppSelf.setMaximumNodes(value)
6621 *
6622 */
6623
6624 /* Python wrapper */
6625 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6626 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6627 int __pyx_r;
6628 __Pyx_RefNannyDeclarations
6629 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6630 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_2__set__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6631
6632 /* function exit code */
6633 __Pyx_RefNannyFinishContext();
6634 return __pyx_r;
6635 }
6636
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_value)6637 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value) {
6638 int __pyx_r;
6639 __Pyx_RefNannyDeclarations
6640 int __pyx_t_1;
6641 int __pyx_lineno = 0;
6642 const char *__pyx_filename = NULL;
6643 int __pyx_clineno = 0;
6644 __Pyx_RefNannySetupContext("__set__", 0);
6645
6646 /* "cylp/cy/CyCbcModel.pyx":255
6647 *
6648 * def __set__(self, value):
6649 * self.CppSelf.setMaximumNodes(value) # <<<<<<<<<<<<<<
6650 *
6651 * property numberThreads:
6652 */
6653 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 255, __pyx_L1_error)
6654 (void)(__pyx_v_self->CppSelf->setMaximumNodes(__pyx_t_1));
6655
6656 /* "cylp/cy/CyCbcModel.pyx":254
6657 * return self.CppSelf.getMaximumNodes()
6658 *
6659 * def __set__(self, value): # <<<<<<<<<<<<<<
6660 * self.CppSelf.setMaximumNodes(value)
6661 *
6662 */
6663
6664 /* function exit code */
6665 __pyx_r = 0;
6666 goto __pyx_L0;
6667 __pyx_L1_error:;
6668 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.maximumNodes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6669 __pyx_r = -1;
6670 __pyx_L0:;
6671 __Pyx_RefNannyFinishContext();
6672 return __pyx_r;
6673 }
6674
6675 /* "cylp/cy/CyCbcModel.pyx":258
6676 *
6677 * property numberThreads:
6678 * def __get__(self): # <<<<<<<<<<<<<<
6679 * return self.CppSelf.getNumberThreads()
6680 *
6681 */
6682
6683 /* Python wrapper */
6684 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_1__get__(PyObject * __pyx_v_self)6685 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_1__get__(PyObject *__pyx_v_self) {
6686 PyObject *__pyx_r = 0;
6687 __Pyx_RefNannyDeclarations
6688 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6689 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6690
6691 /* function exit code */
6692 __Pyx_RefNannyFinishContext();
6693 return __pyx_r;
6694 }
6695
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6696 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6697 PyObject *__pyx_r = NULL;
6698 __Pyx_RefNannyDeclarations
6699 PyObject *__pyx_t_1 = NULL;
6700 int __pyx_lineno = 0;
6701 const char *__pyx_filename = NULL;
6702 int __pyx_clineno = 0;
6703 __Pyx_RefNannySetupContext("__get__", 0);
6704
6705 /* "cylp/cy/CyCbcModel.pyx":259
6706 * property numberThreads:
6707 * def __get__(self):
6708 * return self.CppSelf.getNumberThreads() # <<<<<<<<<<<<<<
6709 *
6710 * def __set__(self, value):
6711 */
6712 __Pyx_XDECREF(__pyx_r);
6713 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberThreads()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
6714 __Pyx_GOTREF(__pyx_t_1);
6715 __pyx_r = __pyx_t_1;
6716 __pyx_t_1 = 0;
6717 goto __pyx_L0;
6718
6719 /* "cylp/cy/CyCbcModel.pyx":258
6720 *
6721 * property numberThreads:
6722 * def __get__(self): # <<<<<<<<<<<<<<
6723 * return self.CppSelf.getNumberThreads()
6724 *
6725 */
6726
6727 /* function exit code */
6728 __pyx_L1_error:;
6729 __Pyx_XDECREF(__pyx_t_1);
6730 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.numberThreads.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6731 __pyx_r = NULL;
6732 __pyx_L0:;
6733 __Pyx_XGIVEREF(__pyx_r);
6734 __Pyx_RefNannyFinishContext();
6735 return __pyx_r;
6736 }
6737
6738 /* "cylp/cy/CyCbcModel.pyx":261
6739 * return self.CppSelf.getNumberThreads()
6740 *
6741 * def __set__(self, value): # <<<<<<<<<<<<<<
6742 * self.CppSelf.setNumberThreads(value)
6743 *
6744 */
6745
6746 /* Python wrapper */
6747 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6748 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6749 int __pyx_r;
6750 __Pyx_RefNannyDeclarations
6751 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6752 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_2__set__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6753
6754 /* function exit code */
6755 __Pyx_RefNannyFinishContext();
6756 return __pyx_r;
6757 }
6758
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_value)6759 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value) {
6760 int __pyx_r;
6761 __Pyx_RefNannyDeclarations
6762 int __pyx_t_1;
6763 int __pyx_lineno = 0;
6764 const char *__pyx_filename = NULL;
6765 int __pyx_clineno = 0;
6766 __Pyx_RefNannySetupContext("__set__", 0);
6767
6768 /* "cylp/cy/CyCbcModel.pyx":262
6769 *
6770 * def __set__(self, value):
6771 * self.CppSelf.setNumberThreads(value) # <<<<<<<<<<<<<<
6772 *
6773 * property allowableGap:
6774 */
6775 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 262, __pyx_L1_error)
6776 __pyx_v_self->CppSelf->setNumberThreads(__pyx_t_1);
6777
6778 /* "cylp/cy/CyCbcModel.pyx":261
6779 * return self.CppSelf.getNumberThreads()
6780 *
6781 * def __set__(self, value): # <<<<<<<<<<<<<<
6782 * self.CppSelf.setNumberThreads(value)
6783 *
6784 */
6785
6786 /* function exit code */
6787 __pyx_r = 0;
6788 goto __pyx_L0;
6789 __pyx_L1_error:;
6790 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.numberThreads.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6791 __pyx_r = -1;
6792 __pyx_L0:;
6793 __Pyx_RefNannyFinishContext();
6794 return __pyx_r;
6795 }
6796
6797 /* "cylp/cy/CyCbcModel.pyx":265
6798 *
6799 * property allowableGap:
6800 * def __get__(self): # <<<<<<<<<<<<<<
6801 * return self.CppSelf.getAllowableGap()
6802 *
6803 */
6804
6805 /* Python wrapper */
6806 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_1__get__(PyObject * __pyx_v_self)6807 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_1__get__(PyObject *__pyx_v_self) {
6808 PyObject *__pyx_r = 0;
6809 __Pyx_RefNannyDeclarations
6810 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6811 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6812
6813 /* function exit code */
6814 __Pyx_RefNannyFinishContext();
6815 return __pyx_r;
6816 }
6817
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6818 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6819 PyObject *__pyx_r = NULL;
6820 __Pyx_RefNannyDeclarations
6821 PyObject *__pyx_t_1 = NULL;
6822 int __pyx_lineno = 0;
6823 const char *__pyx_filename = NULL;
6824 int __pyx_clineno = 0;
6825 __Pyx_RefNannySetupContext("__get__", 0);
6826
6827 /* "cylp/cy/CyCbcModel.pyx":266
6828 * property allowableGap:
6829 * def __get__(self):
6830 * return self.CppSelf.getAllowableGap() # <<<<<<<<<<<<<<
6831 *
6832 * def __set__(self, value):
6833 */
6834 __Pyx_XDECREF(__pyx_r);
6835 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
6836 __Pyx_GOTREF(__pyx_t_1);
6837 __pyx_r = __pyx_t_1;
6838 __pyx_t_1 = 0;
6839 goto __pyx_L0;
6840
6841 /* "cylp/cy/CyCbcModel.pyx":265
6842 *
6843 * property allowableGap:
6844 * def __get__(self): # <<<<<<<<<<<<<<
6845 * return self.CppSelf.getAllowableGap()
6846 *
6847 */
6848
6849 /* function exit code */
6850 __pyx_L1_error:;
6851 __Pyx_XDECREF(__pyx_t_1);
6852 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.allowableGap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6853 __pyx_r = NULL;
6854 __pyx_L0:;
6855 __Pyx_XGIVEREF(__pyx_r);
6856 __Pyx_RefNannyFinishContext();
6857 return __pyx_r;
6858 }
6859
6860 /* "cylp/cy/CyCbcModel.pyx":268
6861 * return self.CppSelf.getAllowableGap()
6862 *
6863 * def __set__(self, value): # <<<<<<<<<<<<<<
6864 * self.CppSelf.setAllowableGap(value)
6865 *
6866 */
6867
6868 /* Python wrapper */
6869 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6870 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6871 int __pyx_r;
6872 __Pyx_RefNannyDeclarations
6873 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6874 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_2__set__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6875
6876 /* function exit code */
6877 __Pyx_RefNannyFinishContext();
6878 return __pyx_r;
6879 }
6880
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_value)6881 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value) {
6882 int __pyx_r;
6883 __Pyx_RefNannyDeclarations
6884 double __pyx_t_1;
6885 int __pyx_lineno = 0;
6886 const char *__pyx_filename = NULL;
6887 int __pyx_clineno = 0;
6888 __Pyx_RefNannySetupContext("__set__", 0);
6889
6890 /* "cylp/cy/CyCbcModel.pyx":269
6891 *
6892 * def __set__(self, value):
6893 * self.CppSelf.setAllowableGap(value) # <<<<<<<<<<<<<<
6894 *
6895 * property allowableFractionGap:
6896 */
6897 __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error)
6898 __pyx_v_self->CppSelf->setAllowableGap(__pyx_t_1);
6899
6900 /* "cylp/cy/CyCbcModel.pyx":268
6901 * return self.CppSelf.getAllowableGap()
6902 *
6903 * def __set__(self, value): # <<<<<<<<<<<<<<
6904 * self.CppSelf.setAllowableGap(value)
6905 *
6906 */
6907
6908 /* function exit code */
6909 __pyx_r = 0;
6910 goto __pyx_L0;
6911 __pyx_L1_error:;
6912 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.allowableGap.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6913 __pyx_r = -1;
6914 __pyx_L0:;
6915 __Pyx_RefNannyFinishContext();
6916 return __pyx_r;
6917 }
6918
6919 /* "cylp/cy/CyCbcModel.pyx":272
6920 *
6921 * property allowableFractionGap:
6922 * def __get__(self): # <<<<<<<<<<<<<<
6923 * return self.CppSelf.getAllowableFractionGap()
6924 *
6925 */
6926
6927 /* Python wrapper */
6928 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_1__get__(PyObject * __pyx_v_self)6929 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_1__get__(PyObject *__pyx_v_self) {
6930 PyObject *__pyx_r = 0;
6931 __Pyx_RefNannyDeclarations
6932 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6933 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
6934
6935 /* function exit code */
6936 __Pyx_RefNannyFinishContext();
6937 return __pyx_r;
6938 }
6939
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)6940 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
6941 PyObject *__pyx_r = NULL;
6942 __Pyx_RefNannyDeclarations
6943 PyObject *__pyx_t_1 = NULL;
6944 int __pyx_lineno = 0;
6945 const char *__pyx_filename = NULL;
6946 int __pyx_clineno = 0;
6947 __Pyx_RefNannySetupContext("__get__", 0);
6948
6949 /* "cylp/cy/CyCbcModel.pyx":273
6950 * property allowableFractionGap:
6951 * def __get__(self):
6952 * return self.CppSelf.getAllowableFractionGap() # <<<<<<<<<<<<<<
6953 *
6954 * def __set__(self, value):
6955 */
6956 __Pyx_XDECREF(__pyx_r);
6957 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableFractionGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
6958 __Pyx_GOTREF(__pyx_t_1);
6959 __pyx_r = __pyx_t_1;
6960 __pyx_t_1 = 0;
6961 goto __pyx_L0;
6962
6963 /* "cylp/cy/CyCbcModel.pyx":272
6964 *
6965 * property allowableFractionGap:
6966 * def __get__(self): # <<<<<<<<<<<<<<
6967 * return self.CppSelf.getAllowableFractionGap()
6968 *
6969 */
6970
6971 /* function exit code */
6972 __pyx_L1_error:;
6973 __Pyx_XDECREF(__pyx_t_1);
6974 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.allowableFractionGap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6975 __pyx_r = NULL;
6976 __pyx_L0:;
6977 __Pyx_XGIVEREF(__pyx_r);
6978 __Pyx_RefNannyFinishContext();
6979 return __pyx_r;
6980 }
6981
6982 /* "cylp/cy/CyCbcModel.pyx":275
6983 * return self.CppSelf.getAllowableFractionGap()
6984 *
6985 * def __set__(self, value): # <<<<<<<<<<<<<<
6986 * self.CppSelf.setAllowableFractionGap(value)
6987 *
6988 */
6989
6990 /* Python wrapper */
6991 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)6992 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6993 int __pyx_r;
6994 __Pyx_RefNannyDeclarations
6995 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6996 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_2__set__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6997
6998 /* function exit code */
6999 __Pyx_RefNannyFinishContext();
7000 return __pyx_r;
7001 }
7002
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_value)7003 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value) {
7004 int __pyx_r;
7005 __Pyx_RefNannyDeclarations
7006 double __pyx_t_1;
7007 int __pyx_lineno = 0;
7008 const char *__pyx_filename = NULL;
7009 int __pyx_clineno = 0;
7010 __Pyx_RefNannySetupContext("__set__", 0);
7011
7012 /* "cylp/cy/CyCbcModel.pyx":276
7013 *
7014 * def __set__(self, value):
7015 * self.CppSelf.setAllowableFractionGap(value) # <<<<<<<<<<<<<<
7016 *
7017 * property allowablePercentageGap:
7018 */
7019 __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error)
7020 __pyx_v_self->CppSelf->setAllowableFractionGap(__pyx_t_1);
7021
7022 /* "cylp/cy/CyCbcModel.pyx":275
7023 * return self.CppSelf.getAllowableFractionGap()
7024 *
7025 * def __set__(self, value): # <<<<<<<<<<<<<<
7026 * self.CppSelf.setAllowableFractionGap(value)
7027 *
7028 */
7029
7030 /* function exit code */
7031 __pyx_r = 0;
7032 goto __pyx_L0;
7033 __pyx_L1_error:;
7034 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.allowableFractionGap.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7035 __pyx_r = -1;
7036 __pyx_L0:;
7037 __Pyx_RefNannyFinishContext();
7038 return __pyx_r;
7039 }
7040
7041 /* "cylp/cy/CyCbcModel.pyx":279
7042 *
7043 * property allowablePercentageGap:
7044 * def __get__(self): # <<<<<<<<<<<<<<
7045 * return self.CppSelf.getAllowablePercentageGap()
7046 *
7047 */
7048
7049 /* Python wrapper */
7050 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_1__get__(PyObject * __pyx_v_self)7051 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_1__get__(PyObject *__pyx_v_self) {
7052 PyObject *__pyx_r = 0;
7053 __Pyx_RefNannyDeclarations
7054 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7055 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
7056
7057 /* function exit code */
7058 __Pyx_RefNannyFinishContext();
7059 return __pyx_r;
7060 }
7061
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)7062 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
7063 PyObject *__pyx_r = NULL;
7064 __Pyx_RefNannyDeclarations
7065 PyObject *__pyx_t_1 = NULL;
7066 int __pyx_lineno = 0;
7067 const char *__pyx_filename = NULL;
7068 int __pyx_clineno = 0;
7069 __Pyx_RefNannySetupContext("__get__", 0);
7070
7071 /* "cylp/cy/CyCbcModel.pyx":280
7072 * property allowablePercentageGap:
7073 * def __get__(self):
7074 * return self.CppSelf.getAllowablePercentageGap() # <<<<<<<<<<<<<<
7075 *
7076 * def __set__(self, value):
7077 */
7078 __Pyx_XDECREF(__pyx_r);
7079 __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowablePercentageGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
7080 __Pyx_GOTREF(__pyx_t_1);
7081 __pyx_r = __pyx_t_1;
7082 __pyx_t_1 = 0;
7083 goto __pyx_L0;
7084
7085 /* "cylp/cy/CyCbcModel.pyx":279
7086 *
7087 * property allowablePercentageGap:
7088 * def __get__(self): # <<<<<<<<<<<<<<
7089 * return self.CppSelf.getAllowablePercentageGap()
7090 *
7091 */
7092
7093 /* function exit code */
7094 __pyx_L1_error:;
7095 __Pyx_XDECREF(__pyx_t_1);
7096 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.allowablePercentageGap.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7097 __pyx_r = NULL;
7098 __pyx_L0:;
7099 __Pyx_XGIVEREF(__pyx_r);
7100 __Pyx_RefNannyFinishContext();
7101 return __pyx_r;
7102 }
7103
7104 /* "cylp/cy/CyCbcModel.pyx":282
7105 * return self.CppSelf.getAllowablePercentageGap()
7106 *
7107 * def __set__(self, value): # <<<<<<<<<<<<<<
7108 * self.CppSelf.setAllowablePercentageGap(value)
7109 *
7110 */
7111
7112 /* Python wrapper */
7113 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)7114 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7115 int __pyx_r;
7116 __Pyx_RefNannyDeclarations
7117 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7118 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_2__set__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7119
7120 /* function exit code */
7121 __Pyx_RefNannyFinishContext();
7122 return __pyx_r;
7123 }
7124
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_value)7125 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value) {
7126 int __pyx_r;
7127 __Pyx_RefNannyDeclarations
7128 double __pyx_t_1;
7129 int __pyx_lineno = 0;
7130 const char *__pyx_filename = NULL;
7131 int __pyx_clineno = 0;
7132 __Pyx_RefNannySetupContext("__set__", 0);
7133
7134 /* "cylp/cy/CyCbcModel.pyx":283
7135 *
7136 * def __set__(self, value):
7137 * self.CppSelf.setAllowablePercentageGap(value) # <<<<<<<<<<<<<<
7138 *
7139 * property maximumSolutions:
7140 */
7141 __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L1_error)
7142 __pyx_v_self->CppSelf->setAllowablePercentageGap(__pyx_t_1);
7143
7144 /* "cylp/cy/CyCbcModel.pyx":282
7145 * return self.CppSelf.getAllowablePercentageGap()
7146 *
7147 * def __set__(self, value): # <<<<<<<<<<<<<<
7148 * self.CppSelf.setAllowablePercentageGap(value)
7149 *
7150 */
7151
7152 /* function exit code */
7153 __pyx_r = 0;
7154 goto __pyx_L0;
7155 __pyx_L1_error:;
7156 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.allowablePercentageGap.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7157 __pyx_r = -1;
7158 __pyx_L0:;
7159 __Pyx_RefNannyFinishContext();
7160 return __pyx_r;
7161 }
7162
7163 /* "cylp/cy/CyCbcModel.pyx":286
7164 *
7165 * property maximumSolutions:
7166 * def __get__(self): # <<<<<<<<<<<<<<
7167 * return self.CppSelf.getMaximumSolutions()
7168 *
7169 */
7170
7171 /* Python wrapper */
7172 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_1__get__(PyObject *__pyx_v_self); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_1__get__(PyObject * __pyx_v_self)7173 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_1__get__(PyObject *__pyx_v_self) {
7174 PyObject *__pyx_r = 0;
7175 __Pyx_RefNannyDeclarations
7176 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7177 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions___get__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
7178
7179 /* function exit code */
7180 __Pyx_RefNannyFinishContext();
7181 return __pyx_r;
7182 }
7183
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)7184 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
7185 PyObject *__pyx_r = NULL;
7186 __Pyx_RefNannyDeclarations
7187 PyObject *__pyx_t_1 = NULL;
7188 int __pyx_lineno = 0;
7189 const char *__pyx_filename = NULL;
7190 int __pyx_clineno = 0;
7191 __Pyx_RefNannySetupContext("__get__", 0);
7192
7193 /* "cylp/cy/CyCbcModel.pyx":287
7194 * property maximumSolutions:
7195 * def __get__(self):
7196 * return self.CppSelf.getMaximumSolutions() # <<<<<<<<<<<<<<
7197 *
7198 * def __set__(self, value):
7199 */
7200 __Pyx_XDECREF(__pyx_r);
7201 __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
7202 __Pyx_GOTREF(__pyx_t_1);
7203 __pyx_r = __pyx_t_1;
7204 __pyx_t_1 = 0;
7205 goto __pyx_L0;
7206
7207 /* "cylp/cy/CyCbcModel.pyx":286
7208 *
7209 * property maximumSolutions:
7210 * def __get__(self): # <<<<<<<<<<<<<<
7211 * return self.CppSelf.getMaximumSolutions()
7212 *
7213 */
7214
7215 /* function exit code */
7216 __pyx_L1_error:;
7217 __Pyx_XDECREF(__pyx_t_1);
7218 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.maximumSolutions.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7219 __pyx_r = NULL;
7220 __pyx_L0:;
7221 __Pyx_XGIVEREF(__pyx_r);
7222 __Pyx_RefNannyFinishContext();
7223 return __pyx_r;
7224 }
7225
7226 /* "cylp/cy/CyCbcModel.pyx":289
7227 * return self.CppSelf.getMaximumSolutions()
7228 *
7229 * def __set__(self, value): # <<<<<<<<<<<<<<
7230 * self.CppSelf.setMaximumSolutions(value)
7231 *
7232 */
7233
7234 /* Python wrapper */
7235 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_3__set__(PyObject * __pyx_v_self,PyObject * __pyx_v_value)7236 static int __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7237 int __pyx_r;
7238 __Pyx_RefNannyDeclarations
7239 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7240 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_2__set__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7241
7242 /* function exit code */
7243 __Pyx_RefNannyFinishContext();
7244 return __pyx_r;
7245 }
7246
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,PyObject * __pyx_v_value)7247 static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value) {
7248 int __pyx_r;
7249 __Pyx_RefNannyDeclarations
7250 int __pyx_t_1;
7251 int __pyx_lineno = 0;
7252 const char *__pyx_filename = NULL;
7253 int __pyx_clineno = 0;
7254 __Pyx_RefNannySetupContext("__set__", 0);
7255
7256 /* "cylp/cy/CyCbcModel.pyx":290
7257 *
7258 * def __set__(self, value):
7259 * self.CppSelf.setMaximumSolutions(value) # <<<<<<<<<<<<<<
7260 *
7261 *
7262 */
7263 __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L1_error)
7264 (void)(__pyx_v_self->CppSelf->setMaximumSolutions(__pyx_t_1));
7265
7266 /* "cylp/cy/CyCbcModel.pyx":289
7267 * return self.CppSelf.getMaximumSolutions()
7268 *
7269 * def __set__(self, value): # <<<<<<<<<<<<<<
7270 * self.CppSelf.setMaximumSolutions(value)
7271 *
7272 */
7273
7274 /* function exit code */
7275 __pyx_r = 0;
7276 goto __pyx_L0;
7277 __pyx_L1_error:;
7278 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.maximumSolutions.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7279 __pyx_r = -1;
7280 __pyx_L0:;
7281 __Pyx_RefNannyFinishContext();
7282 return __pyx_r;
7283 }
7284
7285 /* "(tree fragment)":1
7286 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7287 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7288 * def __setstate_cython__(self, __pyx_state):
7289 */
7290
7291 /* Python wrapper */
7292 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
7293 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_20__reduce_cython__[] = "CyCbcModel.__reduce_cython__(self)";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_21__reduce_cython__(PyObject * __pyx_v_self,CYTHON_UNUSED PyObject * unused)7294 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_21__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7295 PyObject *__pyx_r = 0;
7296 __Pyx_RefNannyDeclarations
7297 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
7298 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20__reduce_cython__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self));
7299
7300 /* function exit code */
7301 __Pyx_RefNannyFinishContext();
7302 return __pyx_r;
7303 }
7304
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self)7305 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) {
7306 PyObject *__pyx_r = NULL;
7307 __Pyx_RefNannyDeclarations
7308 PyObject *__pyx_t_1 = NULL;
7309 int __pyx_lineno = 0;
7310 const char *__pyx_filename = NULL;
7311 int __pyx_clineno = 0;
7312 __Pyx_RefNannySetupContext("__reduce_cython__", 0);
7313
7314 /* "(tree fragment)":2
7315 * def __reduce_cython__(self):
7316 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
7317 * def __setstate_cython__(self, __pyx_state):
7318 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7319 */
7320 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
7321 __Pyx_GOTREF(__pyx_t_1);
7322 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7323 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7324 __PYX_ERR(1, 2, __pyx_L1_error)
7325
7326 /* "(tree fragment)":1
7327 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
7328 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7329 * def __setstate_cython__(self, __pyx_state):
7330 */
7331
7332 /* function exit code */
7333 __pyx_L1_error:;
7334 __Pyx_XDECREF(__pyx_t_1);
7335 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7336 __pyx_r = NULL;
7337 __Pyx_XGIVEREF(__pyx_r);
7338 __Pyx_RefNannyFinishContext();
7339 return __pyx_r;
7340 }
7341
7342 /* "(tree fragment)":3
7343 * def __reduce_cython__(self):
7344 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7345 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7346 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7347 */
7348
7349 /* Python wrapper */
7350 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
7351 static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cython__[] = "CyCbcModel.__setstate_cython__(self, __pyx_state)";
__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_23__setstate_cython__(PyObject * __pyx_v_self,PyObject * __pyx_v___pyx_state)7352 static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_23__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
7353 PyObject *__pyx_r = 0;
7354 __Pyx_RefNannyDeclarations
7355 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
7356 __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cython__(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
7357
7358 /* function exit code */
7359 __Pyx_RefNannyFinishContext();
7360 return __pyx_r;
7361 }
7362
__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel * __pyx_v_self,CYTHON_UNUSED PyObject * __pyx_v___pyx_state)7363 static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
7364 PyObject *__pyx_r = NULL;
7365 __Pyx_RefNannyDeclarations
7366 PyObject *__pyx_t_1 = NULL;
7367 int __pyx_lineno = 0;
7368 const char *__pyx_filename = NULL;
7369 int __pyx_clineno = 0;
7370 __Pyx_RefNannySetupContext("__setstate_cython__", 0);
7371
7372 /* "(tree fragment)":4
7373 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7374 * def __setstate_cython__(self, __pyx_state):
7375 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
7376 */
7377 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
7378 __Pyx_GOTREF(__pyx_t_1);
7379 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
7380 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7381 __PYX_ERR(1, 4, __pyx_L1_error)
7382
7383 /* "(tree fragment)":3
7384 * def __reduce_cython__(self):
7385 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7386 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
7387 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
7388 */
7389
7390 /* function exit code */
7391 __pyx_L1_error:;
7392 __Pyx_XDECREF(__pyx_t_1);
7393 __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7394 __pyx_r = NULL;
7395 __Pyx_XGIVEREF(__pyx_r);
7396 __Pyx_RefNannyFinishContext();
7397 return __pyx_r;
7398 }
7399
7400 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":258
7401 * # experimental exception made for __getbuffer__ and __releasebuffer__
7402 * # -- the details of this may change.
7403 * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
7404 * # This implementation of getbuffer is geared towards Cython
7405 * # requirements, and does not yet fulfill the PEP.
7406 */
7407
7408 /* Python wrapper */
7409 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
__pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)7410 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
7411 int __pyx_r;
7412 __Pyx_RefNannyDeclarations
7413 __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
7414 __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
7415
7416 /* function exit code */
7417 __Pyx_RefNannyFinishContext();
7418 return __pyx_r;
7419 }
7420
__pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info,int __pyx_v_flags)7421 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
7422 int __pyx_v_i;
7423 int __pyx_v_ndim;
7424 int __pyx_v_endian_detector;
7425 int __pyx_v_little_endian;
7426 int __pyx_v_t;
7427 char *__pyx_v_f;
7428 PyArray_Descr *__pyx_v_descr = 0;
7429 int __pyx_v_offset;
7430 int __pyx_r;
7431 __Pyx_RefNannyDeclarations
7432 int __pyx_t_1;
7433 int __pyx_t_2;
7434 PyObject *__pyx_t_3 = NULL;
7435 int __pyx_t_4;
7436 int __pyx_t_5;
7437 int __pyx_t_6;
7438 PyArray_Descr *__pyx_t_7;
7439 PyObject *__pyx_t_8 = NULL;
7440 char *__pyx_t_9;
7441 int __pyx_lineno = 0;
7442 const char *__pyx_filename = NULL;
7443 int __pyx_clineno = 0;
7444 if (__pyx_v_info == NULL) {
7445 PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
7446 return -1;
7447 }
7448 __Pyx_RefNannySetupContext("__getbuffer__", 0);
7449 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
7450 __Pyx_GIVEREF(__pyx_v_info->obj);
7451
7452 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":265
7453 *
7454 * cdef int i, ndim
7455 * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
7456 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
7457 *
7458 */
7459 __pyx_v_endian_detector = 1;
7460
7461 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":266
7462 * cdef int i, ndim
7463 * cdef int endian_detector = 1
7464 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
7465 *
7466 * ndim = PyArray_NDIM(self)
7467 */
7468 __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
7469
7470 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":268
7471 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
7472 *
7473 * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
7474 *
7475 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
7476 */
7477 __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
7478
7479 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270
7480 * ndim = PyArray_NDIM(self)
7481 *
7482 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
7483 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
7484 * raise ValueError(u"ndarray is not C contiguous")
7485 */
7486 __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
7487 if (__pyx_t_2) {
7488 } else {
7489 __pyx_t_1 = __pyx_t_2;
7490 goto __pyx_L4_bool_binop_done;
7491 }
7492
7493 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":271
7494 *
7495 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
7496 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
7497 * raise ValueError(u"ndarray is not C contiguous")
7498 *
7499 */
7500 __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
7501 __pyx_t_1 = __pyx_t_2;
7502 __pyx_L4_bool_binop_done:;
7503
7504 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270
7505 * ndim = PyArray_NDIM(self)
7506 *
7507 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
7508 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
7509 * raise ValueError(u"ndarray is not C contiguous")
7510 */
7511 if (unlikely(__pyx_t_1)) {
7512
7513 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":272
7514 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
7515 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
7516 * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
7517 *
7518 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
7519 */
7520 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error)
7521 __Pyx_GOTREF(__pyx_t_3);
7522 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7523 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7524 __PYX_ERR(2, 272, __pyx_L1_error)
7525
7526 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270
7527 * ndim = PyArray_NDIM(self)
7528 *
7529 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
7530 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
7531 * raise ValueError(u"ndarray is not C contiguous")
7532 */
7533 }
7534
7535 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274
7536 * raise ValueError(u"ndarray is not C contiguous")
7537 *
7538 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
7539 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
7540 * raise ValueError(u"ndarray is not Fortran contiguous")
7541 */
7542 __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
7543 if (__pyx_t_2) {
7544 } else {
7545 __pyx_t_1 = __pyx_t_2;
7546 goto __pyx_L7_bool_binop_done;
7547 }
7548
7549 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":275
7550 *
7551 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
7552 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
7553 * raise ValueError(u"ndarray is not Fortran contiguous")
7554 *
7555 */
7556 __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
7557 __pyx_t_1 = __pyx_t_2;
7558 __pyx_L7_bool_binop_done:;
7559
7560 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274
7561 * raise ValueError(u"ndarray is not C contiguous")
7562 *
7563 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
7564 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
7565 * raise ValueError(u"ndarray is not Fortran contiguous")
7566 */
7567 if (unlikely(__pyx_t_1)) {
7568
7569 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":276
7570 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
7571 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
7572 * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
7573 *
7574 * info.buf = PyArray_DATA(self)
7575 */
7576 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error)
7577 __Pyx_GOTREF(__pyx_t_3);
7578 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7579 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7580 __PYX_ERR(2, 276, __pyx_L1_error)
7581
7582 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274
7583 * raise ValueError(u"ndarray is not C contiguous")
7584 *
7585 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
7586 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
7587 * raise ValueError(u"ndarray is not Fortran contiguous")
7588 */
7589 }
7590
7591 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":278
7592 * raise ValueError(u"ndarray is not Fortran contiguous")
7593 *
7594 * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
7595 * info.ndim = ndim
7596 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
7597 */
7598 __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
7599
7600 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":279
7601 *
7602 * info.buf = PyArray_DATA(self)
7603 * info.ndim = ndim # <<<<<<<<<<<<<<
7604 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
7605 * # Allocate new buffer for strides and shape info.
7606 */
7607 __pyx_v_info->ndim = __pyx_v_ndim;
7608
7609 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":280
7610 * info.buf = PyArray_DATA(self)
7611 * info.ndim = ndim
7612 * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
7613 * # Allocate new buffer for strides and shape info.
7614 * # This is allocated as one block, strides first.
7615 */
7616 __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
7617 if (__pyx_t_1) {
7618
7619 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":283
7620 * # Allocate new buffer for strides and shape info.
7621 * # This is allocated as one block, strides first.
7622 * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
7623 * info.shape = info.strides + ndim
7624 * for i in range(ndim):
7625 */
7626 __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
7627
7628 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":284
7629 * # This is allocated as one block, strides first.
7630 * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
7631 * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
7632 * for i in range(ndim):
7633 * info.strides[i] = PyArray_STRIDES(self)[i]
7634 */
7635 __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
7636
7637 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":285
7638 * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
7639 * info.shape = info.strides + ndim
7640 * for i in range(ndim): # <<<<<<<<<<<<<<
7641 * info.strides[i] = PyArray_STRIDES(self)[i]
7642 * info.shape[i] = PyArray_DIMS(self)[i]
7643 */
7644 __pyx_t_4 = __pyx_v_ndim;
7645 __pyx_t_5 = __pyx_t_4;
7646 for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
7647 __pyx_v_i = __pyx_t_6;
7648
7649 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":286
7650 * info.shape = info.strides + ndim
7651 * for i in range(ndim):
7652 * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
7653 * info.shape[i] = PyArray_DIMS(self)[i]
7654 * else:
7655 */
7656 (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
7657
7658 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":287
7659 * for i in range(ndim):
7660 * info.strides[i] = PyArray_STRIDES(self)[i]
7661 * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
7662 * else:
7663 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
7664 */
7665 (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
7666 }
7667
7668 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":280
7669 * info.buf = PyArray_DATA(self)
7670 * info.ndim = ndim
7671 * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
7672 * # Allocate new buffer for strides and shape info.
7673 * # This is allocated as one block, strides first.
7674 */
7675 goto __pyx_L9;
7676 }
7677
7678 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":289
7679 * info.shape[i] = PyArray_DIMS(self)[i]
7680 * else:
7681 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
7682 * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
7683 * info.suboffsets = NULL
7684 */
7685 /*else*/ {
7686 __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
7687
7688 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":290
7689 * else:
7690 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
7691 * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
7692 * info.suboffsets = NULL
7693 * info.itemsize = PyArray_ITEMSIZE(self)
7694 */
7695 __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
7696 }
7697 __pyx_L9:;
7698
7699 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":291
7700 * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
7701 * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
7702 * info.suboffsets = NULL # <<<<<<<<<<<<<<
7703 * info.itemsize = PyArray_ITEMSIZE(self)
7704 * info.readonly = not PyArray_ISWRITEABLE(self)
7705 */
7706 __pyx_v_info->suboffsets = NULL;
7707
7708 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":292
7709 * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
7710 * info.suboffsets = NULL
7711 * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
7712 * info.readonly = not PyArray_ISWRITEABLE(self)
7713 *
7714 */
7715 __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
7716
7717 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":293
7718 * info.suboffsets = NULL
7719 * info.itemsize = PyArray_ITEMSIZE(self)
7720 * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
7721 *
7722 * cdef int t
7723 */
7724 __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
7725
7726 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":296
7727 *
7728 * cdef int t
7729 * cdef char* f = NULL # <<<<<<<<<<<<<<
7730 * cdef dtype descr = <dtype>PyArray_DESCR(self)
7731 * cdef int offset
7732 */
7733 __pyx_v_f = NULL;
7734
7735 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":297
7736 * cdef int t
7737 * cdef char* f = NULL
7738 * cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
7739 * cdef int offset
7740 *
7741 */
7742 __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
7743 __pyx_t_3 = ((PyObject *)__pyx_t_7);
7744 __Pyx_INCREF(__pyx_t_3);
7745 __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
7746 __pyx_t_3 = 0;
7747
7748 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":300
7749 * cdef int offset
7750 *
7751 * info.obj = self # <<<<<<<<<<<<<<
7752 *
7753 * if not PyDataType_HASFIELDS(descr):
7754 */
7755 __Pyx_INCREF(((PyObject *)__pyx_v_self));
7756 __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
7757 __Pyx_GOTREF(__pyx_v_info->obj);
7758 __Pyx_DECREF(__pyx_v_info->obj);
7759 __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
7760
7761 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":302
7762 * info.obj = self
7763 *
7764 * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
7765 * t = descr.type_num
7766 * if ((descr.byteorder == c'>' and little_endian) or
7767 */
7768 __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
7769 if (__pyx_t_1) {
7770
7771 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":303
7772 *
7773 * if not PyDataType_HASFIELDS(descr):
7774 * t = descr.type_num # <<<<<<<<<<<<<<
7775 * if ((descr.byteorder == c'>' and little_endian) or
7776 * (descr.byteorder == c'<' and not little_endian)):
7777 */
7778 __pyx_t_4 = __pyx_v_descr->type_num;
7779 __pyx_v_t = __pyx_t_4;
7780
7781 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304
7782 * if not PyDataType_HASFIELDS(descr):
7783 * t = descr.type_num
7784 * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
7785 * (descr.byteorder == c'<' and not little_endian)):
7786 * raise ValueError(u"Non-native byte order not supported")
7787 */
7788 __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
7789 if (!__pyx_t_2) {
7790 goto __pyx_L15_next_or;
7791 } else {
7792 }
7793 __pyx_t_2 = (__pyx_v_little_endian != 0);
7794 if (!__pyx_t_2) {
7795 } else {
7796 __pyx_t_1 = __pyx_t_2;
7797 goto __pyx_L14_bool_binop_done;
7798 }
7799 __pyx_L15_next_or:;
7800
7801 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":305
7802 * t = descr.type_num
7803 * if ((descr.byteorder == c'>' and little_endian) or
7804 * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
7805 * raise ValueError(u"Non-native byte order not supported")
7806 * if t == NPY_BYTE: f = "b"
7807 */
7808 __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
7809 if (__pyx_t_2) {
7810 } else {
7811 __pyx_t_1 = __pyx_t_2;
7812 goto __pyx_L14_bool_binop_done;
7813 }
7814 __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
7815 __pyx_t_1 = __pyx_t_2;
7816 __pyx_L14_bool_binop_done:;
7817
7818 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304
7819 * if not PyDataType_HASFIELDS(descr):
7820 * t = descr.type_num
7821 * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
7822 * (descr.byteorder == c'<' and not little_endian)):
7823 * raise ValueError(u"Non-native byte order not supported")
7824 */
7825 if (unlikely(__pyx_t_1)) {
7826
7827 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":306
7828 * if ((descr.byteorder == c'>' and little_endian) or
7829 * (descr.byteorder == c'<' and not little_endian)):
7830 * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
7831 * if t == NPY_BYTE: f = "b"
7832 * elif t == NPY_UBYTE: f = "B"
7833 */
7834 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error)
7835 __Pyx_GOTREF(__pyx_t_3);
7836 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
7837 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7838 __PYX_ERR(2, 306, __pyx_L1_error)
7839
7840 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304
7841 * if not PyDataType_HASFIELDS(descr):
7842 * t = descr.type_num
7843 * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
7844 * (descr.byteorder == c'<' and not little_endian)):
7845 * raise ValueError(u"Non-native byte order not supported")
7846 */
7847 }
7848
7849 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":307
7850 * (descr.byteorder == c'<' and not little_endian)):
7851 * raise ValueError(u"Non-native byte order not supported")
7852 * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
7853 * elif t == NPY_UBYTE: f = "B"
7854 * elif t == NPY_SHORT: f = "h"
7855 */
7856 switch (__pyx_v_t) {
7857 case NPY_BYTE:
7858 __pyx_v_f = ((char *)"b");
7859 break;
7860 case NPY_UBYTE:
7861
7862 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":308
7863 * raise ValueError(u"Non-native byte order not supported")
7864 * if t == NPY_BYTE: f = "b"
7865 * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
7866 * elif t == NPY_SHORT: f = "h"
7867 * elif t == NPY_USHORT: f = "H"
7868 */
7869 __pyx_v_f = ((char *)"B");
7870 break;
7871 case NPY_SHORT:
7872
7873 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":309
7874 * if t == NPY_BYTE: f = "b"
7875 * elif t == NPY_UBYTE: f = "B"
7876 * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
7877 * elif t == NPY_USHORT: f = "H"
7878 * elif t == NPY_INT: f = "i"
7879 */
7880 __pyx_v_f = ((char *)"h");
7881 break;
7882 case NPY_USHORT:
7883
7884 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":310
7885 * elif t == NPY_UBYTE: f = "B"
7886 * elif t == NPY_SHORT: f = "h"
7887 * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
7888 * elif t == NPY_INT: f = "i"
7889 * elif t == NPY_UINT: f = "I"
7890 */
7891 __pyx_v_f = ((char *)"H");
7892 break;
7893 case NPY_INT:
7894
7895 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":311
7896 * elif t == NPY_SHORT: f = "h"
7897 * elif t == NPY_USHORT: f = "H"
7898 * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
7899 * elif t == NPY_UINT: f = "I"
7900 * elif t == NPY_LONG: f = "l"
7901 */
7902 __pyx_v_f = ((char *)"i");
7903 break;
7904 case NPY_UINT:
7905
7906 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":312
7907 * elif t == NPY_USHORT: f = "H"
7908 * elif t == NPY_INT: f = "i"
7909 * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
7910 * elif t == NPY_LONG: f = "l"
7911 * elif t == NPY_ULONG: f = "L"
7912 */
7913 __pyx_v_f = ((char *)"I");
7914 break;
7915 case NPY_LONG:
7916
7917 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":313
7918 * elif t == NPY_INT: f = "i"
7919 * elif t == NPY_UINT: f = "I"
7920 * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
7921 * elif t == NPY_ULONG: f = "L"
7922 * elif t == NPY_LONGLONG: f = "q"
7923 */
7924 __pyx_v_f = ((char *)"l");
7925 break;
7926 case NPY_ULONG:
7927
7928 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":314
7929 * elif t == NPY_UINT: f = "I"
7930 * elif t == NPY_LONG: f = "l"
7931 * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
7932 * elif t == NPY_LONGLONG: f = "q"
7933 * elif t == NPY_ULONGLONG: f = "Q"
7934 */
7935 __pyx_v_f = ((char *)"L");
7936 break;
7937 case NPY_LONGLONG:
7938
7939 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":315
7940 * elif t == NPY_LONG: f = "l"
7941 * elif t == NPY_ULONG: f = "L"
7942 * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
7943 * elif t == NPY_ULONGLONG: f = "Q"
7944 * elif t == NPY_FLOAT: f = "f"
7945 */
7946 __pyx_v_f = ((char *)"q");
7947 break;
7948 case NPY_ULONGLONG:
7949
7950 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":316
7951 * elif t == NPY_ULONG: f = "L"
7952 * elif t == NPY_LONGLONG: f = "q"
7953 * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
7954 * elif t == NPY_FLOAT: f = "f"
7955 * elif t == NPY_DOUBLE: f = "d"
7956 */
7957 __pyx_v_f = ((char *)"Q");
7958 break;
7959 case NPY_FLOAT:
7960
7961 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":317
7962 * elif t == NPY_LONGLONG: f = "q"
7963 * elif t == NPY_ULONGLONG: f = "Q"
7964 * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
7965 * elif t == NPY_DOUBLE: f = "d"
7966 * elif t == NPY_LONGDOUBLE: f = "g"
7967 */
7968 __pyx_v_f = ((char *)"f");
7969 break;
7970 case NPY_DOUBLE:
7971
7972 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":318
7973 * elif t == NPY_ULONGLONG: f = "Q"
7974 * elif t == NPY_FLOAT: f = "f"
7975 * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
7976 * elif t == NPY_LONGDOUBLE: f = "g"
7977 * elif t == NPY_CFLOAT: f = "Zf"
7978 */
7979 __pyx_v_f = ((char *)"d");
7980 break;
7981 case NPY_LONGDOUBLE:
7982
7983 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":319
7984 * elif t == NPY_FLOAT: f = "f"
7985 * elif t == NPY_DOUBLE: f = "d"
7986 * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
7987 * elif t == NPY_CFLOAT: f = "Zf"
7988 * elif t == NPY_CDOUBLE: f = "Zd"
7989 */
7990 __pyx_v_f = ((char *)"g");
7991 break;
7992 case NPY_CFLOAT:
7993
7994 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":320
7995 * elif t == NPY_DOUBLE: f = "d"
7996 * elif t == NPY_LONGDOUBLE: f = "g"
7997 * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
7998 * elif t == NPY_CDOUBLE: f = "Zd"
7999 * elif t == NPY_CLONGDOUBLE: f = "Zg"
8000 */
8001 __pyx_v_f = ((char *)"Zf");
8002 break;
8003 case NPY_CDOUBLE:
8004
8005 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":321
8006 * elif t == NPY_LONGDOUBLE: f = "g"
8007 * elif t == NPY_CFLOAT: f = "Zf"
8008 * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
8009 * elif t == NPY_CLONGDOUBLE: f = "Zg"
8010 * elif t == NPY_OBJECT: f = "O"
8011 */
8012 __pyx_v_f = ((char *)"Zd");
8013 break;
8014 case NPY_CLONGDOUBLE:
8015
8016 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":322
8017 * elif t == NPY_CFLOAT: f = "Zf"
8018 * elif t == NPY_CDOUBLE: f = "Zd"
8019 * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
8020 * elif t == NPY_OBJECT: f = "O"
8021 * else:
8022 */
8023 __pyx_v_f = ((char *)"Zg");
8024 break;
8025 case NPY_OBJECT:
8026
8027 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":323
8028 * elif t == NPY_CDOUBLE: f = "Zd"
8029 * elif t == NPY_CLONGDOUBLE: f = "Zg"
8030 * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
8031 * else:
8032 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
8033 */
8034 __pyx_v_f = ((char *)"O");
8035 break;
8036 default:
8037
8038 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":325
8039 * elif t == NPY_OBJECT: f = "O"
8040 * else:
8041 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
8042 * info.format = f
8043 * return
8044 */
8045 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
8046 __Pyx_GOTREF(__pyx_t_3);
8047 __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error)
8048 __Pyx_GOTREF(__pyx_t_8);
8049 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8050 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error)
8051 __Pyx_GOTREF(__pyx_t_3);
8052 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
8053 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
8054 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8055 __PYX_ERR(2, 325, __pyx_L1_error)
8056 break;
8057 }
8058
8059 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":326
8060 * else:
8061 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
8062 * info.format = f # <<<<<<<<<<<<<<
8063 * return
8064 * else:
8065 */
8066 __pyx_v_info->format = __pyx_v_f;
8067
8068 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":327
8069 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
8070 * info.format = f
8071 * return # <<<<<<<<<<<<<<
8072 * else:
8073 * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
8074 */
8075 __pyx_r = 0;
8076 goto __pyx_L0;
8077
8078 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":302
8079 * info.obj = self
8080 *
8081 * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
8082 * t = descr.type_num
8083 * if ((descr.byteorder == c'>' and little_endian) or
8084 */
8085 }
8086
8087 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":329
8088 * return
8089 * else:
8090 * info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
8091 * info.format[0] = c'^' # Native data types, manual alignment
8092 * offset = 0
8093 */
8094 /*else*/ {
8095 __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
8096
8097 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":330
8098 * else:
8099 * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
8100 * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
8101 * offset = 0
8102 * f = _util_dtypestring(descr, info.format + 1,
8103 */
8104 (__pyx_v_info->format[0]) = '^';
8105
8106 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":331
8107 * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
8108 * info.format[0] = c'^' # Native data types, manual alignment
8109 * offset = 0 # <<<<<<<<<<<<<<
8110 * f = _util_dtypestring(descr, info.format + 1,
8111 * info.format + _buffer_format_string_len,
8112 */
8113 __pyx_v_offset = 0;
8114
8115 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":332
8116 * info.format[0] = c'^' # Native data types, manual alignment
8117 * offset = 0
8118 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
8119 * info.format + _buffer_format_string_len,
8120 * &offset)
8121 */
8122 __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error)
8123 __pyx_v_f = __pyx_t_9;
8124
8125 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":335
8126 * info.format + _buffer_format_string_len,
8127 * &offset)
8128 * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
8129 *
8130 * def __releasebuffer__(ndarray self, Py_buffer* info):
8131 */
8132 (__pyx_v_f[0]) = '\x00';
8133 }
8134
8135 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":258
8136 * # experimental exception made for __getbuffer__ and __releasebuffer__
8137 * # -- the details of this may change.
8138 * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
8139 * # This implementation of getbuffer is geared towards Cython
8140 * # requirements, and does not yet fulfill the PEP.
8141 */
8142
8143 /* function exit code */
8144 __pyx_r = 0;
8145 goto __pyx_L0;
8146 __pyx_L1_error:;
8147 __Pyx_XDECREF(__pyx_t_3);
8148 __Pyx_XDECREF(__pyx_t_8);
8149 __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8150 __pyx_r = -1;
8151 if (__pyx_v_info->obj != NULL) {
8152 __Pyx_GOTREF(__pyx_v_info->obj);
8153 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
8154 }
8155 goto __pyx_L2;
8156 __pyx_L0:;
8157 if (__pyx_v_info->obj == Py_None) {
8158 __Pyx_GOTREF(__pyx_v_info->obj);
8159 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
8160 }
8161 __pyx_L2:;
8162 __Pyx_XDECREF((PyObject *)__pyx_v_descr);
8163 __Pyx_RefNannyFinishContext();
8164 return __pyx_r;
8165 }
8166
8167 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":337
8168 * f[0] = c'\0' # Terminate format string
8169 *
8170 * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
8171 * if PyArray_HASFIELDS(self):
8172 * PyObject_Free(info.format)
8173 */
8174
8175 /* Python wrapper */
8176 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
__pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject * __pyx_v_self,Py_buffer * __pyx_v_info)8177 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
8178 __Pyx_RefNannyDeclarations
8179 __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
8180 __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
8181
8182 /* function exit code */
8183 __Pyx_RefNannyFinishContext();
8184 }
8185
__pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject * __pyx_v_self,Py_buffer * __pyx_v_info)8186 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
8187 __Pyx_RefNannyDeclarations
8188 int __pyx_t_1;
8189 __Pyx_RefNannySetupContext("__releasebuffer__", 0);
8190
8191 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":338
8192 *
8193 * def __releasebuffer__(ndarray self, Py_buffer* info):
8194 * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
8195 * PyObject_Free(info.format)
8196 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8197 */
8198 __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
8199 if (__pyx_t_1) {
8200
8201 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":339
8202 * def __releasebuffer__(ndarray self, Py_buffer* info):
8203 * if PyArray_HASFIELDS(self):
8204 * PyObject_Free(info.format) # <<<<<<<<<<<<<<
8205 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8206 * PyObject_Free(info.strides)
8207 */
8208 PyObject_Free(__pyx_v_info->format);
8209
8210 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":338
8211 *
8212 * def __releasebuffer__(ndarray self, Py_buffer* info):
8213 * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
8214 * PyObject_Free(info.format)
8215 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8216 */
8217 }
8218
8219 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":340
8220 * if PyArray_HASFIELDS(self):
8221 * PyObject_Free(info.format)
8222 * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
8223 * PyObject_Free(info.strides)
8224 * # info.shape was stored after info.strides in the same block
8225 */
8226 __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
8227 if (__pyx_t_1) {
8228
8229 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":341
8230 * PyObject_Free(info.format)
8231 * if sizeof(npy_intp) != sizeof(Py_ssize_t):
8232 * PyObject_Free(info.strides) # <<<<<<<<<<<<<<
8233 * # info.shape was stored after info.strides in the same block
8234 *
8235 */
8236 PyObject_Free(__pyx_v_info->strides);
8237
8238 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":340
8239 * if PyArray_HASFIELDS(self):
8240 * PyObject_Free(info.format)
8241 * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
8242 * PyObject_Free(info.strides)
8243 * # info.shape was stored after info.strides in the same block
8244 */
8245 }
8246
8247 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":337
8248 * f[0] = c'\0' # Terminate format string
8249 *
8250 * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
8251 * if PyArray_HASFIELDS(self):
8252 * PyObject_Free(info.format)
8253 */
8254
8255 /* function exit code */
8256 __Pyx_RefNannyFinishContext();
8257 }
8258
8259 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":820
8260 * ctypedef npy_cdouble complex_t
8261 *
8262 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
8263 * return PyArray_MultiIterNew(1, <void*>a)
8264 *
8265 */
8266
__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject * __pyx_v_a)8267 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
8268 PyObject *__pyx_r = NULL;
8269 __Pyx_RefNannyDeclarations
8270 PyObject *__pyx_t_1 = NULL;
8271 int __pyx_lineno = 0;
8272 const char *__pyx_filename = NULL;
8273 int __pyx_clineno = 0;
8274 __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
8275
8276 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":821
8277 *
8278 * cdef inline object PyArray_MultiIterNew1(a):
8279 * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
8280 *
8281 * cdef inline object PyArray_MultiIterNew2(a, b):
8282 */
8283 __Pyx_XDECREF(__pyx_r);
8284 __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 821, __pyx_L1_error)
8285 __Pyx_GOTREF(__pyx_t_1);
8286 __pyx_r = __pyx_t_1;
8287 __pyx_t_1 = 0;
8288 goto __pyx_L0;
8289
8290 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":820
8291 * ctypedef npy_cdouble complex_t
8292 *
8293 * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
8294 * return PyArray_MultiIterNew(1, <void*>a)
8295 *
8296 */
8297
8298 /* function exit code */
8299 __pyx_L1_error:;
8300 __Pyx_XDECREF(__pyx_t_1);
8301 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
8302 __pyx_r = 0;
8303 __pyx_L0:;
8304 __Pyx_XGIVEREF(__pyx_r);
8305 __Pyx_RefNannyFinishContext();
8306 return __pyx_r;
8307 }
8308
8309 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":823
8310 * return PyArray_MultiIterNew(1, <void*>a)
8311 *
8312 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
8313 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
8314 *
8315 */
8316
__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject * __pyx_v_a,PyObject * __pyx_v_b)8317 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
8318 PyObject *__pyx_r = NULL;
8319 __Pyx_RefNannyDeclarations
8320 PyObject *__pyx_t_1 = NULL;
8321 int __pyx_lineno = 0;
8322 const char *__pyx_filename = NULL;
8323 int __pyx_clineno = 0;
8324 __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
8325
8326 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":824
8327 *
8328 * cdef inline object PyArray_MultiIterNew2(a, b):
8329 * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
8330 *
8331 * cdef inline object PyArray_MultiIterNew3(a, b, c):
8332 */
8333 __Pyx_XDECREF(__pyx_r);
8334 __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 824, __pyx_L1_error)
8335 __Pyx_GOTREF(__pyx_t_1);
8336 __pyx_r = __pyx_t_1;
8337 __pyx_t_1 = 0;
8338 goto __pyx_L0;
8339
8340 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":823
8341 * return PyArray_MultiIterNew(1, <void*>a)
8342 *
8343 * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
8344 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
8345 *
8346 */
8347
8348 /* function exit code */
8349 __pyx_L1_error:;
8350 __Pyx_XDECREF(__pyx_t_1);
8351 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
8352 __pyx_r = 0;
8353 __pyx_L0:;
8354 __Pyx_XGIVEREF(__pyx_r);
8355 __Pyx_RefNannyFinishContext();
8356 return __pyx_r;
8357 }
8358
8359 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":826
8360 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
8361 *
8362 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
8363 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
8364 *
8365 */
8366
__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c)8367 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
8368 PyObject *__pyx_r = NULL;
8369 __Pyx_RefNannyDeclarations
8370 PyObject *__pyx_t_1 = NULL;
8371 int __pyx_lineno = 0;
8372 const char *__pyx_filename = NULL;
8373 int __pyx_clineno = 0;
8374 __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
8375
8376 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":827
8377 *
8378 * cdef inline object PyArray_MultiIterNew3(a, b, c):
8379 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
8380 *
8381 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
8382 */
8383 __Pyx_XDECREF(__pyx_r);
8384 __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 827, __pyx_L1_error)
8385 __Pyx_GOTREF(__pyx_t_1);
8386 __pyx_r = __pyx_t_1;
8387 __pyx_t_1 = 0;
8388 goto __pyx_L0;
8389
8390 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":826
8391 * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
8392 *
8393 * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
8394 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
8395 *
8396 */
8397
8398 /* function exit code */
8399 __pyx_L1_error:;
8400 __Pyx_XDECREF(__pyx_t_1);
8401 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
8402 __pyx_r = 0;
8403 __pyx_L0:;
8404 __Pyx_XGIVEREF(__pyx_r);
8405 __Pyx_RefNannyFinishContext();
8406 return __pyx_r;
8407 }
8408
8409 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":829
8410 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
8411 *
8412 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
8413 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
8414 *
8415 */
8416
__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c,PyObject * __pyx_v_d)8417 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
8418 PyObject *__pyx_r = NULL;
8419 __Pyx_RefNannyDeclarations
8420 PyObject *__pyx_t_1 = NULL;
8421 int __pyx_lineno = 0;
8422 const char *__pyx_filename = NULL;
8423 int __pyx_clineno = 0;
8424 __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
8425
8426 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":830
8427 *
8428 * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
8429 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
8430 *
8431 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
8432 */
8433 __Pyx_XDECREF(__pyx_r);
8434 __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 830, __pyx_L1_error)
8435 __Pyx_GOTREF(__pyx_t_1);
8436 __pyx_r = __pyx_t_1;
8437 __pyx_t_1 = 0;
8438 goto __pyx_L0;
8439
8440 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":829
8441 * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
8442 *
8443 * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
8444 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
8445 *
8446 */
8447
8448 /* function exit code */
8449 __pyx_L1_error:;
8450 __Pyx_XDECREF(__pyx_t_1);
8451 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
8452 __pyx_r = 0;
8453 __pyx_L0:;
8454 __Pyx_XGIVEREF(__pyx_r);
8455 __Pyx_RefNannyFinishContext();
8456 return __pyx_r;
8457 }
8458
8459 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":832
8460 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
8461 *
8462 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
8463 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
8464 *
8465 */
8466
__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject * __pyx_v_a,PyObject * __pyx_v_b,PyObject * __pyx_v_c,PyObject * __pyx_v_d,PyObject * __pyx_v_e)8467 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
8468 PyObject *__pyx_r = NULL;
8469 __Pyx_RefNannyDeclarations
8470 PyObject *__pyx_t_1 = NULL;
8471 int __pyx_lineno = 0;
8472 const char *__pyx_filename = NULL;
8473 int __pyx_clineno = 0;
8474 __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
8475
8476 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":833
8477 *
8478 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
8479 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
8480 *
8481 * cdef inline tuple PyDataType_SHAPE(dtype d):
8482 */
8483 __Pyx_XDECREF(__pyx_r);
8484 __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 833, __pyx_L1_error)
8485 __Pyx_GOTREF(__pyx_t_1);
8486 __pyx_r = __pyx_t_1;
8487 __pyx_t_1 = 0;
8488 goto __pyx_L0;
8489
8490 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":832
8491 * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
8492 *
8493 * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
8494 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
8495 *
8496 */
8497
8498 /* function exit code */
8499 __pyx_L1_error:;
8500 __Pyx_XDECREF(__pyx_t_1);
8501 __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
8502 __pyx_r = 0;
8503 __pyx_L0:;
8504 __Pyx_XGIVEREF(__pyx_r);
8505 __Pyx_RefNannyFinishContext();
8506 return __pyx_r;
8507 }
8508
8509 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":835
8510 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
8511 *
8512 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
8513 * if PyDataType_HASSUBARRAY(d):
8514 * return <tuple>d.subarray.shape
8515 */
8516
__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr * __pyx_v_d)8517 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
8518 PyObject *__pyx_r = NULL;
8519 __Pyx_RefNannyDeclarations
8520 int __pyx_t_1;
8521 __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
8522
8523 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":836
8524 *
8525 * cdef inline tuple PyDataType_SHAPE(dtype d):
8526 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
8527 * return <tuple>d.subarray.shape
8528 * else:
8529 */
8530 __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
8531 if (__pyx_t_1) {
8532
8533 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":837
8534 * cdef inline tuple PyDataType_SHAPE(dtype d):
8535 * if PyDataType_HASSUBARRAY(d):
8536 * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
8537 * else:
8538 * return ()
8539 */
8540 __Pyx_XDECREF(__pyx_r);
8541 __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
8542 __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
8543 goto __pyx_L0;
8544
8545 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":836
8546 *
8547 * cdef inline tuple PyDataType_SHAPE(dtype d):
8548 * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
8549 * return <tuple>d.subarray.shape
8550 * else:
8551 */
8552 }
8553
8554 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":839
8555 * return <tuple>d.subarray.shape
8556 * else:
8557 * return () # <<<<<<<<<<<<<<
8558 *
8559 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
8560 */
8561 /*else*/ {
8562 __Pyx_XDECREF(__pyx_r);
8563 __Pyx_INCREF(__pyx_empty_tuple);
8564 __pyx_r = __pyx_empty_tuple;
8565 goto __pyx_L0;
8566 }
8567
8568 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":835
8569 * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
8570 *
8571 * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
8572 * if PyDataType_HASSUBARRAY(d):
8573 * return <tuple>d.subarray.shape
8574 */
8575
8576 /* function exit code */
8577 __pyx_L0:;
8578 __Pyx_XGIVEREF(__pyx_r);
8579 __Pyx_RefNannyFinishContext();
8580 return __pyx_r;
8581 }
8582
8583 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":841
8584 * return ()
8585 *
8586 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
8587 * # Recursive utility function used in __getbuffer__ to get format
8588 * # string. The new location in the format string is returned.
8589 */
8590
__pyx_f_5numpy__util_dtypestring(PyArray_Descr * __pyx_v_descr,char * __pyx_v_f,char * __pyx_v_end,int * __pyx_v_offset)8591 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
8592 PyArray_Descr *__pyx_v_child = 0;
8593 int __pyx_v_endian_detector;
8594 int __pyx_v_little_endian;
8595 PyObject *__pyx_v_fields = 0;
8596 PyObject *__pyx_v_childname = NULL;
8597 PyObject *__pyx_v_new_offset = NULL;
8598 PyObject *__pyx_v_t = NULL;
8599 char *__pyx_r;
8600 __Pyx_RefNannyDeclarations
8601 PyObject *__pyx_t_1 = NULL;
8602 Py_ssize_t __pyx_t_2;
8603 PyObject *__pyx_t_3 = NULL;
8604 PyObject *__pyx_t_4 = NULL;
8605 int __pyx_t_5;
8606 int __pyx_t_6;
8607 int __pyx_t_7;
8608 long __pyx_t_8;
8609 char *__pyx_t_9;
8610 int __pyx_lineno = 0;
8611 const char *__pyx_filename = NULL;
8612 int __pyx_clineno = 0;
8613 __Pyx_RefNannySetupContext("_util_dtypestring", 0);
8614
8615 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":846
8616 *
8617 * cdef dtype child
8618 * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
8619 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
8620 * cdef tuple fields
8621 */
8622 __pyx_v_endian_detector = 1;
8623
8624 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":847
8625 * cdef dtype child
8626 * cdef int endian_detector = 1
8627 * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
8628 * cdef tuple fields
8629 *
8630 */
8631 __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
8632
8633 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":850
8634 * cdef tuple fields
8635 *
8636 * for childname in descr.names: # <<<<<<<<<<<<<<
8637 * fields = descr.fields[childname]
8638 * child, new_offset = fields
8639 */
8640 if (unlikely(__pyx_v_descr->names == Py_None)) {
8641 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
8642 __PYX_ERR(2, 850, __pyx_L1_error)
8643 }
8644 __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
8645 for (;;) {
8646 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
8647 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8648 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 850, __pyx_L1_error)
8649 #else
8650 __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 850, __pyx_L1_error)
8651 __Pyx_GOTREF(__pyx_t_3);
8652 #endif
8653 __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
8654 __pyx_t_3 = 0;
8655
8656 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":851
8657 *
8658 * for childname in descr.names:
8659 * fields = descr.fields[childname] # <<<<<<<<<<<<<<
8660 * child, new_offset = fields
8661 *
8662 */
8663 if (unlikely(__pyx_v_descr->fields == Py_None)) {
8664 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
8665 __PYX_ERR(2, 851, __pyx_L1_error)
8666 }
8667 __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error)
8668 __Pyx_GOTREF(__pyx_t_3);
8669 if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 851, __pyx_L1_error)
8670 __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
8671 __pyx_t_3 = 0;
8672
8673 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":852
8674 * for childname in descr.names:
8675 * fields = descr.fields[childname]
8676 * child, new_offset = fields # <<<<<<<<<<<<<<
8677 *
8678 * if (end - f) - <int>(new_offset - offset[0]) < 15:
8679 */
8680 if (likely(__pyx_v_fields != Py_None)) {
8681 PyObject* sequence = __pyx_v_fields;
8682 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
8683 if (unlikely(size != 2)) {
8684 if (size > 2) __Pyx_RaiseTooManyValuesError(2);
8685 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
8686 __PYX_ERR(2, 852, __pyx_L1_error)
8687 }
8688 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8689 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
8690 __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
8691 __Pyx_INCREF(__pyx_t_3);
8692 __Pyx_INCREF(__pyx_t_4);
8693 #else
8694 __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error)
8695 __Pyx_GOTREF(__pyx_t_3);
8696 __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 852, __pyx_L1_error)
8697 __Pyx_GOTREF(__pyx_t_4);
8698 #endif
8699 } else {
8700 __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 852, __pyx_L1_error)
8701 }
8702 if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 852, __pyx_L1_error)
8703 __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
8704 __pyx_t_3 = 0;
8705 __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
8706 __pyx_t_4 = 0;
8707
8708 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":854
8709 * child, new_offset = fields
8710 *
8711 * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
8712 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
8713 *
8714 */
8715 __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 854, __pyx_L1_error)
8716 __Pyx_GOTREF(__pyx_t_4);
8717 __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 854, __pyx_L1_error)
8718 __Pyx_GOTREF(__pyx_t_3);
8719 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8720 __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 854, __pyx_L1_error)
8721 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8722 __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
8723 if (unlikely(__pyx_t_6)) {
8724
8725 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":855
8726 *
8727 * if (end - f) - <int>(new_offset - offset[0]) < 15:
8728 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
8729 *
8730 * if ((child.byteorder == c'>' and little_endian) or
8731 */
8732 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error)
8733 __Pyx_GOTREF(__pyx_t_3);
8734 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
8735 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8736 __PYX_ERR(2, 855, __pyx_L1_error)
8737
8738 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":854
8739 * child, new_offset = fields
8740 *
8741 * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
8742 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
8743 *
8744 */
8745 }
8746
8747 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857
8748 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
8749 *
8750 * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
8751 * (child.byteorder == c'<' and not little_endian)):
8752 * raise ValueError(u"Non-native byte order not supported")
8753 */
8754 __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
8755 if (!__pyx_t_7) {
8756 goto __pyx_L8_next_or;
8757 } else {
8758 }
8759 __pyx_t_7 = (__pyx_v_little_endian != 0);
8760 if (!__pyx_t_7) {
8761 } else {
8762 __pyx_t_6 = __pyx_t_7;
8763 goto __pyx_L7_bool_binop_done;
8764 }
8765 __pyx_L8_next_or:;
8766
8767 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":858
8768 *
8769 * if ((child.byteorder == c'>' and little_endian) or
8770 * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
8771 * raise ValueError(u"Non-native byte order not supported")
8772 * # One could encode it in the format string and have Cython
8773 */
8774 __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
8775 if (__pyx_t_7) {
8776 } else {
8777 __pyx_t_6 = __pyx_t_7;
8778 goto __pyx_L7_bool_binop_done;
8779 }
8780 __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
8781 __pyx_t_6 = __pyx_t_7;
8782 __pyx_L7_bool_binop_done:;
8783
8784 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857
8785 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
8786 *
8787 * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
8788 * (child.byteorder == c'<' and not little_endian)):
8789 * raise ValueError(u"Non-native byte order not supported")
8790 */
8791 if (unlikely(__pyx_t_6)) {
8792
8793 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":859
8794 * if ((child.byteorder == c'>' and little_endian) or
8795 * (child.byteorder == c'<' and not little_endian)):
8796 * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
8797 * # One could encode it in the format string and have Cython
8798 * # complain instead, BUT: < and > in format strings also imply
8799 */
8800 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 859, __pyx_L1_error)
8801 __Pyx_GOTREF(__pyx_t_3);
8802 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
8803 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8804 __PYX_ERR(2, 859, __pyx_L1_error)
8805
8806 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857
8807 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
8808 *
8809 * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
8810 * (child.byteorder == c'<' and not little_endian)):
8811 * raise ValueError(u"Non-native byte order not supported")
8812 */
8813 }
8814
8815 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":869
8816 *
8817 * # Output padding bytes
8818 * while offset[0] < new_offset: # <<<<<<<<<<<<<<
8819 * f[0] = 120 # "x"; pad byte
8820 * f += 1
8821 */
8822 while (1) {
8823 __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 869, __pyx_L1_error)
8824 __Pyx_GOTREF(__pyx_t_3);
8825 __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 869, __pyx_L1_error)
8826 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8827 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 869, __pyx_L1_error)
8828 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8829 if (!__pyx_t_6) break;
8830
8831 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":870
8832 * # Output padding bytes
8833 * while offset[0] < new_offset:
8834 * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
8835 * f += 1
8836 * offset[0] += 1
8837 */
8838 (__pyx_v_f[0]) = 0x78;
8839
8840 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":871
8841 * while offset[0] < new_offset:
8842 * f[0] = 120 # "x"; pad byte
8843 * f += 1 # <<<<<<<<<<<<<<
8844 * offset[0] += 1
8845 *
8846 */
8847 __pyx_v_f = (__pyx_v_f + 1);
8848
8849 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":872
8850 * f[0] = 120 # "x"; pad byte
8851 * f += 1
8852 * offset[0] += 1 # <<<<<<<<<<<<<<
8853 *
8854 * offset[0] += child.itemsize
8855 */
8856 __pyx_t_8 = 0;
8857 (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
8858 }
8859
8860 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":874
8861 * offset[0] += 1
8862 *
8863 * offset[0] += child.itemsize # <<<<<<<<<<<<<<
8864 *
8865 * if not PyDataType_HASFIELDS(child):
8866 */
8867 __pyx_t_8 = 0;
8868 (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
8869
8870 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":876
8871 * offset[0] += child.itemsize
8872 *
8873 * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
8874 * t = child.type_num
8875 * if end - f < 5:
8876 */
8877 __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
8878 if (__pyx_t_6) {
8879
8880 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":877
8881 *
8882 * if not PyDataType_HASFIELDS(child):
8883 * t = child.type_num # <<<<<<<<<<<<<<
8884 * if end - f < 5:
8885 * raise RuntimeError(u"Format string allocated too short.")
8886 */
8887 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 877, __pyx_L1_error)
8888 __Pyx_GOTREF(__pyx_t_4);
8889 __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
8890 __pyx_t_4 = 0;
8891
8892 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":878
8893 * if not PyDataType_HASFIELDS(child):
8894 * t = child.type_num
8895 * if end - f < 5: # <<<<<<<<<<<<<<
8896 * raise RuntimeError(u"Format string allocated too short.")
8897 *
8898 */
8899 __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
8900 if (unlikely(__pyx_t_6)) {
8901
8902 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":879
8903 * t = child.type_num
8904 * if end - f < 5:
8905 * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
8906 *
8907 * # Until ticket #99 is fixed, use integers to avoid warnings
8908 */
8909 __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 879, __pyx_L1_error)
8910 __Pyx_GOTREF(__pyx_t_4);
8911 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
8912 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8913 __PYX_ERR(2, 879, __pyx_L1_error)
8914
8915 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":878
8916 * if not PyDataType_HASFIELDS(child):
8917 * t = child.type_num
8918 * if end - f < 5: # <<<<<<<<<<<<<<
8919 * raise RuntimeError(u"Format string allocated too short.")
8920 *
8921 */
8922 }
8923
8924 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":882
8925 *
8926 * # Until ticket #99 is fixed, use integers to avoid warnings
8927 * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
8928 * elif t == NPY_UBYTE: f[0] = 66 #"B"
8929 * elif t == NPY_SHORT: f[0] = 104 #"h"
8930 */
8931 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 882, __pyx_L1_error)
8932 __Pyx_GOTREF(__pyx_t_4);
8933 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 882, __pyx_L1_error)
8934 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8935 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 882, __pyx_L1_error)
8936 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8937 if (__pyx_t_6) {
8938 (__pyx_v_f[0]) = 98;
8939 goto __pyx_L15;
8940 }
8941
8942 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":883
8943 * # Until ticket #99 is fixed, use integers to avoid warnings
8944 * if t == NPY_BYTE: f[0] = 98 #"b"
8945 * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
8946 * elif t == NPY_SHORT: f[0] = 104 #"h"
8947 * elif t == NPY_USHORT: f[0] = 72 #"H"
8948 */
8949 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error)
8950 __Pyx_GOTREF(__pyx_t_3);
8951 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error)
8952 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8953 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error)
8954 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8955 if (__pyx_t_6) {
8956 (__pyx_v_f[0]) = 66;
8957 goto __pyx_L15;
8958 }
8959
8960 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":884
8961 * if t == NPY_BYTE: f[0] = 98 #"b"
8962 * elif t == NPY_UBYTE: f[0] = 66 #"B"
8963 * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
8964 * elif t == NPY_USHORT: f[0] = 72 #"H"
8965 * elif t == NPY_INT: f[0] = 105 #"i"
8966 */
8967 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error)
8968 __Pyx_GOTREF(__pyx_t_4);
8969 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error)
8970 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8971 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error)
8972 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8973 if (__pyx_t_6) {
8974 (__pyx_v_f[0]) = 0x68;
8975 goto __pyx_L15;
8976 }
8977
8978 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":885
8979 * elif t == NPY_UBYTE: f[0] = 66 #"B"
8980 * elif t == NPY_SHORT: f[0] = 104 #"h"
8981 * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
8982 * elif t == NPY_INT: f[0] = 105 #"i"
8983 * elif t == NPY_UINT: f[0] = 73 #"I"
8984 */
8985 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error)
8986 __Pyx_GOTREF(__pyx_t_3);
8987 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error)
8988 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8989 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error)
8990 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8991 if (__pyx_t_6) {
8992 (__pyx_v_f[0]) = 72;
8993 goto __pyx_L15;
8994 }
8995
8996 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":886
8997 * elif t == NPY_SHORT: f[0] = 104 #"h"
8998 * elif t == NPY_USHORT: f[0] = 72 #"H"
8999 * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
9000 * elif t == NPY_UINT: f[0] = 73 #"I"
9001 * elif t == NPY_LONG: f[0] = 108 #"l"
9002 */
9003 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error)
9004 __Pyx_GOTREF(__pyx_t_4);
9005 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error)
9006 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9007 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error)
9008 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9009 if (__pyx_t_6) {
9010 (__pyx_v_f[0]) = 0x69;
9011 goto __pyx_L15;
9012 }
9013
9014 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":887
9015 * elif t == NPY_USHORT: f[0] = 72 #"H"
9016 * elif t == NPY_INT: f[0] = 105 #"i"
9017 * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
9018 * elif t == NPY_LONG: f[0] = 108 #"l"
9019 * elif t == NPY_ULONG: f[0] = 76 #"L"
9020 */
9021 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error)
9022 __Pyx_GOTREF(__pyx_t_3);
9023 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error)
9024 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9025 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error)
9026 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9027 if (__pyx_t_6) {
9028 (__pyx_v_f[0]) = 73;
9029 goto __pyx_L15;
9030 }
9031
9032 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":888
9033 * elif t == NPY_INT: f[0] = 105 #"i"
9034 * elif t == NPY_UINT: f[0] = 73 #"I"
9035 * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
9036 * elif t == NPY_ULONG: f[0] = 76 #"L"
9037 * elif t == NPY_LONGLONG: f[0] = 113 #"q"
9038 */
9039 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error)
9040 __Pyx_GOTREF(__pyx_t_4);
9041 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error)
9042 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9043 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error)
9044 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9045 if (__pyx_t_6) {
9046 (__pyx_v_f[0]) = 0x6C;
9047 goto __pyx_L15;
9048 }
9049
9050 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":889
9051 * elif t == NPY_UINT: f[0] = 73 #"I"
9052 * elif t == NPY_LONG: f[0] = 108 #"l"
9053 * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
9054 * elif t == NPY_LONGLONG: f[0] = 113 #"q"
9055 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
9056 */
9057 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error)
9058 __Pyx_GOTREF(__pyx_t_3);
9059 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error)
9060 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9061 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error)
9062 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9063 if (__pyx_t_6) {
9064 (__pyx_v_f[0]) = 76;
9065 goto __pyx_L15;
9066 }
9067
9068 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":890
9069 * elif t == NPY_LONG: f[0] = 108 #"l"
9070 * elif t == NPY_ULONG: f[0] = 76 #"L"
9071 * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
9072 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
9073 * elif t == NPY_FLOAT: f[0] = 102 #"f"
9074 */
9075 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error)
9076 __Pyx_GOTREF(__pyx_t_4);
9077 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error)
9078 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9079 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error)
9080 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9081 if (__pyx_t_6) {
9082 (__pyx_v_f[0]) = 0x71;
9083 goto __pyx_L15;
9084 }
9085
9086 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":891
9087 * elif t == NPY_ULONG: f[0] = 76 #"L"
9088 * elif t == NPY_LONGLONG: f[0] = 113 #"q"
9089 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
9090 * elif t == NPY_FLOAT: f[0] = 102 #"f"
9091 * elif t == NPY_DOUBLE: f[0] = 100 #"d"
9092 */
9093 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error)
9094 __Pyx_GOTREF(__pyx_t_3);
9095 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error)
9096 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9097 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error)
9098 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9099 if (__pyx_t_6) {
9100 (__pyx_v_f[0]) = 81;
9101 goto __pyx_L15;
9102 }
9103
9104 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":892
9105 * elif t == NPY_LONGLONG: f[0] = 113 #"q"
9106 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
9107 * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
9108 * elif t == NPY_DOUBLE: f[0] = 100 #"d"
9109 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
9110 */
9111 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error)
9112 __Pyx_GOTREF(__pyx_t_4);
9113 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error)
9114 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9115 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error)
9116 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9117 if (__pyx_t_6) {
9118 (__pyx_v_f[0]) = 0x66;
9119 goto __pyx_L15;
9120 }
9121
9122 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":893
9123 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
9124 * elif t == NPY_FLOAT: f[0] = 102 #"f"
9125 * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
9126 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
9127 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
9128 */
9129 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error)
9130 __Pyx_GOTREF(__pyx_t_3);
9131 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error)
9132 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9133 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error)
9134 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9135 if (__pyx_t_6) {
9136 (__pyx_v_f[0]) = 0x64;
9137 goto __pyx_L15;
9138 }
9139
9140 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":894
9141 * elif t == NPY_FLOAT: f[0] = 102 #"f"
9142 * elif t == NPY_DOUBLE: f[0] = 100 #"d"
9143 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
9144 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
9145 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
9146 */
9147 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error)
9148 __Pyx_GOTREF(__pyx_t_4);
9149 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error)
9150 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9151 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error)
9152 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9153 if (__pyx_t_6) {
9154 (__pyx_v_f[0]) = 0x67;
9155 goto __pyx_L15;
9156 }
9157
9158 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":895
9159 * elif t == NPY_DOUBLE: f[0] = 100 #"d"
9160 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
9161 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
9162 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
9163 * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
9164 */
9165 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error)
9166 __Pyx_GOTREF(__pyx_t_3);
9167 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error)
9168 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9169 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error)
9170 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9171 if (__pyx_t_6) {
9172 (__pyx_v_f[0]) = 90;
9173 (__pyx_v_f[1]) = 0x66;
9174 __pyx_v_f = (__pyx_v_f + 1);
9175 goto __pyx_L15;
9176 }
9177
9178 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":896
9179 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
9180 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
9181 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
9182 * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
9183 * elif t == NPY_OBJECT: f[0] = 79 #"O"
9184 */
9185 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error)
9186 __Pyx_GOTREF(__pyx_t_4);
9187 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error)
9188 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9189 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error)
9190 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9191 if (__pyx_t_6) {
9192 (__pyx_v_f[0]) = 90;
9193 (__pyx_v_f[1]) = 0x64;
9194 __pyx_v_f = (__pyx_v_f + 1);
9195 goto __pyx_L15;
9196 }
9197
9198 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":897
9199 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
9200 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
9201 * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
9202 * elif t == NPY_OBJECT: f[0] = 79 #"O"
9203 * else:
9204 */
9205 __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error)
9206 __Pyx_GOTREF(__pyx_t_3);
9207 __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error)
9208 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9209 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error)
9210 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9211 if (__pyx_t_6) {
9212 (__pyx_v_f[0]) = 90;
9213 (__pyx_v_f[1]) = 0x67;
9214 __pyx_v_f = (__pyx_v_f + 1);
9215 goto __pyx_L15;
9216 }
9217
9218 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":898
9219 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
9220 * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
9221 * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
9222 * else:
9223 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
9224 */
9225 __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error)
9226 __Pyx_GOTREF(__pyx_t_4);
9227 __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error)
9228 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9229 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error)
9230 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9231 if (likely(__pyx_t_6)) {
9232 (__pyx_v_f[0]) = 79;
9233 goto __pyx_L15;
9234 }
9235
9236 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":900
9237 * elif t == NPY_OBJECT: f[0] = 79 #"O"
9238 * else:
9239 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
9240 * f += 1
9241 * else:
9242 */
9243 /*else*/ {
9244 __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 900, __pyx_L1_error)
9245 __Pyx_GOTREF(__pyx_t_3);
9246 __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 900, __pyx_L1_error)
9247 __Pyx_GOTREF(__pyx_t_4);
9248 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9249 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
9250 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9251 __PYX_ERR(2, 900, __pyx_L1_error)
9252 }
9253 __pyx_L15:;
9254
9255 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":901
9256 * else:
9257 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
9258 * f += 1 # <<<<<<<<<<<<<<
9259 * else:
9260 * # Cython ignores struct boundary information ("T{...}"),
9261 */
9262 __pyx_v_f = (__pyx_v_f + 1);
9263
9264 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":876
9265 * offset[0] += child.itemsize
9266 *
9267 * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
9268 * t = child.type_num
9269 * if end - f < 5:
9270 */
9271 goto __pyx_L13;
9272 }
9273
9274 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":905
9275 * # Cython ignores struct boundary information ("T{...}"),
9276 * # so don't output it
9277 * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
9278 * return f
9279 *
9280 */
9281 /*else*/ {
9282 __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 905, __pyx_L1_error)
9283 __pyx_v_f = __pyx_t_9;
9284 }
9285 __pyx_L13:;
9286
9287 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":850
9288 * cdef tuple fields
9289 *
9290 * for childname in descr.names: # <<<<<<<<<<<<<<
9291 * fields = descr.fields[childname]
9292 * child, new_offset = fields
9293 */
9294 }
9295 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9296
9297 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":906
9298 * # so don't output it
9299 * f = _util_dtypestring(child, f, end, offset)
9300 * return f # <<<<<<<<<<<<<<
9301 *
9302 *
9303 */
9304 __pyx_r = __pyx_v_f;
9305 goto __pyx_L0;
9306
9307 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":841
9308 * return ()
9309 *
9310 * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
9311 * # Recursive utility function used in __getbuffer__ to get format
9312 * # string. The new location in the format string is returned.
9313 */
9314
9315 /* function exit code */
9316 __pyx_L1_error:;
9317 __Pyx_XDECREF(__pyx_t_1);
9318 __Pyx_XDECREF(__pyx_t_3);
9319 __Pyx_XDECREF(__pyx_t_4);
9320 __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
9321 __pyx_r = NULL;
9322 __pyx_L0:;
9323 __Pyx_XDECREF((PyObject *)__pyx_v_child);
9324 __Pyx_XDECREF(__pyx_v_fields);
9325 __Pyx_XDECREF(__pyx_v_childname);
9326 __Pyx_XDECREF(__pyx_v_new_offset);
9327 __Pyx_XDECREF(__pyx_v_t);
9328 __Pyx_RefNannyFinishContext();
9329 return __pyx_r;
9330 }
9331
9332 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1021
9333 * int _import_umath() except -1
9334 *
9335 * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
9336 * Py_INCREF(base) # important to do this before stealing the reference below!
9337 * PyArray_SetBaseObject(arr, base)
9338 */
9339
__pyx_f_5numpy_set_array_base(PyArrayObject * __pyx_v_arr,PyObject * __pyx_v_base)9340 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
9341 __Pyx_RefNannyDeclarations
9342 __Pyx_RefNannySetupContext("set_array_base", 0);
9343
9344 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1022
9345 *
9346 * cdef inline void set_array_base(ndarray arr, object base):
9347 * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
9348 * PyArray_SetBaseObject(arr, base)
9349 *
9350 */
9351 Py_INCREF(__pyx_v_base);
9352
9353 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1023
9354 * cdef inline void set_array_base(ndarray arr, object base):
9355 * Py_INCREF(base) # important to do this before stealing the reference below!
9356 * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
9357 *
9358 * cdef inline object get_array_base(ndarray arr):
9359 */
9360 (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
9361
9362 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1021
9363 * int _import_umath() except -1
9364 *
9365 * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
9366 * Py_INCREF(base) # important to do this before stealing the reference below!
9367 * PyArray_SetBaseObject(arr, base)
9368 */
9369
9370 /* function exit code */
9371 __Pyx_RefNannyFinishContext();
9372 }
9373
9374 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1025
9375 * PyArray_SetBaseObject(arr, base)
9376 *
9377 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
9378 * base = PyArray_BASE(arr)
9379 * if base is NULL:
9380 */
9381
__pyx_f_5numpy_get_array_base(PyArrayObject * __pyx_v_arr)9382 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
9383 PyObject *__pyx_v_base;
9384 PyObject *__pyx_r = NULL;
9385 __Pyx_RefNannyDeclarations
9386 int __pyx_t_1;
9387 __Pyx_RefNannySetupContext("get_array_base", 0);
9388
9389 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1026
9390 *
9391 * cdef inline object get_array_base(ndarray arr):
9392 * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
9393 * if base is NULL:
9394 * return None
9395 */
9396 __pyx_v_base = PyArray_BASE(__pyx_v_arr);
9397
9398 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1027
9399 * cdef inline object get_array_base(ndarray arr):
9400 * base = PyArray_BASE(arr)
9401 * if base is NULL: # <<<<<<<<<<<<<<
9402 * return None
9403 * return <object>base
9404 */
9405 __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
9406 if (__pyx_t_1) {
9407
9408 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1028
9409 * base = PyArray_BASE(arr)
9410 * if base is NULL:
9411 * return None # <<<<<<<<<<<<<<
9412 * return <object>base
9413 *
9414 */
9415 __Pyx_XDECREF(__pyx_r);
9416 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9417 goto __pyx_L0;
9418
9419 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1027
9420 * cdef inline object get_array_base(ndarray arr):
9421 * base = PyArray_BASE(arr)
9422 * if base is NULL: # <<<<<<<<<<<<<<
9423 * return None
9424 * return <object>base
9425 */
9426 }
9427
9428 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1029
9429 * if base is NULL:
9430 * return None
9431 * return <object>base # <<<<<<<<<<<<<<
9432 *
9433 * # Versions of the import_* functions which are more suitable for
9434 */
9435 __Pyx_XDECREF(__pyx_r);
9436 __Pyx_INCREF(((PyObject *)__pyx_v_base));
9437 __pyx_r = ((PyObject *)__pyx_v_base);
9438 goto __pyx_L0;
9439
9440 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1025
9441 * PyArray_SetBaseObject(arr, base)
9442 *
9443 * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
9444 * base = PyArray_BASE(arr)
9445 * if base is NULL:
9446 */
9447
9448 /* function exit code */
9449 __pyx_L0:;
9450 __Pyx_XGIVEREF(__pyx_r);
9451 __Pyx_RefNannyFinishContext();
9452 return __pyx_r;
9453 }
9454
9455 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1033
9456 * # Versions of the import_* functions which are more suitable for
9457 * # Cython code.
9458 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
9459 * try:
9460 * _import_array()
9461 */
9462
__pyx_f_5numpy_import_array(void)9463 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
9464 int __pyx_r;
9465 __Pyx_RefNannyDeclarations
9466 PyObject *__pyx_t_1 = NULL;
9467 PyObject *__pyx_t_2 = NULL;
9468 PyObject *__pyx_t_3 = NULL;
9469 int __pyx_t_4;
9470 PyObject *__pyx_t_5 = NULL;
9471 PyObject *__pyx_t_6 = NULL;
9472 PyObject *__pyx_t_7 = NULL;
9473 PyObject *__pyx_t_8 = NULL;
9474 int __pyx_lineno = 0;
9475 const char *__pyx_filename = NULL;
9476 int __pyx_clineno = 0;
9477 __Pyx_RefNannySetupContext("import_array", 0);
9478
9479 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034
9480 * # Cython code.
9481 * cdef inline int import_array() except -1:
9482 * try: # <<<<<<<<<<<<<<
9483 * _import_array()
9484 * except Exception:
9485 */
9486 {
9487 __Pyx_PyThreadState_declare
9488 __Pyx_PyThreadState_assign
9489 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9490 __Pyx_XGOTREF(__pyx_t_1);
9491 __Pyx_XGOTREF(__pyx_t_2);
9492 __Pyx_XGOTREF(__pyx_t_3);
9493 /*try:*/ {
9494
9495 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1035
9496 * cdef inline int import_array() except -1:
9497 * try:
9498 * _import_array() # <<<<<<<<<<<<<<
9499 * except Exception:
9500 * raise ImportError("numpy.core.multiarray failed to import")
9501 */
9502 __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error)
9503
9504 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034
9505 * # Cython code.
9506 * cdef inline int import_array() except -1:
9507 * try: # <<<<<<<<<<<<<<
9508 * _import_array()
9509 * except Exception:
9510 */
9511 }
9512 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9513 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9514 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9515 goto __pyx_L8_try_end;
9516 __pyx_L3_error:;
9517
9518 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1036
9519 * try:
9520 * _import_array()
9521 * except Exception: # <<<<<<<<<<<<<<
9522 * raise ImportError("numpy.core.multiarray failed to import")
9523 *
9524 */
9525 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
9526 if (__pyx_t_4) {
9527 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
9528 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error)
9529 __Pyx_GOTREF(__pyx_t_5);
9530 __Pyx_GOTREF(__pyx_t_6);
9531 __Pyx_GOTREF(__pyx_t_7);
9532
9533 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1037
9534 * _import_array()
9535 * except Exception:
9536 * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
9537 *
9538 * cdef inline int import_umath() except -1:
9539 */
9540 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1037, __pyx_L5_except_error)
9541 __Pyx_GOTREF(__pyx_t_8);
9542 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
9543 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9544 __PYX_ERR(2, 1037, __pyx_L5_except_error)
9545 }
9546 goto __pyx_L5_except_error;
9547 __pyx_L5_except_error:;
9548
9549 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034
9550 * # Cython code.
9551 * cdef inline int import_array() except -1:
9552 * try: # <<<<<<<<<<<<<<
9553 * _import_array()
9554 * except Exception:
9555 */
9556 __Pyx_XGIVEREF(__pyx_t_1);
9557 __Pyx_XGIVEREF(__pyx_t_2);
9558 __Pyx_XGIVEREF(__pyx_t_3);
9559 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9560 goto __pyx_L1_error;
9561 __pyx_L8_try_end:;
9562 }
9563
9564 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1033
9565 * # Versions of the import_* functions which are more suitable for
9566 * # Cython code.
9567 * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
9568 * try:
9569 * _import_array()
9570 */
9571
9572 /* function exit code */
9573 __pyx_r = 0;
9574 goto __pyx_L0;
9575 __pyx_L1_error:;
9576 __Pyx_XDECREF(__pyx_t_5);
9577 __Pyx_XDECREF(__pyx_t_6);
9578 __Pyx_XDECREF(__pyx_t_7);
9579 __Pyx_XDECREF(__pyx_t_8);
9580 __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
9581 __pyx_r = -1;
9582 __pyx_L0:;
9583 __Pyx_RefNannyFinishContext();
9584 return __pyx_r;
9585 }
9586
9587 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1039
9588 * raise ImportError("numpy.core.multiarray failed to import")
9589 *
9590 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
9591 * try:
9592 * _import_umath()
9593 */
9594
__pyx_f_5numpy_import_umath(void)9595 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
9596 int __pyx_r;
9597 __Pyx_RefNannyDeclarations
9598 PyObject *__pyx_t_1 = NULL;
9599 PyObject *__pyx_t_2 = NULL;
9600 PyObject *__pyx_t_3 = NULL;
9601 int __pyx_t_4;
9602 PyObject *__pyx_t_5 = NULL;
9603 PyObject *__pyx_t_6 = NULL;
9604 PyObject *__pyx_t_7 = NULL;
9605 PyObject *__pyx_t_8 = NULL;
9606 int __pyx_lineno = 0;
9607 const char *__pyx_filename = NULL;
9608 int __pyx_clineno = 0;
9609 __Pyx_RefNannySetupContext("import_umath", 0);
9610
9611 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040
9612 *
9613 * cdef inline int import_umath() except -1:
9614 * try: # <<<<<<<<<<<<<<
9615 * _import_umath()
9616 * except Exception:
9617 */
9618 {
9619 __Pyx_PyThreadState_declare
9620 __Pyx_PyThreadState_assign
9621 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9622 __Pyx_XGOTREF(__pyx_t_1);
9623 __Pyx_XGOTREF(__pyx_t_2);
9624 __Pyx_XGOTREF(__pyx_t_3);
9625 /*try:*/ {
9626
9627 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1041
9628 * cdef inline int import_umath() except -1:
9629 * try:
9630 * _import_umath() # <<<<<<<<<<<<<<
9631 * except Exception:
9632 * raise ImportError("numpy.core.umath failed to import")
9633 */
9634 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1041, __pyx_L3_error)
9635
9636 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040
9637 *
9638 * cdef inline int import_umath() except -1:
9639 * try: # <<<<<<<<<<<<<<
9640 * _import_umath()
9641 * except Exception:
9642 */
9643 }
9644 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9645 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9646 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9647 goto __pyx_L8_try_end;
9648 __pyx_L3_error:;
9649
9650 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1042
9651 * try:
9652 * _import_umath()
9653 * except Exception: # <<<<<<<<<<<<<<
9654 * raise ImportError("numpy.core.umath failed to import")
9655 *
9656 */
9657 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
9658 if (__pyx_t_4) {
9659 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
9660 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1042, __pyx_L5_except_error)
9661 __Pyx_GOTREF(__pyx_t_5);
9662 __Pyx_GOTREF(__pyx_t_6);
9663 __Pyx_GOTREF(__pyx_t_7);
9664
9665 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1043
9666 * _import_umath()
9667 * except Exception:
9668 * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
9669 *
9670 * cdef inline int import_ufunc() except -1:
9671 */
9672 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1043, __pyx_L5_except_error)
9673 __Pyx_GOTREF(__pyx_t_8);
9674 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
9675 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9676 __PYX_ERR(2, 1043, __pyx_L5_except_error)
9677 }
9678 goto __pyx_L5_except_error;
9679 __pyx_L5_except_error:;
9680
9681 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040
9682 *
9683 * cdef inline int import_umath() except -1:
9684 * try: # <<<<<<<<<<<<<<
9685 * _import_umath()
9686 * except Exception:
9687 */
9688 __Pyx_XGIVEREF(__pyx_t_1);
9689 __Pyx_XGIVEREF(__pyx_t_2);
9690 __Pyx_XGIVEREF(__pyx_t_3);
9691 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9692 goto __pyx_L1_error;
9693 __pyx_L8_try_end:;
9694 }
9695
9696 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1039
9697 * raise ImportError("numpy.core.multiarray failed to import")
9698 *
9699 * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
9700 * try:
9701 * _import_umath()
9702 */
9703
9704 /* function exit code */
9705 __pyx_r = 0;
9706 goto __pyx_L0;
9707 __pyx_L1_error:;
9708 __Pyx_XDECREF(__pyx_t_5);
9709 __Pyx_XDECREF(__pyx_t_6);
9710 __Pyx_XDECREF(__pyx_t_7);
9711 __Pyx_XDECREF(__pyx_t_8);
9712 __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
9713 __pyx_r = -1;
9714 __pyx_L0:;
9715 __Pyx_RefNannyFinishContext();
9716 return __pyx_r;
9717 }
9718
9719 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045
9720 * raise ImportError("numpy.core.umath failed to import")
9721 *
9722 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
9723 * try:
9724 * _import_umath()
9725 */
9726
__pyx_f_5numpy_import_ufunc(void)9727 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
9728 int __pyx_r;
9729 __Pyx_RefNannyDeclarations
9730 PyObject *__pyx_t_1 = NULL;
9731 PyObject *__pyx_t_2 = NULL;
9732 PyObject *__pyx_t_3 = NULL;
9733 int __pyx_t_4;
9734 PyObject *__pyx_t_5 = NULL;
9735 PyObject *__pyx_t_6 = NULL;
9736 PyObject *__pyx_t_7 = NULL;
9737 PyObject *__pyx_t_8 = NULL;
9738 int __pyx_lineno = 0;
9739 const char *__pyx_filename = NULL;
9740 int __pyx_clineno = 0;
9741 __Pyx_RefNannySetupContext("import_ufunc", 0);
9742
9743 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046
9744 *
9745 * cdef inline int import_ufunc() except -1:
9746 * try: # <<<<<<<<<<<<<<
9747 * _import_umath()
9748 * except Exception:
9749 */
9750 {
9751 __Pyx_PyThreadState_declare
9752 __Pyx_PyThreadState_assign
9753 __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
9754 __Pyx_XGOTREF(__pyx_t_1);
9755 __Pyx_XGOTREF(__pyx_t_2);
9756 __Pyx_XGOTREF(__pyx_t_3);
9757 /*try:*/ {
9758
9759 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1047
9760 * cdef inline int import_ufunc() except -1:
9761 * try:
9762 * _import_umath() # <<<<<<<<<<<<<<
9763 * except Exception:
9764 * raise ImportError("numpy.core.umath failed to import")
9765 */
9766 __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1047, __pyx_L3_error)
9767
9768 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046
9769 *
9770 * cdef inline int import_ufunc() except -1:
9771 * try: # <<<<<<<<<<<<<<
9772 * _import_umath()
9773 * except Exception:
9774 */
9775 }
9776 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
9777 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9778 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
9779 goto __pyx_L8_try_end;
9780 __pyx_L3_error:;
9781
9782 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1048
9783 * try:
9784 * _import_umath()
9785 * except Exception: # <<<<<<<<<<<<<<
9786 * raise ImportError("numpy.core.umath failed to import")
9787 */
9788 __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
9789 if (__pyx_t_4) {
9790 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
9791 if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1048, __pyx_L5_except_error)
9792 __Pyx_GOTREF(__pyx_t_5);
9793 __Pyx_GOTREF(__pyx_t_6);
9794 __Pyx_GOTREF(__pyx_t_7);
9795
9796 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1049
9797 * _import_umath()
9798 * except Exception:
9799 * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
9800 */
9801 __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1049, __pyx_L5_except_error)
9802 __Pyx_GOTREF(__pyx_t_8);
9803 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
9804 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9805 __PYX_ERR(2, 1049, __pyx_L5_except_error)
9806 }
9807 goto __pyx_L5_except_error;
9808 __pyx_L5_except_error:;
9809
9810 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046
9811 *
9812 * cdef inline int import_ufunc() except -1:
9813 * try: # <<<<<<<<<<<<<<
9814 * _import_umath()
9815 * except Exception:
9816 */
9817 __Pyx_XGIVEREF(__pyx_t_1);
9818 __Pyx_XGIVEREF(__pyx_t_2);
9819 __Pyx_XGIVEREF(__pyx_t_3);
9820 __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
9821 goto __pyx_L1_error;
9822 __pyx_L8_try_end:;
9823 }
9824
9825 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045
9826 * raise ImportError("numpy.core.umath failed to import")
9827 *
9828 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
9829 * try:
9830 * _import_umath()
9831 */
9832
9833 /* function exit code */
9834 __pyx_r = 0;
9835 goto __pyx_L0;
9836 __pyx_L1_error:;
9837 __Pyx_XDECREF(__pyx_t_5);
9838 __Pyx_XDECREF(__pyx_t_6);
9839 __Pyx_XDECREF(__pyx_t_7);
9840 __Pyx_XDECREF(__pyx_t_8);
9841 __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
9842 __pyx_r = -1;
9843 __pyx_L0:;
9844 __Pyx_RefNannyFinishContext();
9845 return __pyx_r;
9846 }
9847 static struct __pyx_vtabstruct_4cylp_2cy_10CyCbcModel_CyCbcModel __pyx_vtable_4cylp_2cy_10CyCbcModel_CyCbcModel;
9848
__pyx_tp_new_4cylp_2cy_10CyCbcModel_CyCbcModel(PyTypeObject * t,PyObject * a,PyObject * k)9849 static PyObject *__pyx_tp_new_4cylp_2cy_10CyCbcModel_CyCbcModel(PyTypeObject *t, PyObject *a, PyObject *k) {
9850 struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *p;
9851 PyObject *o;
9852 if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
9853 o = (*t->tp_alloc)(t, 0);
9854 } else {
9855 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
9856 }
9857 if (unlikely(!o)) return 0;
9858 p = ((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)o);
9859 p->__pyx_vtab = __pyx_vtabptr_4cylp_2cy_10CyCbcModel_CyCbcModel;
9860 p->cyLPModel = Py_None; Py_INCREF(Py_None);
9861 p->clpModel = Py_None; Py_INCREF(Py_None);
9862 p->cutGenerators = Py_None; Py_INCREF(Py_None);
9863 if (unlikely(__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_1__cinit__(o, a, k) < 0)) goto bad;
9864 return o;
9865 bad:
9866 Py_DECREF(o); o = 0;
9867 return NULL;
9868 }
9869
__pyx_tp_dealloc_4cylp_2cy_10CyCbcModel_CyCbcModel(PyObject * o)9870 static void __pyx_tp_dealloc_4cylp_2cy_10CyCbcModel_CyCbcModel(PyObject *o) {
9871 struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *p = (struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)o;
9872 #if CYTHON_USE_TP_FINALIZE
9873 if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
9874 if (PyObject_CallFinalizerFromDealloc(o)) return;
9875 }
9876 #endif
9877 PyObject_GC_UnTrack(o);
9878 {
9879 PyObject *etype, *eval, *etb;
9880 PyErr_Fetch(&etype, &eval, &etb);
9881 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
9882 __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_3__dealloc__(o);
9883 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
9884 PyErr_Restore(etype, eval, etb);
9885 }
9886 Py_CLEAR(p->cyLPModel);
9887 Py_CLEAR(p->clpModel);
9888 Py_CLEAR(p->cutGenerators);
9889 (*Py_TYPE(o)->tp_free)(o);
9890 }
9891
__pyx_tp_traverse_4cylp_2cy_10CyCbcModel_CyCbcModel(PyObject * o,visitproc v,void * a)9892 static int __pyx_tp_traverse_4cylp_2cy_10CyCbcModel_CyCbcModel(PyObject *o, visitproc v, void *a) {
9893 int e;
9894 struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *p = (struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)o;
9895 if (p->cyLPModel) {
9896 e = (*v)(p->cyLPModel, a); if (e) return e;
9897 }
9898 if (p->clpModel) {
9899 e = (*v)(p->clpModel, a); if (e) return e;
9900 }
9901 if (p->cutGenerators) {
9902 e = (*v)(p->cutGenerators, a); if (e) return e;
9903 }
9904 return 0;
9905 }
9906
__pyx_tp_clear_4cylp_2cy_10CyCbcModel_CyCbcModel(PyObject * o)9907 static int __pyx_tp_clear_4cylp_2cy_10CyCbcModel_CyCbcModel(PyObject *o) {
9908 PyObject* tmp;
9909 struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *p = (struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)o;
9910 tmp = ((PyObject*)p->cyLPModel);
9911 p->cyLPModel = Py_None; Py_INCREF(Py_None);
9912 Py_XDECREF(tmp);
9913 tmp = ((PyObject*)p->clpModel);
9914 p->clpModel = Py_None; Py_INCREF(Py_None);
9915 Py_XDECREF(tmp);
9916 tmp = ((PyObject*)p->cutGenerators);
9917 p->cutGenerators = Py_None; Py_INCREF(Py_None);
9918 Py_XDECREF(tmp);
9919 return 0;
9920 }
9921
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_status(PyObject * o,CYTHON_UNUSED void * x)9922 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_status(PyObject *o, CYTHON_UNUSED void *x) {
9923 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status_1__get__(o);
9924 }
9925
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_logLevel(PyObject * o,CYTHON_UNUSED void * x)9926 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_logLevel(PyObject *o, CYTHON_UNUSED void *x) {
9927 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_1__get__(o);
9928 }
9929
__pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_logLevel(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)9930 static int __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_logLevel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
9931 if (v) {
9932 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_3__set__(o, v);
9933 }
9934 else {
9935 PyErr_SetString(PyExc_NotImplementedError, "__del__");
9936 return -1;
9937 }
9938 }
9939
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_osiSolverInteface(PyObject * o,CYTHON_UNUSED void * x)9940 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_osiSolverInteface(PyObject *o, CYTHON_UNUSED void *x) {
9941 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface_1__get__(o);
9942 }
9943
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_primalVariableSolution(PyObject * o,CYTHON_UNUSED void * x)9944 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_primalVariableSolution(PyObject *o, CYTHON_UNUSED void *x) {
9945 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution_1__get__(o);
9946 }
9947
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_solutionCount(PyObject * o,CYTHON_UNUSED void * x)9948 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_solutionCount(PyObject *o, CYTHON_UNUSED void *x) {
9949 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount_1__get__(o);
9950 }
9951
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberHeuristicSolutions(PyObject * o,CYTHON_UNUSED void * x)9952 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberHeuristicSolutions(PyObject *o, CYTHON_UNUSED void *x) {
9953 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicSolutions_1__get__(o);
9954 }
9955
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_nodeCount(PyObject * o,CYTHON_UNUSED void * x)9956 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_nodeCount(PyObject *o, CYTHON_UNUSED void *x) {
9957 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount_1__get__(o);
9958 }
9959
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_objectiveValue(PyObject * o,CYTHON_UNUSED void * x)9960 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_objectiveValue(PyObject *o, CYTHON_UNUSED void *x) {
9961 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue_1__get__(o);
9962 }
9963
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_bestPossibleObjValue(PyObject * o,CYTHON_UNUSED void * x)9964 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_bestPossibleObjValue(PyObject *o, CYTHON_UNUSED void *x) {
9965 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjValue_1__get__(o);
9966 }
9967
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberObjects(PyObject * o,CYTHON_UNUSED void * x)9968 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberObjects(PyObject *o, CYTHON_UNUSED void *x) {
9969 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects_1__get__(o);
9970 }
9971
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_integerTolerance(PyObject * o,CYTHON_UNUSED void * x)9972 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_integerTolerance(PyObject *o, CYTHON_UNUSED void *x) {
9973 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_1__get__(o);
9974 }
9975
__pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_integerTolerance(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)9976 static int __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_integerTolerance(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
9977 if (v) {
9978 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_3__set__(o, v);
9979 }
9980 else {
9981 PyErr_SetString(PyExc_NotImplementedError, "__del__");
9982 return -1;
9983 }
9984 }
9985
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSeconds(PyObject * o,CYTHON_UNUSED void * x)9986 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSeconds(PyObject *o, CYTHON_UNUSED void *x) {
9987 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_1__get__(o);
9988 }
9989
__pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSeconds(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)9990 static int __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSeconds(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
9991 if (v) {
9992 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_3__set__(o, v);
9993 }
9994 else {
9995 PyErr_SetString(PyExc_NotImplementedError, "__del__");
9996 return -1;
9997 }
9998 }
9999
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumNodes(PyObject * o,CYTHON_UNUSED void * x)10000 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumNodes(PyObject *o, CYTHON_UNUSED void *x) {
10001 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_1__get__(o);
10002 }
10003
__pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumNodes(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)10004 static int __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumNodes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
10005 if (v) {
10006 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_3__set__(o, v);
10007 }
10008 else {
10009 PyErr_SetString(PyExc_NotImplementedError, "__del__");
10010 return -1;
10011 }
10012 }
10013
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberThreads(PyObject * o,CYTHON_UNUSED void * x)10014 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberThreads(PyObject *o, CYTHON_UNUSED void *x) {
10015 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_1__get__(o);
10016 }
10017
__pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberThreads(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)10018 static int __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberThreads(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
10019 if (v) {
10020 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_3__set__(o, v);
10021 }
10022 else {
10023 PyErr_SetString(PyExc_NotImplementedError, "__del__");
10024 return -1;
10025 }
10026 }
10027
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableGap(PyObject * o,CYTHON_UNUSED void * x)10028 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableGap(PyObject *o, CYTHON_UNUSED void *x) {
10029 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_1__get__(o);
10030 }
10031
__pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableGap(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)10032 static int __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableGap(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
10033 if (v) {
10034 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_3__set__(o, v);
10035 }
10036 else {
10037 PyErr_SetString(PyExc_NotImplementedError, "__del__");
10038 return -1;
10039 }
10040 }
10041
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableFractionGap(PyObject * o,CYTHON_UNUSED void * x)10042 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableFractionGap(PyObject *o, CYTHON_UNUSED void *x) {
10043 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_1__get__(o);
10044 }
10045
__pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableFractionGap(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)10046 static int __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableFractionGap(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
10047 if (v) {
10048 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_3__set__(o, v);
10049 }
10050 else {
10051 PyErr_SetString(PyExc_NotImplementedError, "__del__");
10052 return -1;
10053 }
10054 }
10055
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowablePercentageGap(PyObject * o,CYTHON_UNUSED void * x)10056 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowablePercentageGap(PyObject *o, CYTHON_UNUSED void *x) {
10057 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_1__get__(o);
10058 }
10059
__pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowablePercentageGap(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)10060 static int __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowablePercentageGap(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
10061 if (v) {
10062 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap_3__set__(o, v);
10063 }
10064 else {
10065 PyErr_SetString(PyExc_NotImplementedError, "__del__");
10066 return -1;
10067 }
10068 }
10069
__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSolutions(PyObject * o,CYTHON_UNUSED void * x)10070 static PyObject *__pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSolutions(PyObject *o, CYTHON_UNUSED void *x) {
10071 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_1__get__(o);
10072 }
10073
__pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSolutions(PyObject * o,PyObject * v,CYTHON_UNUSED void * x)10074 static int __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSolutions(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
10075 if (v) {
10076 return __pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_3__set__(o, v);
10077 }
10078 else {
10079 PyErr_SetString(PyExc_NotImplementedError, "__del__");
10080 return -1;
10081 }
10082 }
10083
10084 static PyMethodDef __pyx_methods_4cylp_2cy_10CyCbcModel_CyCbcModel[] = {
10085 {"setNodeCompare", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_5setNodeCompare, METH_O, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_4setNodeCompare},
10086 {"addCutGenerator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_7addCutGenerator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_6addCutGenerator},
10087 {"addPythonCutGenerator", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_9addPythonCutGenerator, METH_VARARGS|METH_KEYWORDS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_8addPythonCutGenerator},
10088 {"solve", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_11solve, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_10solve},
10089 {"isRelaxationInfeasible", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13isRelaxationInfeasible, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible},
10090 {"isRelaxationDualInfeasible", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_15isRelaxationDualInfeasible, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible},
10091 {"isRelaxationOptimal", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17isRelaxationOptimal, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal},
10092 {"isRelaxationAbondoned", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned},
10093 {"__reduce_cython__", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_21__reduce_cython__, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_20__reduce_cython__},
10094 {"__setstate_cython__", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_23__setstate_cython__, METH_O, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cython__},
10095 {0, 0, 0, 0}
10096 };
10097
10098 static struct PyGetSetDef __pyx_getsets_4cylp_2cy_10CyCbcModel_CyCbcModel[] = {
10099 {(char *)"status", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_status, 0, (char *)0, 0},
10100 {(char *)"logLevel", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_logLevel, __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_logLevel, (char *)0, 0},
10101 {(char *)"osiSolverInteface", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_osiSolverInteface, 0, (char *)0, 0},
10102 {(char *)"primalVariableSolution", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_primalVariableSolution, 0, (char *)0, 0},
10103 {(char *)"solutionCount", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_solutionCount, 0, (char *)0, 0},
10104 {(char *)"numberHeuristicSolutions", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberHeuristicSolutions, 0, (char *)0, 0},
10105 {(char *)"nodeCount", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_nodeCount, 0, (char *)0, 0},
10106 {(char *)"objectiveValue", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_objectiveValue, 0, (char *)0, 0},
10107 {(char *)"bestPossibleObjValue", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_bestPossibleObjValue, 0, (char *)0, 0},
10108 {(char *)"numberObjects", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberObjects, 0, (char *)0, 0},
10109 {(char *)"integerTolerance", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_integerTolerance, __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_integerTolerance, (char *)0, 0},
10110 {(char *)"maximumSeconds", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSeconds, __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSeconds, (char *)0, 0},
10111 {(char *)"maximumNodes", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumNodes, __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumNodes, (char *)0, 0},
10112 {(char *)"numberThreads", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberThreads, __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_numberThreads, (char *)0, 0},
10113 {(char *)"allowableGap", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableGap, __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableGap, (char *)0, 0},
10114 {(char *)"allowableFractionGap", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableFractionGap, __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowableFractionGap, (char *)0, 0},
10115 {(char *)"allowablePercentageGap", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowablePercentageGap, __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_allowablePercentageGap, (char *)0, 0},
10116 {(char *)"maximumSolutions", __pyx_getprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSolutions, __pyx_setprop_4cylp_2cy_10CyCbcModel_10CyCbcModel_maximumSolutions, (char *)0, 0},
10117 {0, 0, 0, 0, 0}
10118 };
10119
10120 static PyTypeObject __pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel = {
10121 PyVarObject_HEAD_INIT(0, 0)
10122 "cylp.cy.CyCbcModel.CyCbcModel", /*tp_name*/
10123 sizeof(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel), /*tp_basicsize*/
10124 0, /*tp_itemsize*/
10125 __pyx_tp_dealloc_4cylp_2cy_10CyCbcModel_CyCbcModel, /*tp_dealloc*/
10126 #if PY_VERSION_HEX < 0x030800b4
10127 0, /*tp_print*/
10128 #endif
10129 #if PY_VERSION_HEX >= 0x030800b4
10130 0, /*tp_vectorcall_offset*/
10131 #endif
10132 0, /*tp_getattr*/
10133 0, /*tp_setattr*/
10134 #if PY_MAJOR_VERSION < 3
10135 0, /*tp_compare*/
10136 #endif
10137 #if PY_MAJOR_VERSION >= 3
10138 0, /*tp_as_async*/
10139 #endif
10140 0, /*tp_repr*/
10141 0, /*tp_as_number*/
10142 0, /*tp_as_sequence*/
10143 0, /*tp_as_mapping*/
10144 0, /*tp_hash*/
10145 0, /*tp_call*/
10146 0, /*tp_str*/
10147 0, /*tp_getattro*/
10148 0, /*tp_setattro*/
10149 0, /*tp_as_buffer*/
10150 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
10151 "\n Interfaces ``CbcModel``. To solve a first you create a\n :class:`cylp.cy.CyClpSimplex` object either\n by reading it from an ``mps`` file using\n :func:`CyClpSimplex.readMps() <cylp.cy.CyClpSimplex.CyClpSimplex.readMps>`\n or by using cylp modeling tool\n :mod:`cylp.py.modeling.CyLPModel`. Then you ask the object for a\n ``CyCbcModel`` which is capable solving MIPs using B&B\n\n **Usage**\n\n >>> import numpy as np\n >>> from cylp.cy import CyCbcModel, CyClpSimplex\n >>> from cylp.py.modeling.CyLPModel import CyLPModel, CyLPArray\n >>> model = CyLPModel()\n >>>\n >>> x = model.addVariable('x', 3, isInt=True)\n >>> y = model.addVariable('y', 2)\n >>>\n >>> A = np.matrix([[1., 2., 0],[1., 0, 1.]])\n >>> B = np.matrix([[1., 0, 0], [0, 0, 1.]])\n >>> D = np.matrix([[1., 2.],[0, 1]])\n >>> a = CyLPArray([5, 2.5])\n >>> b = CyLPArray([4.2, 3])\n >>> x_u= CyLPArray([2., 3.5])\n >>>\n >>> model += A*x <= a\n >>> model += 2 <= B * x + D * y <= b\n >>> model += y >= 0\n >>> model += 1.1 <= x[1:3] <= x_u\n >>>\n >>> c = CyLPArray([1., -2., 3.])\n >>> model.objective = c * x + 2 * y.sum()\n >>>\n >>> s = CyClpSimplex(model)\n >>>\n >>> cbcModel = s.getCbcModel()\n >>>\n >>> cbcModel.solve()\n 0\n >>> print (cbcModel.status)\n 'solution'\n >>> sol_x = cbcModel.primalVariableSolution['x']\n >>>\n >>> (abs(sol_x - np.array([0, 2, 2])) <= 10**-6).all()\n True\n\n ", /*tp_doc*/
10152 __pyx_tp_traverse_4cylp_2cy_10CyCbcModel_CyCbcModel, /*tp_traverse*/
10153 __pyx_tp_clear_4cylp_2cy_10CyCbcModel_CyCbcModel, /*tp_clear*/
10154 0, /*tp_richcompare*/
10155 0, /*tp_weaklistoffset*/
10156 0, /*tp_iter*/
10157 0, /*tp_iternext*/
10158 __pyx_methods_4cylp_2cy_10CyCbcModel_CyCbcModel, /*tp_methods*/
10159 0, /*tp_members*/
10160 __pyx_getsets_4cylp_2cy_10CyCbcModel_CyCbcModel, /*tp_getset*/
10161 0, /*tp_base*/
10162 0, /*tp_dict*/
10163 0, /*tp_descr_get*/
10164 0, /*tp_descr_set*/
10165 0, /*tp_dictoffset*/
10166 0, /*tp_init*/
10167 0, /*tp_alloc*/
10168 __pyx_tp_new_4cylp_2cy_10CyCbcModel_CyCbcModel, /*tp_new*/
10169 0, /*tp_free*/
10170 0, /*tp_is_gc*/
10171 0, /*tp_bases*/
10172 0, /*tp_mro*/
10173 0, /*tp_cache*/
10174 0, /*tp_subclasses*/
10175 0, /*tp_weaklist*/
10176 0, /*tp_del*/
10177 0, /*tp_version_tag*/
10178 #if PY_VERSION_HEX >= 0x030400a1
10179 0, /*tp_finalize*/
10180 #endif
10181 #if PY_VERSION_HEX >= 0x030800b1
10182 0, /*tp_vectorcall*/
10183 #endif
10184 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
10185 0, /*tp_print*/
10186 #endif
10187 };
10188
10189 static PyMethodDef __pyx_methods[] = {
10190 {0, 0, 0, 0}
10191 };
10192
10193 #if PY_MAJOR_VERSION >= 3
10194 #if CYTHON_PEP489_MULTI_PHASE_INIT
10195 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
10196 static int __pyx_pymod_exec_CyCbcModel(PyObject* module); /*proto*/
10197 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
10198 {Py_mod_create, (void*)__pyx_pymod_create},
10199 {Py_mod_exec, (void*)__pyx_pymod_exec_CyCbcModel},
10200 {0, NULL}
10201 };
10202 #endif
10203
10204 static struct PyModuleDef __pyx_moduledef = {
10205 PyModuleDef_HEAD_INIT,
10206 "CyCbcModel",
10207 0, /* m_doc */
10208 #if CYTHON_PEP489_MULTI_PHASE_INIT
10209 0, /* m_size */
10210 #else
10211 -1, /* m_size */
10212 #endif
10213 __pyx_methods /* m_methods */,
10214 #if CYTHON_PEP489_MULTI_PHASE_INIT
10215 __pyx_moduledef_slots, /* m_slots */
10216 #else
10217 NULL, /* m_reload */
10218 #endif
10219 NULL, /* m_traverse */
10220 NULL, /* m_clear */
10221 NULL /* m_free */
10222 };
10223 #endif
10224 #ifndef CYTHON_SMALL_CODE
10225 #if defined(__clang__)
10226 #define CYTHON_SMALL_CODE
10227 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
10228 #define CYTHON_SMALL_CODE __attribute__((cold))
10229 #else
10230 #define CYTHON_SMALL_CODE
10231 #endif
10232 #endif
10233
10234 static __Pyx_StringTabEntry __pyx_string_tab[] = {
10235 {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
10236 {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
10237 {&__pyx_n_s_CyCbcModel, __pyx_k_CyCbcModel, sizeof(__pyx_k_CyCbcModel), 0, 0, 1, 1},
10238 {&__pyx_n_s_CyLPSolution, __pyx_k_CyLPSolution, sizeof(__pyx_k_CyLPSolution), 0, 0, 1, 1},
10239 {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
10240 {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
10241 {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
10242 {&__pyx_n_s_NodeCompareBase, __pyx_k_NodeCompareBase, sizeof(__pyx_k_NodeCompareBase), 0, 0, 1, 1},
10243 {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
10244 {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
10245 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
10246 {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
10247 {&__pyx_n_s_addCutGenerator, __pyx_k_addCutGenerator, sizeof(__pyx_k_addCutGenerator), 0, 0, 1, 1},
10248 {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
10249 {&__pyx_n_s_atSolution, __pyx_k_atSolution, sizeof(__pyx_k_atSolution), 0, 0, 1, 1},
10250 {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
10251 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
10252 {&__pyx_n_s_compare, __pyx_k_compare, sizeof(__pyx_k_compare), 0, 0, 1, 1},
10253 {&__pyx_n_s_cyLPModel, __pyx_k_cyLPModel, sizeof(__pyx_k_cyLPModel), 0, 0, 1, 1},
10254 {&__pyx_n_s_cylp_py_mip, __pyx_k_cylp_py_mip, sizeof(__pyx_k_cylp_py_mip), 0, 0, 1, 1},
10255 {&__pyx_n_s_cylp_py_modeling_CyLPModel, __pyx_k_cylp_py_modeling_CyLPModel, sizeof(__pyx_k_cylp_py_modeling_CyLPModel), 0, 0, 1, 1},
10256 {&__pyx_n_s_dims, __pyx_k_dims, sizeof(__pyx_k_dims), 0, 0, 1, 1},
10257 {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
10258 {&__pyx_n_s_every1000Nodes, __pyx_k_every1000Nodes, sizeof(__pyx_k_every1000Nodes), 0, 0, 1, 1},
10259 {&__pyx_n_s_generator, __pyx_k_generator, sizeof(__pyx_k_generator), 0, 0, 1, 1},
10260 {&__pyx_n_s_getVarByName, __pyx_k_getVarByName, sizeof(__pyx_k_getVarByName), 0, 0, 1, 1},
10261 {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
10262 {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
10263 {&__pyx_n_s_howOften, __pyx_k_howOften, sizeof(__pyx_k_howOften), 0, 0, 1, 1},
10264 {&__pyx_n_s_howOftenInSub, __pyx_k_howOftenInSub, sizeof(__pyx_k_howOftenInSub), 0, 0, 1, 1},
10265 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
10266 {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1},
10267 {&__pyx_n_s_inds, __pyx_k_inds, sizeof(__pyx_k_inds), 0, 0, 1, 1},
10268 {&__pyx_n_s_infeasible, __pyx_k_infeasible, sizeof(__pyx_k_infeasible), 0, 0, 1, 1},
10269 {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
10270 {&__pyx_n_s_izip, __pyx_k_izip, sizeof(__pyx_k_izip), 0, 0, 1, 1},
10271 {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
10272 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
10273 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
10274 {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
10275 {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
10276 {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
10277 {&__pyx_n_s_newSolution, __pyx_k_newSolution, sizeof(__pyx_k_newSolution), 0, 0, 1, 1},
10278 {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
10279 {&__pyx_n_s_normal, __pyx_k_normal, sizeof(__pyx_k_normal), 0, 0, 1, 1},
10280 {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
10281 {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
10282 {&__pyx_n_s_problemStatus, __pyx_k_problemStatus, sizeof(__pyx_k_problemStatus), 0, 0, 1, 1},
10283 {&__pyx_n_s_product, __pyx_k_product, sizeof(__pyx_k_product), 0, 0, 1, 1},
10284 {&__pyx_n_s_pythonCutGeneratorObject, __pyx_k_pythonCutGeneratorObject, sizeof(__pyx_k_pythonCutGeneratorObject), 0, 0, 1, 1},
10285 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
10286 {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
10287 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
10288 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
10289 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
10290 {&__pyx_kp_s_relaxation_infeasible, __pyx_k_relaxation_infeasible, sizeof(__pyx_k_relaxation_infeasible), 0, 0, 1, 0},
10291 {&__pyx_kp_s_setNodeCompare_argument_should_b, __pyx_k_setNodeCompare_argument_should_b, sizeof(__pyx_k_setNodeCompare_argument_should_b), 0, 0, 1, 0},
10292 {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
10293 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
10294 {&__pyx_n_s_solution, __pyx_k_solution, sizeof(__pyx_k_solution), 0, 0, 1, 1},
10295 {&__pyx_kp_s_stopped_on_gap, __pyx_k_stopped_on_gap, sizeof(__pyx_k_stopped_on_gap), 0, 0, 1, 0},
10296 {&__pyx_kp_s_stopped_on_nodes, __pyx_k_stopped_on_nodes, sizeof(__pyx_k_stopped_on_nodes), 0, 0, 1, 0},
10297 {&__pyx_kp_s_stopped_on_solutionslinear_relax, __pyx_k_stopped_on_solutionslinear_relax, sizeof(__pyx_k_stopped_on_solutionslinear_relax), 0, 0, 1, 0},
10298 {&__pyx_kp_s_stopped_on_time, __pyx_k_stopped_on_time, sizeof(__pyx_k_stopped_on_time), 0, 0, 1, 0},
10299 {&__pyx_kp_s_stopped_on_user_event, __pyx_k_stopped_on_user_event, sizeof(__pyx_k_stopped_on_user_event), 0, 0, 1, 0},
10300 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
10301 {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
10302 {&__pyx_n_s_unset, __pyx_k_unset, sizeof(__pyx_k_unset), 0, 0, 1, 1},
10303 {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
10304 {&__pyx_n_s_varIndex, __pyx_k_varIndex, sizeof(__pyx_k_varIndex), 0, 0, 1, 1},
10305 {&__pyx_n_s_variableNames, __pyx_k_variableNames, sizeof(__pyx_k_variableNames), 0, 0, 1, 1},
10306 {&__pyx_n_s_whatDepth, __pyx_k_whatDepth, sizeof(__pyx_k_whatDepth), 0, 0, 1, 1},
10307 {&__pyx_n_s_whatDepthInSub, __pyx_k_whatDepthInSub, sizeof(__pyx_k_whatDepthInSub), 0, 0, 1, 1},
10308 {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
10309 {0, 0, 0, 0, 0, 0, 0}
10310 };
__Pyx_InitCachedBuiltins(void)10311 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
10312 __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 6, __pyx_L1_error)
10313 __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 7, __pyx_L1_error)
10314 __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 99, __pyx_L1_error)
10315 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 112, __pyx_L1_error)
10316 __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 199, __pyx_L1_error)
10317 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error)
10318 __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 855, __pyx_L1_error)
10319 return 0;
10320 __pyx_L1_error:;
10321 return -1;
10322 }
10323
__Pyx_InitCachedConstants(void)10324 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
10325 __Pyx_RefNannyDeclarations
10326 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
10327
10328 /* "(tree fragment)":2
10329 * def __reduce_cython__(self):
10330 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
10331 * def __setstate_cython__(self, __pyx_state):
10332 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10333 */
10334 __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 2, __pyx_L1_error)
10335 __Pyx_GOTREF(__pyx_tuple__2);
10336 __Pyx_GIVEREF(__pyx_tuple__2);
10337
10338 /* "(tree fragment)":4
10339 * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
10340 * def __setstate_cython__(self, __pyx_state):
10341 * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
10342 */
10343 __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 4, __pyx_L1_error)
10344 __Pyx_GOTREF(__pyx_tuple__3);
10345 __Pyx_GIVEREF(__pyx_tuple__3);
10346
10347 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":272
10348 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
10349 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
10350 * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
10351 *
10352 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
10353 */
10354 __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 272, __pyx_L1_error)
10355 __Pyx_GOTREF(__pyx_tuple__4);
10356 __Pyx_GIVEREF(__pyx_tuple__4);
10357
10358 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":276
10359 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
10360 * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
10361 * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
10362 *
10363 * info.buf = PyArray_DATA(self)
10364 */
10365 __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 276, __pyx_L1_error)
10366 __Pyx_GOTREF(__pyx_tuple__5);
10367 __Pyx_GIVEREF(__pyx_tuple__5);
10368
10369 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":306
10370 * if ((descr.byteorder == c'>' and little_endian) or
10371 * (descr.byteorder == c'<' and not little_endian)):
10372 * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
10373 * if t == NPY_BYTE: f = "b"
10374 * elif t == NPY_UBYTE: f = "B"
10375 */
10376 __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 306, __pyx_L1_error)
10377 __Pyx_GOTREF(__pyx_tuple__6);
10378 __Pyx_GIVEREF(__pyx_tuple__6);
10379
10380 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":855
10381 *
10382 * if (end - f) - <int>(new_offset - offset[0]) < 15:
10383 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
10384 *
10385 * if ((child.byteorder == c'>' and little_endian) or
10386 */
10387 __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 855, __pyx_L1_error)
10388 __Pyx_GOTREF(__pyx_tuple__7);
10389 __Pyx_GIVEREF(__pyx_tuple__7);
10390
10391 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":879
10392 * t = child.type_num
10393 * if end - f < 5:
10394 * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
10395 *
10396 * # Until ticket #99 is fixed, use integers to avoid warnings
10397 */
10398 __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 879, __pyx_L1_error)
10399 __Pyx_GOTREF(__pyx_tuple__8);
10400 __Pyx_GIVEREF(__pyx_tuple__8);
10401
10402 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1037
10403 * _import_array()
10404 * except Exception:
10405 * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
10406 *
10407 * cdef inline int import_umath() except -1:
10408 */
10409 __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1037, __pyx_L1_error)
10410 __Pyx_GOTREF(__pyx_tuple__9);
10411 __Pyx_GIVEREF(__pyx_tuple__9);
10412
10413 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1043
10414 * _import_umath()
10415 * except Exception:
10416 * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
10417 *
10418 * cdef inline int import_ufunc() except -1:
10419 */
10420 __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1043, __pyx_L1_error)
10421 __Pyx_GOTREF(__pyx_tuple__10);
10422 __Pyx_GIVEREF(__pyx_tuple__10);
10423 __Pyx_RefNannyFinishContext();
10424 return 0;
10425 __pyx_L1_error:;
10426 __Pyx_RefNannyFinishContext();
10427 return -1;
10428 }
10429
__Pyx_InitGlobals(void)10430 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
10431 if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
10432 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
10433 __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
10434 __pyx_int_neg_100 = PyInt_FromLong(-100); if (unlikely(!__pyx_int_neg_100)) __PYX_ERR(0, 1, __pyx_L1_error)
10435 return 0;
10436 __pyx_L1_error:;
10437 return -1;
10438 }
10439
10440 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
10441 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
10442 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
10443 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
10444 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
10445 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
10446 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
10447
__Pyx_modinit_global_init_code(void)10448 static int __Pyx_modinit_global_init_code(void) {
10449 __Pyx_RefNannyDeclarations
10450 __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
10451 /*--- Global init code ---*/
10452 __Pyx_RefNannyFinishContext();
10453 return 0;
10454 }
10455
__Pyx_modinit_variable_export_code(void)10456 static int __Pyx_modinit_variable_export_code(void) {
10457 __Pyx_RefNannyDeclarations
10458 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
10459 /*--- Variable export code ---*/
10460 __Pyx_RefNannyFinishContext();
10461 return 0;
10462 }
10463
__Pyx_modinit_function_export_code(void)10464 static int __Pyx_modinit_function_export_code(void) {
10465 __Pyx_RefNannyDeclarations
10466 __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
10467 /*--- Function export code ---*/
10468 __Pyx_RefNannyFinishContext();
10469 return 0;
10470 }
10471
__Pyx_modinit_type_init_code(void)10472 static int __Pyx_modinit_type_init_code(void) {
10473 __Pyx_RefNannyDeclarations
10474 int __pyx_lineno = 0;
10475 const char *__pyx_filename = NULL;
10476 int __pyx_clineno = 0;
10477 __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
10478 /*--- Type init code ---*/
10479 __pyx_vtabptr_4cylp_2cy_10CyCbcModel_CyCbcModel = &__pyx_vtable_4cylp_2cy_10CyCbcModel_CyCbcModel;
10480 __pyx_vtable_4cylp_2cy_10CyCbcModel_CyCbcModel.setCppSelf = (PyObject *(*)(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *, ICbcModel *))__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_setCppSelf;
10481 __pyx_vtable_4cylp_2cy_10CyCbcModel_CyCbcModel.setClpModel = (PyObject *(*)(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *, PyObject *))__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_setClpModel;
10482 __pyx_vtable_4cylp_2cy_10CyCbcModel_CyCbcModel.addCutGenerator = (PyObject *(*)(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *, struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *, int __pyx_skip_dispatch, struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator *__pyx_optional_args))__pyx_f_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator;
10483 if (PyType_Ready(&__pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
10484 #if PY_VERSION_HEX < 0x030800B1
10485 __pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel.tp_print = 0;
10486 #endif
10487 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel.tp_dictoffset && __pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel.tp_getattro == PyObject_GenericGetAttr)) {
10488 __pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel.tp_getattro = __Pyx_PyObject_GenericGetAttr;
10489 }
10490 if (__Pyx_SetVtable(__pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel.tp_dict, __pyx_vtabptr_4cylp_2cy_10CyCbcModel_CyCbcModel) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
10491 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CyCbcModel, (PyObject *)&__pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
10492 if (__Pyx_setup_reduce((PyObject*)&__pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
10493 __pyx_ptype_4cylp_2cy_10CyCbcModel_CyCbcModel = &__pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel;
10494 __Pyx_RefNannyFinishContext();
10495 return 0;
10496 __pyx_L1_error:;
10497 __Pyx_RefNannyFinishContext();
10498 return -1;
10499 }
10500
__Pyx_modinit_type_import_code(void)10501 static int __Pyx_modinit_type_import_code(void) {
10502 __Pyx_RefNannyDeclarations
10503 PyObject *__pyx_t_1 = NULL;
10504 int __pyx_lineno = 0;
10505 const char *__pyx_filename = NULL;
10506 int __pyx_clineno = 0;
10507 __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
10508 /*--- Type import code ---*/
10509 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error)
10510 __Pyx_GOTREF(__pyx_t_1);
10511 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
10512 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
10513 sizeof(PyTypeObject),
10514 #else
10515 sizeof(PyHeapTypeObject),
10516 #endif
10517 __Pyx_ImportType_CheckSize_Warn);
10518 if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error)
10519 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10520 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 8, __pyx_L1_error)
10521 __Pyx_GOTREF(__pyx_t_1);
10522 __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __Pyx_ImportType_CheckSize_Warn);
10523 if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(4, 8, __pyx_L1_error)
10524 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10525 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 15, __pyx_L1_error)
10526 __Pyx_GOTREF(__pyx_t_1);
10527 __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn);
10528 if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 15, __pyx_L1_error)
10529 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10530 __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error)
10531 __Pyx_GOTREF(__pyx_t_1);
10532 __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
10533 if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error)
10534 __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
10535 if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error)
10536 __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
10537 if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error)
10538 __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
10539 if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error)
10540 __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
10541 if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 917, __pyx_L1_error)
10542 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10543 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCgl"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 103, __pyx_L1_error)
10544 __Pyx_GOTREF(__pyx_t_1);
10545 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglCutGenerator = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglCutGenerator", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator), __Pyx_ImportType_CheckSize_Warn);
10546 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglCutGenerator) __PYX_ERR(6, 103, __pyx_L1_error)
10547 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglAllDifferent = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglAllDifferent", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglAllDifferent), __Pyx_ImportType_CheckSize_Warn);
10548 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglAllDifferent) __PYX_ERR(6, 108, __pyx_L1_error)
10549 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglClique = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglClique", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglClique), __Pyx_ImportType_CheckSize_Warn);
10550 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglClique) __PYX_ERR(6, 111, __pyx_L1_error)
10551 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglKnapsackCover = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglKnapsackCover", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglKnapsackCover), __Pyx_ImportType_CheckSize_Warn);
10552 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglKnapsackCover) __PYX_ERR(6, 114, __pyx_L1_error)
10553 __pyx_vtabptr_4cylp_2cy_5CyCgl_CyCglKnapsackCover = (struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglKnapsackCover*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_5CyCgl_CyCglKnapsackCover->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_5CyCgl_CyCglKnapsackCover)) __PYX_ERR(6, 114, __pyx_L1_error)
10554 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglOddHole = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglOddHole", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglOddHole), __Pyx_ImportType_CheckSize_Warn);
10555 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglOddHole) __PYX_ERR(6, 117, __pyx_L1_error)
10556 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglFlowCover = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglFlowCover", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglFlowCover), __Pyx_ImportType_CheckSize_Warn);
10557 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglFlowCover) __PYX_ERR(6, 122, __pyx_L1_error)
10558 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglGomory = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglGomory", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglGomory), __Pyx_ImportType_CheckSize_Warn);
10559 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglGomory) __PYX_ERR(6, 127, __pyx_L1_error)
10560 __pyx_vtabptr_4cylp_2cy_5CyCgl_CyCglGomory = (struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglGomory*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_5CyCgl_CyCglGomory->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_5CyCgl_CyCglGomory)) __PYX_ERR(6, 127, __pyx_L1_error)
10561 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglRedSplit = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglRedSplit", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglRedSplit), __Pyx_ImportType_CheckSize_Warn);
10562 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglRedSplit) __PYX_ERR(6, 132, __pyx_L1_error)
10563 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglLiftAndProject = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglLiftAndProject", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglLiftAndProject), __Pyx_ImportType_CheckSize_Warn);
10564 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglLiftAndProject) __PYX_ERR(6, 137, __pyx_L1_error)
10565 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglLandP = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglLandP", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglLandP), __Pyx_ImportType_CheckSize_Warn);
10566 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglLandP) __PYX_ERR(6, 140, __pyx_L1_error)
10567 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglMixedIntegerRounding", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding), __Pyx_ImportType_CheckSize_Warn);
10568 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding) __PYX_ERR(6, 145, __pyx_L1_error)
10569 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2 = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglMixedIntegerRounding2", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2), __Pyx_ImportType_CheckSize_Warn);
10570 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2) __PYX_ERR(6, 148, __pyx_L1_error)
10571 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglTwomir = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglTwomir", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglTwomir), __Pyx_ImportType_CheckSize_Warn);
10572 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglTwomir) __PYX_ERR(6, 151, __pyx_L1_error)
10573 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglResidualCapacity = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglResidualCapacity", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglResidualCapacity), __Pyx_ImportType_CheckSize_Warn);
10574 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglResidualCapacity) __PYX_ERR(6, 154, __pyx_L1_error)
10575 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglPreProcess = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglPreProcess", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglPreProcess), __Pyx_ImportType_CheckSize_Warn);
10576 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglPreProcess) __PYX_ERR(6, 162, __pyx_L1_error)
10577 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglProbing = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglProbing", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglProbing), __Pyx_ImportType_CheckSize_Warn);
10578 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglProbing) __PYX_ERR(6, 165, __pyx_L1_error)
10579 __pyx_ptype_4cylp_2cy_5CyCgl_CyCglSimpleRounding = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCgl", "CyCglSimpleRounding", sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglSimpleRounding), __Pyx_ImportType_CheckSize_Warn);
10580 if (!__pyx_ptype_4cylp_2cy_5CyCgl_CyCglSimpleRounding) __PYX_ERR(6, 168, __pyx_L1_error)
10581 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10582 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCbcNode"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 13, __pyx_L1_error)
10583 __Pyx_GOTREF(__pyx_t_1);
10584 __pyx_ptype_4cylp_2cy_9CyCbcNode_CyCbcNode = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCbcNode", "CyCbcNode", sizeof(struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode), __Pyx_ImportType_CheckSize_Warn);
10585 if (!__pyx_ptype_4cylp_2cy_9CyCbcNode_CyCbcNode) __PYX_ERR(7, 13, __pyx_L1_error)
10586 __pyx_vtabptr_4cylp_2cy_9CyCbcNode_CyCbcNode = (struct __pyx_vtabstruct_4cylp_2cy_9CyCbcNode_CyCbcNode*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_9CyCbcNode_CyCbcNode->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_9CyCbcNode_CyCbcNode)) __PYX_ERR(7, 13, __pyx_L1_error)
10587 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10588 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCoinIndexedVector"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 22, __pyx_L1_error)
10589 __Pyx_GOTREF(__pyx_t_1);
10590 __pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCoinIndexedVector", "CyCoinIndexedVector", sizeof(struct __pyx_obj_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector), __Pyx_ImportType_CheckSize_Warn);
10591 if (!__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector) __PYX_ERR(8, 22, __pyx_L1_error)
10592 __pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector = (struct __pyx_vtabstruct_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector)) __PYX_ERR(8, 22, __pyx_L1_error)
10593 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10594 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpPrimalColumnPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(9, 67, __pyx_L1_error)
10595 __Pyx_GOTREF(__pyx_t_1);
10596 __pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyClpPrimalColumnPivotBase", "CyClpPrimalColumnPivotBase", sizeof(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase), __Pyx_ImportType_CheckSize_Warn);
10597 if (!__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase) __PYX_ERR(9, 67, __pyx_L1_error)
10598 __pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = (struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase)) __PYX_ERR(9, 67, __pyx_L1_error)
10599 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10600 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(10, 72, __pyx_L1_error)
10601 __Pyx_GOTREF(__pyx_t_1);
10602 __pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyClpDualRowPivotBase", "CyClpDualRowPivotBase", sizeof(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase), __Pyx_ImportType_CheckSize_Warn);
10603 if (!__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase) __PYX_ERR(10, 72, __pyx_L1_error)
10604 __pyx_vtabptr_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = (struct __pyx_vtabstruct_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase)) __PYX_ERR(10, 72, __pyx_L1_error)
10605 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10606 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCoinModel"); if (unlikely(!__pyx_t_1)) __PYX_ERR(11, 34, __pyx_L1_error)
10607 __Pyx_GOTREF(__pyx_t_1);
10608 __pyx_ptype_4cylp_2cy_11CyCoinModel_CyCoinModel = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCoinModel", "CyCoinModel", sizeof(struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel), __Pyx_ImportType_CheckSize_Warn);
10609 if (!__pyx_ptype_4cylp_2cy_11CyCoinModel_CyCoinModel) __PYX_ERR(11, 34, __pyx_L1_error)
10610 __pyx_vtabptr_4cylp_2cy_11CyCoinModel_CyCoinModel = (struct __pyx_vtabstruct_4cylp_2cy_11CyCoinModel_CyCoinModel*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_11CyCoinModel_CyCoinModel->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_11CyCoinModel_CyCoinModel)) __PYX_ERR(11, 34, __pyx_L1_error)
10611 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10612 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCoinPackedMatrix"); if (unlikely(!__pyx_t_1)) __PYX_ERR(12, 27, __pyx_L1_error)
10613 __Pyx_GOTREF(__pyx_t_1);
10614 __pyx_ptype_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCoinPackedMatrix", "CyCoinPackedMatrix", sizeof(struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix), __Pyx_ImportType_CheckSize_Warn);
10615 if (!__pyx_ptype_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix) __PYX_ERR(12, 27, __pyx_L1_error)
10616 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10617 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpSimplex"); if (unlikely(!__pyx_t_1)) __PYX_ERR(13, 302, __pyx_L1_error)
10618 __Pyx_GOTREF(__pyx_t_1);
10619 __pyx_ptype_4cylp_2cy_12CyClpSimplex_CyClpSimplex = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyClpSimplex", "CyClpSimplex", sizeof(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex), __Pyx_ImportType_CheckSize_Warn);
10620 if (!__pyx_ptype_4cylp_2cy_12CyClpSimplex_CyClpSimplex) __PYX_ERR(13, 302, __pyx_L1_error)
10621 __pyx_vtabptr_4cylp_2cy_12CyClpSimplex_CyClpSimplex = (struct __pyx_vtabstruct_4cylp_2cy_12CyClpSimplex_CyClpSimplex*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_12CyClpSimplex_CyClpSimplex->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_12CyClpSimplex_CyClpSimplex)) __PYX_ERR(13, 302, __pyx_L1_error)
10622 __pyx_ptype_4cylp_2cy_12CyClpSimplex_VarStatus = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyClpSimplex", "VarStatus", sizeof(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus), __Pyx_ImportType_CheckSize_Warn);
10623 if (!__pyx_ptype_4cylp_2cy_12CyClpSimplex_VarStatus) __PYX_ERR(13, 377, __pyx_L1_error)
10624 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10625 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyOsiSolverInterface"); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 15, __pyx_L1_error)
10626 __Pyx_GOTREF(__pyx_t_1);
10627 __pyx_ptype_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyOsiSolverInterface", "CyOsiSolverInterface", sizeof(struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface), __Pyx_ImportType_CheckSize_Warn);
10628 if (!__pyx_ptype_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface) __PYX_ERR(14, 15, __pyx_L1_error)
10629 __pyx_vtabptr_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface = (struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface)) __PYX_ERR(14, 15, __pyx_L1_error)
10630 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10631 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyOsiCuts"); if (unlikely(!__pyx_t_1)) __PYX_ERR(15, 19, __pyx_L1_error)
10632 __Pyx_GOTREF(__pyx_t_1);
10633 __pyx_ptype_4cylp_2cy_9CyOsiCuts_CyOsiCuts = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyOsiCuts", "CyOsiCuts", sizeof(struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts), __Pyx_ImportType_CheckSize_Warn);
10634 if (!__pyx_ptype_4cylp_2cy_9CyOsiCuts_CyOsiCuts) __PYX_ERR(15, 19, __pyx_L1_error)
10635 __pyx_vtabptr_4cylp_2cy_9CyOsiCuts_CyOsiCuts = (struct __pyx_vtabstruct_4cylp_2cy_9CyOsiCuts_CyOsiCuts*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_9CyOsiCuts_CyOsiCuts->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_9CyOsiCuts_CyOsiCuts)) __PYX_ERR(15, 19, __pyx_L1_error)
10636 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10637 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCglTreeInfo"); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 7, __pyx_L1_error)
10638 __Pyx_GOTREF(__pyx_t_1);
10639 __pyx_ptype_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCglTreeInfo", "CyCglTreeInfo", sizeof(struct __pyx_obj_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo), __Pyx_ImportType_CheckSize_Warn);
10640 if (!__pyx_ptype_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo) __PYX_ERR(16, 7, __pyx_L1_error)
10641 __pyx_vtabptr_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo = (struct __pyx_vtabstruct_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo)) __PYX_ERR(16, 7, __pyx_L1_error)
10642 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10643 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCglCutGeneratorBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(17, 52, __pyx_L1_error)
10644 __Pyx_GOTREF(__pyx_t_1);
10645 __pyx_ptype_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCglCutGeneratorBase", "CyCglCutGeneratorBase", sizeof(struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase), __Pyx_ImportType_CheckSize_Warn);
10646 if (!__pyx_ptype_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase) __PYX_ERR(17, 52, __pyx_L1_error)
10647 __pyx_vtabptr_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase = (struct __pyx_vtabstruct_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase)) __PYX_ERR(17, 52, __pyx_L1_error)
10648 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10649 __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCutGeneratorPythonBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(18, 10, __pyx_L1_error)
10650 __Pyx_GOTREF(__pyx_t_1);
10651 __pyx_ptype_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase = __Pyx_ImportType(__pyx_t_1, "cylp.cy.CyCutGeneratorPythonBase", "CyCutGeneratorPythonBase", sizeof(struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase), __Pyx_ImportType_CheckSize_Warn);
10652 if (!__pyx_ptype_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase) __PYX_ERR(18, 10, __pyx_L1_error)
10653 __pyx_vtabptr_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase = (struct __pyx_vtabstruct_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase)) __PYX_ERR(18, 10, __pyx_L1_error)
10654 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10655 __Pyx_RefNannyFinishContext();
10656 return 0;
10657 __pyx_L1_error:;
10658 __Pyx_XDECREF(__pyx_t_1);
10659 __Pyx_RefNannyFinishContext();
10660 return -1;
10661 }
10662
__Pyx_modinit_variable_import_code(void)10663 static int __Pyx_modinit_variable_import_code(void) {
10664 __Pyx_RefNannyDeclarations
10665 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
10666 /*--- Variable import code ---*/
10667 __Pyx_RefNannyFinishContext();
10668 return 0;
10669 }
10670
__Pyx_modinit_function_import_code(void)10671 static int __Pyx_modinit_function_import_code(void) {
10672 __Pyx_RefNannyDeclarations
10673 __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
10674 /*--- Function import code ---*/
10675 __Pyx_RefNannyFinishContext();
10676 return 0;
10677 }
10678
10679
10680 #ifndef CYTHON_NO_PYINIT_EXPORT
10681 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
10682 #elif PY_MAJOR_VERSION < 3
10683 #ifdef __cplusplus
10684 #define __Pyx_PyMODINIT_FUNC extern "C" void
10685 #else
10686 #define __Pyx_PyMODINIT_FUNC void
10687 #endif
10688 #else
10689 #ifdef __cplusplus
10690 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
10691 #else
10692 #define __Pyx_PyMODINIT_FUNC PyObject *
10693 #endif
10694 #endif
10695
10696
10697 #if PY_MAJOR_VERSION < 3
10698 __Pyx_PyMODINIT_FUNC initCyCbcModel(void) CYTHON_SMALL_CODE; /*proto*/
initCyCbcModel(void)10699 __Pyx_PyMODINIT_FUNC initCyCbcModel(void)
10700 #else
10701 __Pyx_PyMODINIT_FUNC PyInit_CyCbcModel(void) CYTHON_SMALL_CODE; /*proto*/
10702 __Pyx_PyMODINIT_FUNC PyInit_CyCbcModel(void)
10703 #if CYTHON_PEP489_MULTI_PHASE_INIT
10704 {
10705 return PyModuleDef_Init(&__pyx_moduledef);
10706 }
10707 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
10708 #if PY_VERSION_HEX >= 0x030700A1
10709 static PY_INT64_T main_interpreter_id = -1;
10710 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
10711 if (main_interpreter_id == -1) {
10712 main_interpreter_id = current_id;
10713 return (unlikely(current_id == -1)) ? -1 : 0;
10714 } else if (unlikely(main_interpreter_id != current_id))
10715 #else
10716 static PyInterpreterState *main_interpreter = NULL;
10717 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
10718 if (!main_interpreter) {
10719 main_interpreter = current_interpreter;
10720 } else if (unlikely(main_interpreter != current_interpreter))
10721 #endif
10722 {
10723 PyErr_SetString(
10724 PyExc_ImportError,
10725 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
10726 return -1;
10727 }
10728 return 0;
10729 }
10730 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
10731 PyObject *value = PyObject_GetAttrString(spec, from_name);
10732 int result = 0;
10733 if (likely(value)) {
10734 if (allow_none || value != Py_None) {
10735 result = PyDict_SetItemString(moddict, to_name, value);
10736 }
10737 Py_DECREF(value);
10738 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
10739 PyErr_Clear();
10740 } else {
10741 result = -1;
10742 }
10743 return result;
10744 }
10745 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
10746 PyObject *module = NULL, *moddict, *modname;
10747 if (__Pyx_check_single_interpreter())
10748 return NULL;
10749 if (__pyx_m)
10750 return __Pyx_NewRef(__pyx_m);
10751 modname = PyObject_GetAttrString(spec, "name");
10752 if (unlikely(!modname)) goto bad;
10753 module = PyModule_NewObject(modname);
10754 Py_DECREF(modname);
10755 if (unlikely(!module)) goto bad;
10756 moddict = PyModule_GetDict(module);
10757 if (unlikely(!moddict)) goto bad;
10758 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
10759 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
10760 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
10761 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
10762 return module;
10763 bad:
10764 Py_XDECREF(module);
10765 return NULL;
10766 }
10767
10768
10769 static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCbcModel(PyObject *__pyx_pyinit_module)
10770 #endif
10771 #endif
10772 {
10773 PyObject *__pyx_t_1 = NULL;
10774 PyObject *__pyx_t_2 = NULL;
10775 PyObject *__pyx_t_3 = NULL;
10776 PyObject *__pyx_t_4 = NULL;
10777 PyObject *__pyx_t_5 = NULL;
10778 int __pyx_t_6;
10779 PyObject *__pyx_t_7 = NULL;
10780 int __pyx_lineno = 0;
10781 const char *__pyx_filename = NULL;
10782 int __pyx_clineno = 0;
10783 __Pyx_RefNannyDeclarations
10784 #if CYTHON_PEP489_MULTI_PHASE_INIT
10785 if (__pyx_m) {
10786 if (__pyx_m == __pyx_pyinit_module) return 0;
10787 PyErr_SetString(PyExc_RuntimeError, "Module 'CyCbcModel' has already been imported. Re-initialisation is not supported.");
10788 return -1;
10789 }
10790 #elif PY_MAJOR_VERSION >= 3
10791 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
10792 #endif
10793 #if CYTHON_REFNANNY
10794 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
10795 if (!__Pyx_RefNanny) {
10796 PyErr_Clear();
10797 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
10798 if (!__Pyx_RefNanny)
10799 Py_FatalError("failed to import 'refnanny' module");
10800 }
10801 #endif
10802 __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_CyCbcModel(void)", 0);
10803 if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10804 #ifdef __Pxy_PyFrame_Initialize_Offsets
10805 __Pxy_PyFrame_Initialize_Offsets();
10806 #endif
10807 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
10808 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
10809 __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
10810 #ifdef __Pyx_CyFunction_USED
10811 if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10812 #endif
10813 #ifdef __Pyx_FusedFunction_USED
10814 if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10815 #endif
10816 #ifdef __Pyx_Coroutine_USED
10817 if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10818 #endif
10819 #ifdef __Pyx_Generator_USED
10820 if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10821 #endif
10822 #ifdef __Pyx_AsyncGen_USED
10823 if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10824 #endif
10825 #ifdef __Pyx_StopAsyncIteration_USED
10826 if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10827 #endif
10828 /*--- Library function declarations ---*/
10829 /*--- Threads initialization code ---*/
10830 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
10831 #ifdef WITH_THREAD /* Python build with threading support? */
10832 PyEval_InitThreads();
10833 #endif
10834 #endif
10835 /*--- Module creation code ---*/
10836 #if CYTHON_PEP489_MULTI_PHASE_INIT
10837 __pyx_m = __pyx_pyinit_module;
10838 Py_INCREF(__pyx_m);
10839 #else
10840 #if PY_MAJOR_VERSION < 3
10841 __pyx_m = Py_InitModule4("CyCbcModel", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
10842 #else
10843 __pyx_m = PyModule_Create(&__pyx_moduledef);
10844 #endif
10845 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
10846 #endif
10847 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
10848 Py_INCREF(__pyx_d);
10849 __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
10850 Py_INCREF(__pyx_b);
10851 __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
10852 Py_INCREF(__pyx_cython_runtime);
10853 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
10854 /*--- Initialize various global constants etc. ---*/
10855 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10856 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
10857 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10858 #endif
10859 if (__pyx_module_is_main_cylp__cy__CyCbcModel) {
10860 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10861 }
10862 #if PY_MAJOR_VERSION >= 3
10863 {
10864 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
10865 if (!PyDict_GetItemString(modules, "cylp.cy.CyCbcModel")) {
10866 if (unlikely(PyDict_SetItemString(modules, "cylp.cy.CyCbcModel", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
10867 }
10868 }
10869 #endif
10870 /*--- Builtin init code ---*/
10871 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10872 /*--- Constants init code ---*/
10873 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10874 /*--- Global type/function init code ---*/
10875 (void)__Pyx_modinit_global_init_code();
10876 (void)__Pyx_modinit_variable_export_code();
10877 (void)__Pyx_modinit_function_export_code();
10878 if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
10879 if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
10880 (void)__Pyx_modinit_variable_import_code();
10881 (void)__Pyx_modinit_function_import_code();
10882 /*--- Execution code ---*/
10883 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
10884 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
10885 #endif
10886
10887 /* "cylp/cy/CyCbcModel.pyx":3
10888 * # cython: embedsignature=True
10889 *
10890 * from itertools import product # <<<<<<<<<<<<<<
10891 * try:
10892 * from itertools import izip
10893 */
10894 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
10895 __Pyx_GOTREF(__pyx_t_1);
10896 __Pyx_INCREF(__pyx_n_s_product);
10897 __Pyx_GIVEREF(__pyx_n_s_product);
10898 PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_product);
10899 __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
10900 __Pyx_GOTREF(__pyx_t_2);
10901 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10902 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_product); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error)
10903 __Pyx_GOTREF(__pyx_t_1);
10904 if (PyDict_SetItem(__pyx_d, __pyx_n_s_product, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
10905 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10906 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10907
10908 /* "cylp/cy/CyCbcModel.pyx":4
10909 *
10910 * from itertools import product
10911 * try: # <<<<<<<<<<<<<<
10912 * from itertools import izip
10913 * except ImportError: # Python 3 does not have izip, use zip
10914 */
10915 {
10916 __Pyx_PyThreadState_declare
10917 __Pyx_PyThreadState_assign
10918 __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
10919 __Pyx_XGOTREF(__pyx_t_3);
10920 __Pyx_XGOTREF(__pyx_t_4);
10921 __Pyx_XGOTREF(__pyx_t_5);
10922 /*try:*/ {
10923
10924 /* "cylp/cy/CyCbcModel.pyx":5
10925 * from itertools import product
10926 * try:
10927 * from itertools import izip # <<<<<<<<<<<<<<
10928 * except ImportError: # Python 3 does not have izip, use zip
10929 * izip = zip
10930 */
10931 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L2_error)
10932 __Pyx_GOTREF(__pyx_t_2);
10933 __Pyx_INCREF(__pyx_n_s_izip);
10934 __Pyx_GIVEREF(__pyx_n_s_izip);
10935 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_izip);
10936 __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L2_error)
10937 __Pyx_GOTREF(__pyx_t_1);
10938 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10939 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_izip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L2_error)
10940 __Pyx_GOTREF(__pyx_t_2);
10941 if (PyDict_SetItem(__pyx_d, __pyx_n_s_izip, __pyx_t_2) < 0) __PYX_ERR(0, 5, __pyx_L2_error)
10942 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10943 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10944
10945 /* "cylp/cy/CyCbcModel.pyx":4
10946 *
10947 * from itertools import product
10948 * try: # <<<<<<<<<<<<<<
10949 * from itertools import izip
10950 * except ImportError: # Python 3 does not have izip, use zip
10951 */
10952 }
10953 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10954 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
10955 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10956 goto __pyx_L7_try_end;
10957 __pyx_L2_error:;
10958 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10959 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10960
10961 /* "cylp/cy/CyCbcModel.pyx":6
10962 * try:
10963 * from itertools import izip
10964 * except ImportError: # Python 3 does not have izip, use zip # <<<<<<<<<<<<<<
10965 * izip = zip
10966 * from cylp.py.mip import NodeCompareBase
10967 */
10968 __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError);
10969 if (__pyx_t_6) {
10970 __Pyx_AddTraceback("cylp.cy.CyCbcModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
10971 if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_7) < 0) __PYX_ERR(0, 6, __pyx_L4_except_error)
10972 __Pyx_GOTREF(__pyx_t_1);
10973 __Pyx_GOTREF(__pyx_t_2);
10974 __Pyx_GOTREF(__pyx_t_7);
10975
10976 /* "cylp/cy/CyCbcModel.pyx":7
10977 * from itertools import izip
10978 * except ImportError: # Python 3 does not have izip, use zip
10979 * izip = zip # <<<<<<<<<<<<<<
10980 * from cylp.py.mip import NodeCompareBase
10981 * from cylp.py.modeling.CyLPModel import CyLPSolution
10982 */
10983 if (PyDict_SetItem(__pyx_d, __pyx_n_s_izip, __pyx_builtin_zip) < 0) __PYX_ERR(0, 7, __pyx_L4_except_error)
10984 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10985 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10986 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10987 goto __pyx_L3_exception_handled;
10988 }
10989 goto __pyx_L4_except_error;
10990 __pyx_L4_except_error:;
10991
10992 /* "cylp/cy/CyCbcModel.pyx":4
10993 *
10994 * from itertools import product
10995 * try: # <<<<<<<<<<<<<<
10996 * from itertools import izip
10997 * except ImportError: # Python 3 does not have izip, use zip
10998 */
10999 __Pyx_XGIVEREF(__pyx_t_3);
11000 __Pyx_XGIVEREF(__pyx_t_4);
11001 __Pyx_XGIVEREF(__pyx_t_5);
11002 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
11003 goto __pyx_L1_error;
11004 __pyx_L3_exception_handled:;
11005 __Pyx_XGIVEREF(__pyx_t_3);
11006 __Pyx_XGIVEREF(__pyx_t_4);
11007 __Pyx_XGIVEREF(__pyx_t_5);
11008 __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
11009 __pyx_L7_try_end:;
11010 }
11011
11012 /* "cylp/cy/CyCbcModel.pyx":8
11013 * except ImportError: # Python 3 does not have izip, use zip
11014 * izip = zip
11015 * from cylp.py.mip import NodeCompareBase # <<<<<<<<<<<<<<
11016 * from cylp.py.modeling.CyLPModel import CyLPSolution
11017 * from cylp.cy.CyCutGeneratorPythonBase cimport CyCutGeneratorPythonBase
11018 */
11019 __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8, __pyx_L1_error)
11020 __Pyx_GOTREF(__pyx_t_7);
11021 __Pyx_INCREF(__pyx_n_s_NodeCompareBase);
11022 __Pyx_GIVEREF(__pyx_n_s_NodeCompareBase);
11023 PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_NodeCompareBase);
11024 __pyx_t_2 = __Pyx_Import(__pyx_n_s_cylp_py_mip, __pyx_t_7, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
11025 __Pyx_GOTREF(__pyx_t_2);
11026 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11027 __pyx_t_7 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NodeCompareBase); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 8, __pyx_L1_error)
11028 __Pyx_GOTREF(__pyx_t_7);
11029 if (PyDict_SetItem(__pyx_d, __pyx_n_s_NodeCompareBase, __pyx_t_7) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
11030 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11031 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11032
11033 /* "cylp/cy/CyCbcModel.pyx":9
11034 * izip = zip
11035 * from cylp.py.mip import NodeCompareBase
11036 * from cylp.py.modeling.CyLPModel import CyLPSolution # <<<<<<<<<<<<<<
11037 * from cylp.cy.CyCutGeneratorPythonBase cimport CyCutGeneratorPythonBase
11038 * from libcpp cimport bool
11039 */
11040 __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
11041 __Pyx_GOTREF(__pyx_t_2);
11042 __Pyx_INCREF(__pyx_n_s_CyLPSolution);
11043 __Pyx_GIVEREF(__pyx_n_s_CyLPSolution);
11044 PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_CyLPSolution);
11045 __pyx_t_7 = __Pyx_Import(__pyx_n_s_cylp_py_modeling_CyLPModel, __pyx_t_2, -1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 9, __pyx_L1_error)
11046 __Pyx_GOTREF(__pyx_t_7);
11047 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11048 __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_7, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
11049 __Pyx_GOTREF(__pyx_t_2);
11050 if (PyDict_SetItem(__pyx_d, __pyx_n_s_CyLPSolution, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
11051 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11052 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11053
11054 /* "cylp/cy/CyCbcModel.pyx":33
11055 *
11056 * # Understandable messages to translate what branchAndBound() returns
11057 * problemStatus = ['solution', 'relaxation infeasible', # <<<<<<<<<<<<<<
11058 * 'stopped on gap', 'stopped on nodes', 'stopped on time',
11059 * 'stopped on user event', 'stopped on solutions'
11060 */
11061 __pyx_t_7 = PyList_New(8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33, __pyx_L1_error)
11062 __Pyx_GOTREF(__pyx_t_7);
11063 __Pyx_INCREF(__pyx_n_s_solution);
11064 __Pyx_GIVEREF(__pyx_n_s_solution);
11065 PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_solution);
11066 __Pyx_INCREF(__pyx_kp_s_relaxation_infeasible);
11067 __Pyx_GIVEREF(__pyx_kp_s_relaxation_infeasible);
11068 PyList_SET_ITEM(__pyx_t_7, 1, __pyx_kp_s_relaxation_infeasible);
11069 __Pyx_INCREF(__pyx_kp_s_stopped_on_gap);
11070 __Pyx_GIVEREF(__pyx_kp_s_stopped_on_gap);
11071 PyList_SET_ITEM(__pyx_t_7, 2, __pyx_kp_s_stopped_on_gap);
11072 __Pyx_INCREF(__pyx_kp_s_stopped_on_nodes);
11073 __Pyx_GIVEREF(__pyx_kp_s_stopped_on_nodes);
11074 PyList_SET_ITEM(__pyx_t_7, 3, __pyx_kp_s_stopped_on_nodes);
11075 __Pyx_INCREF(__pyx_kp_s_stopped_on_time);
11076 __Pyx_GIVEREF(__pyx_kp_s_stopped_on_time);
11077 PyList_SET_ITEM(__pyx_t_7, 4, __pyx_kp_s_stopped_on_time);
11078 __Pyx_INCREF(__pyx_kp_s_stopped_on_user_event);
11079 __Pyx_GIVEREF(__pyx_kp_s_stopped_on_user_event);
11080 PyList_SET_ITEM(__pyx_t_7, 5, __pyx_kp_s_stopped_on_user_event);
11081 __Pyx_INCREF(__pyx_kp_s_stopped_on_solutionslinear_relax);
11082 __Pyx_GIVEREF(__pyx_kp_s_stopped_on_solutionslinear_relax);
11083 PyList_SET_ITEM(__pyx_t_7, 6, __pyx_kp_s_stopped_on_solutionslinear_relax);
11084 __Pyx_INCREF(__pyx_n_s_unset);
11085 __Pyx_GIVEREF(__pyx_n_s_unset);
11086 PyList_SET_ITEM(__pyx_t_7, 7, __pyx_n_s_unset);
11087 if (PyDict_SetItem(__pyx_d, __pyx_n_s_problemStatus, __pyx_t_7) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
11088 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11089
11090 /* "cylp/cy/CyCbcModel.pyx":1
11091 * # cython: embedsignature=True # <<<<<<<<<<<<<<
11092 *
11093 * from itertools import product
11094 */
11095 __pyx_t_7 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1, __pyx_L1_error)
11096 __Pyx_GOTREF(__pyx_t_7);
11097 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
11098 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
11099
11100 /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045
11101 * raise ImportError("numpy.core.umath failed to import")
11102 *
11103 * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
11104 * try:
11105 * _import_umath()
11106 */
11107
11108 /*--- Wrapped vars code ---*/
11109
11110 goto __pyx_L0;
11111 __pyx_L1_error:;
11112 __Pyx_XDECREF(__pyx_t_1);
11113 __Pyx_XDECREF(__pyx_t_2);
11114 __Pyx_XDECREF(__pyx_t_7);
11115 if (__pyx_m) {
11116 if (__pyx_d) {
11117 __Pyx_AddTraceback("init cylp.cy.CyCbcModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
11118 }
11119 Py_CLEAR(__pyx_m);
11120 } else if (!PyErr_Occurred()) {
11121 PyErr_SetString(PyExc_ImportError, "init cylp.cy.CyCbcModel");
11122 }
11123 __pyx_L0:;
11124 __Pyx_RefNannyFinishContext();
11125 #if CYTHON_PEP489_MULTI_PHASE_INIT
11126 return (__pyx_m != NULL) ? 0 : -1;
11127 #elif PY_MAJOR_VERSION >= 3
11128 return __pyx_m;
11129 #else
11130 return;
11131 #endif
11132 }
11133
11134 /* --- Runtime support code --- */
11135 /* Refnanny */
11136 #if CYTHON_REFNANNY
__Pyx_RefNannyImportAPI(const char * modname)11137 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
11138 PyObject *m = NULL, *p = NULL;
11139 void *r = NULL;
11140 m = PyImport_ImportModule(modname);
11141 if (!m) goto end;
11142 p = PyObject_GetAttrString(m, "RefNannyAPI");
11143 if (!p) goto end;
11144 r = PyLong_AsVoidPtr(p);
11145 end:
11146 Py_XDECREF(p);
11147 Py_XDECREF(m);
11148 return (__Pyx_RefNannyAPIStruct *)r;
11149 }
11150 #endif
11151
11152 /* PyObjectGetAttrStr */
11153 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetAttrStr(PyObject * obj,PyObject * attr_name)11154 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
11155 PyTypeObject* tp = Py_TYPE(obj);
11156 if (likely(tp->tp_getattro))
11157 return tp->tp_getattro(obj, attr_name);
11158 #if PY_MAJOR_VERSION < 3
11159 if (likely(tp->tp_getattr))
11160 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
11161 #endif
11162 return PyObject_GetAttr(obj, attr_name);
11163 }
11164 #endif
11165
11166 /* GetBuiltinName */
__Pyx_GetBuiltinName(PyObject * name)11167 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
11168 PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
11169 if (unlikely(!result)) {
11170 PyErr_Format(PyExc_NameError,
11171 #if PY_MAJOR_VERSION >= 3
11172 "name '%U' is not defined", name);
11173 #else
11174 "name '%.200s' is not defined", PyString_AS_STRING(name));
11175 #endif
11176 }
11177 return result;
11178 }
11179
11180 /* PyFunctionFastCall */
11181 #if CYTHON_FAST_PYCALL
__Pyx_PyFunction_FastCallNoKw(PyCodeObject * co,PyObject ** args,Py_ssize_t na,PyObject * globals)11182 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
11183 PyObject *globals) {
11184 PyFrameObject *f;
11185 PyThreadState *tstate = __Pyx_PyThreadState_Current;
11186 PyObject **fastlocals;
11187 Py_ssize_t i;
11188 PyObject *result;
11189 assert(globals != NULL);
11190 /* XXX Perhaps we should create a specialized
11191 PyFrame_New() that doesn't take locals, but does
11192 take builtins without sanity checking them.
11193 */
11194 assert(tstate != NULL);
11195 f = PyFrame_New(tstate, co, globals, NULL);
11196 if (f == NULL) {
11197 return NULL;
11198 }
11199 fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
11200 for (i = 0; i < na; i++) {
11201 Py_INCREF(*args);
11202 fastlocals[i] = *args++;
11203 }
11204 result = PyEval_EvalFrameEx(f,0);
11205 ++tstate->recursion_depth;
11206 Py_DECREF(f);
11207 --tstate->recursion_depth;
11208 return result;
11209 }
11210 #if 1 || PY_VERSION_HEX < 0x030600B1
__Pyx_PyFunction_FastCallDict(PyObject * func,PyObject ** args,Py_ssize_t nargs,PyObject * kwargs)11211 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
11212 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
11213 PyObject *globals = PyFunction_GET_GLOBALS(func);
11214 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
11215 PyObject *closure;
11216 #if PY_MAJOR_VERSION >= 3
11217 PyObject *kwdefs;
11218 #endif
11219 PyObject *kwtuple, **k;
11220 PyObject **d;
11221 Py_ssize_t nd;
11222 Py_ssize_t nk;
11223 PyObject *result;
11224 assert(kwargs == NULL || PyDict_Check(kwargs));
11225 nk = kwargs ? PyDict_Size(kwargs) : 0;
11226 if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
11227 return NULL;
11228 }
11229 if (
11230 #if PY_MAJOR_VERSION >= 3
11231 co->co_kwonlyargcount == 0 &&
11232 #endif
11233 likely(kwargs == NULL || nk == 0) &&
11234 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
11235 if (argdefs == NULL && co->co_argcount == nargs) {
11236 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
11237 goto done;
11238 }
11239 else if (nargs == 0 && argdefs != NULL
11240 && co->co_argcount == Py_SIZE(argdefs)) {
11241 /* function called with no arguments, but all parameters have
11242 a default value: use default values as arguments .*/
11243 args = &PyTuple_GET_ITEM(argdefs, 0);
11244 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
11245 goto done;
11246 }
11247 }
11248 if (kwargs != NULL) {
11249 Py_ssize_t pos, i;
11250 kwtuple = PyTuple_New(2 * nk);
11251 if (kwtuple == NULL) {
11252 result = NULL;
11253 goto done;
11254 }
11255 k = &PyTuple_GET_ITEM(kwtuple, 0);
11256 pos = i = 0;
11257 while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
11258 Py_INCREF(k[i]);
11259 Py_INCREF(k[i+1]);
11260 i += 2;
11261 }
11262 nk = i / 2;
11263 }
11264 else {
11265 kwtuple = NULL;
11266 k = NULL;
11267 }
11268 closure = PyFunction_GET_CLOSURE(func);
11269 #if PY_MAJOR_VERSION >= 3
11270 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
11271 #endif
11272 if (argdefs != NULL) {
11273 d = &PyTuple_GET_ITEM(argdefs, 0);
11274 nd = Py_SIZE(argdefs);
11275 }
11276 else {
11277 d = NULL;
11278 nd = 0;
11279 }
11280 #if PY_MAJOR_VERSION >= 3
11281 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
11282 args, (int)nargs,
11283 k, (int)nk,
11284 d, (int)nd, kwdefs, closure);
11285 #else
11286 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
11287 args, (int)nargs,
11288 k, (int)nk,
11289 d, (int)nd, closure);
11290 #endif
11291 Py_XDECREF(kwtuple);
11292 done:
11293 Py_LeaveRecursiveCall();
11294 return result;
11295 }
11296 #endif
11297 #endif
11298
11299 /* PyObjectCall */
11300 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_Call(PyObject * func,PyObject * arg,PyObject * kw)11301 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
11302 PyObject *result;
11303 ternaryfunc call = func->ob_type->tp_call;
11304 if (unlikely(!call))
11305 return PyObject_Call(func, arg, kw);
11306 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
11307 return NULL;
11308 result = (*call)(func, arg, kw);
11309 Py_LeaveRecursiveCall();
11310 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
11311 PyErr_SetString(
11312 PyExc_SystemError,
11313 "NULL result without error in PyObject_Call");
11314 }
11315 return result;
11316 }
11317 #endif
11318
11319 /* PyObjectCallMethO */
11320 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallMethO(PyObject * func,PyObject * arg)11321 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
11322 PyObject *self, *result;
11323 PyCFunction cfunc;
11324 cfunc = PyCFunction_GET_FUNCTION(func);
11325 self = PyCFunction_GET_SELF(func);
11326 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
11327 return NULL;
11328 result = cfunc(self, arg);
11329 Py_LeaveRecursiveCall();
11330 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
11331 PyErr_SetString(
11332 PyExc_SystemError,
11333 "NULL result without error in PyObject_Call");
11334 }
11335 return result;
11336 }
11337 #endif
11338
11339 /* PyObjectCallNoArg */
11340 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_PyObject_CallNoArg(PyObject * func)11341 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
11342 #if CYTHON_FAST_PYCALL
11343 if (PyFunction_Check(func)) {
11344 return __Pyx_PyFunction_FastCall(func, NULL, 0);
11345 }
11346 #endif
11347 #ifdef __Pyx_CyFunction_USED
11348 if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
11349 #else
11350 if (likely(PyCFunction_Check(func)))
11351 #endif
11352 {
11353 if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
11354 return __Pyx_PyObject_CallMethO(func, NULL);
11355 }
11356 }
11357 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
11358 }
11359 #endif
11360
11361 /* PyCFunctionFastCall */
11362 #if CYTHON_FAST_PYCCALL
__Pyx_PyCFunction_FastCall(PyObject * func_obj,PyObject ** args,Py_ssize_t nargs)11363 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
11364 PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
11365 PyCFunction meth = PyCFunction_GET_FUNCTION(func);
11366 PyObject *self = PyCFunction_GET_SELF(func);
11367 int flags = PyCFunction_GET_FLAGS(func);
11368 assert(PyCFunction_Check(func));
11369 assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
11370 assert(nargs >= 0);
11371 assert(nargs == 0 || args != NULL);
11372 /* _PyCFunction_FastCallDict() must not be called with an exception set,
11373 because it may clear it (directly or indirectly) and so the
11374 caller loses its exception */
11375 assert(!PyErr_Occurred());
11376 if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
11377 return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
11378 } else {
11379 return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
11380 }
11381 }
11382 #endif
11383
11384 /* PyErrFetchRestore */
11385 #if CYTHON_FAST_THREAD_STATE
__Pyx_ErrRestoreInState(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)11386 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
11387 PyObject *tmp_type, *tmp_value, *tmp_tb;
11388 tmp_type = tstate->curexc_type;
11389 tmp_value = tstate->curexc_value;
11390 tmp_tb = tstate->curexc_traceback;
11391 tstate->curexc_type = type;
11392 tstate->curexc_value = value;
11393 tstate->curexc_traceback = tb;
11394 Py_XDECREF(tmp_type);
11395 Py_XDECREF(tmp_value);
11396 Py_XDECREF(tmp_tb);
11397 }
__Pyx_ErrFetchInState(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)11398 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
11399 *type = tstate->curexc_type;
11400 *value = tstate->curexc_value;
11401 *tb = tstate->curexc_traceback;
11402 tstate->curexc_type = 0;
11403 tstate->curexc_value = 0;
11404 tstate->curexc_traceback = 0;
11405 }
11406 #endif
11407
11408 /* WriteUnraisableException */
__Pyx_WriteUnraisable(const char * name,CYTHON_UNUSED int clineno,CYTHON_UNUSED int lineno,CYTHON_UNUSED const char * filename,int full_traceback,CYTHON_UNUSED int nogil)11409 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
11410 CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
11411 int full_traceback, CYTHON_UNUSED int nogil) {
11412 PyObject *old_exc, *old_val, *old_tb;
11413 PyObject *ctx;
11414 __Pyx_PyThreadState_declare
11415 #ifdef WITH_THREAD
11416 PyGILState_STATE state;
11417 if (nogil)
11418 state = PyGILState_Ensure();
11419 #ifdef _MSC_VER
11420 else state = (PyGILState_STATE)-1;
11421 #endif
11422 #endif
11423 __Pyx_PyThreadState_assign
11424 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
11425 if (full_traceback) {
11426 Py_XINCREF(old_exc);
11427 Py_XINCREF(old_val);
11428 Py_XINCREF(old_tb);
11429 __Pyx_ErrRestore(old_exc, old_val, old_tb);
11430 PyErr_PrintEx(1);
11431 }
11432 #if PY_MAJOR_VERSION < 3
11433 ctx = PyString_FromString(name);
11434 #else
11435 ctx = PyUnicode_FromString(name);
11436 #endif
11437 __Pyx_ErrRestore(old_exc, old_val, old_tb);
11438 if (!ctx) {
11439 PyErr_WriteUnraisable(Py_None);
11440 } else {
11441 PyErr_WriteUnraisable(ctx);
11442 Py_DECREF(ctx);
11443 }
11444 #ifdef WITH_THREAD
11445 if (nogil)
11446 PyGILState_Release(state);
11447 #endif
11448 }
11449
11450 /* RaiseDoubleKeywords */
__Pyx_RaiseDoubleKeywordsError(const char * func_name,PyObject * kw_name)11451 static void __Pyx_RaiseDoubleKeywordsError(
11452 const char* func_name,
11453 PyObject* kw_name)
11454 {
11455 PyErr_Format(PyExc_TypeError,
11456 #if PY_MAJOR_VERSION >= 3
11457 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
11458 #else
11459 "%s() got multiple values for keyword argument '%s'", func_name,
11460 PyString_AsString(kw_name));
11461 #endif
11462 }
11463
11464 /* ParseKeywords */
__Pyx_ParseOptionalKeywords(PyObject * kwds,PyObject ** argnames[],PyObject * kwds2,PyObject * values[],Py_ssize_t num_pos_args,const char * function_name)11465 static int __Pyx_ParseOptionalKeywords(
11466 PyObject *kwds,
11467 PyObject **argnames[],
11468 PyObject *kwds2,
11469 PyObject *values[],
11470 Py_ssize_t num_pos_args,
11471 const char* function_name)
11472 {
11473 PyObject *key = 0, *value = 0;
11474 Py_ssize_t pos = 0;
11475 PyObject*** name;
11476 PyObject*** first_kw_arg = argnames + num_pos_args;
11477 while (PyDict_Next(kwds, &pos, &key, &value)) {
11478 name = first_kw_arg;
11479 while (*name && (**name != key)) name++;
11480 if (*name) {
11481 values[name-argnames] = value;
11482 continue;
11483 }
11484 name = first_kw_arg;
11485 #if PY_MAJOR_VERSION < 3
11486 if (likely(PyString_Check(key))) {
11487 while (*name) {
11488 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
11489 && _PyString_Eq(**name, key)) {
11490 values[name-argnames] = value;
11491 break;
11492 }
11493 name++;
11494 }
11495 if (*name) continue;
11496 else {
11497 PyObject*** argname = argnames;
11498 while (argname != first_kw_arg) {
11499 if ((**argname == key) || (
11500 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
11501 && _PyString_Eq(**argname, key))) {
11502 goto arg_passed_twice;
11503 }
11504 argname++;
11505 }
11506 }
11507 } else
11508 #endif
11509 if (likely(PyUnicode_Check(key))) {
11510 while (*name) {
11511 int cmp = (**name == key) ? 0 :
11512 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
11513 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
11514 #endif
11515 PyUnicode_Compare(**name, key);
11516 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
11517 if (cmp == 0) {
11518 values[name-argnames] = value;
11519 break;
11520 }
11521 name++;
11522 }
11523 if (*name) continue;
11524 else {
11525 PyObject*** argname = argnames;
11526 while (argname != first_kw_arg) {
11527 int cmp = (**argname == key) ? 0 :
11528 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
11529 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
11530 #endif
11531 PyUnicode_Compare(**argname, key);
11532 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
11533 if (cmp == 0) goto arg_passed_twice;
11534 argname++;
11535 }
11536 }
11537 } else
11538 goto invalid_keyword_type;
11539 if (kwds2) {
11540 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
11541 } else {
11542 goto invalid_keyword;
11543 }
11544 }
11545 return 0;
11546 arg_passed_twice:
11547 __Pyx_RaiseDoubleKeywordsError(function_name, key);
11548 goto bad;
11549 invalid_keyword_type:
11550 PyErr_Format(PyExc_TypeError,
11551 "%.200s() keywords must be strings", function_name);
11552 goto bad;
11553 invalid_keyword:
11554 PyErr_Format(PyExc_TypeError,
11555 #if PY_MAJOR_VERSION < 3
11556 "%.200s() got an unexpected keyword argument '%.200s'",
11557 function_name, PyString_AsString(key));
11558 #else
11559 "%s() got an unexpected keyword argument '%U'",
11560 function_name, key);
11561 #endif
11562 bad:
11563 return -1;
11564 }
11565
11566 /* RaiseArgTupleInvalid */
__Pyx_RaiseArgtupleInvalid(const char * func_name,int exact,Py_ssize_t num_min,Py_ssize_t num_max,Py_ssize_t num_found)11567 static void __Pyx_RaiseArgtupleInvalid(
11568 const char* func_name,
11569 int exact,
11570 Py_ssize_t num_min,
11571 Py_ssize_t num_max,
11572 Py_ssize_t num_found)
11573 {
11574 Py_ssize_t num_expected;
11575 const char *more_or_less;
11576 if (num_found < num_min) {
11577 num_expected = num_min;
11578 more_or_less = "at least";
11579 } else {
11580 num_expected = num_max;
11581 more_or_less = "at most";
11582 }
11583 if (exact) {
11584 more_or_less = "exactly";
11585 }
11586 PyErr_Format(PyExc_TypeError,
11587 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
11588 func_name, more_or_less, num_expected,
11589 (num_expected == 1) ? "" : "s", num_found);
11590 }
11591
11592 /* PyDictVersioning */
11593 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
__Pyx_get_tp_dict_version(PyObject * obj)11594 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
11595 PyObject *dict = Py_TYPE(obj)->tp_dict;
11596 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
11597 }
__Pyx_get_object_dict_version(PyObject * obj)11598 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
11599 PyObject **dictptr = NULL;
11600 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
11601 if (offset) {
11602 #if CYTHON_COMPILING_IN_CPYTHON
11603 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
11604 #else
11605 dictptr = _PyObject_GetDictPtr(obj);
11606 #endif
11607 }
11608 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
11609 }
__Pyx_object_dict_version_matches(PyObject * obj,PY_UINT64_T tp_dict_version,PY_UINT64_T obj_dict_version)11610 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
11611 PyObject *dict = Py_TYPE(obj)->tp_dict;
11612 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
11613 return 0;
11614 return obj_dict_version == __Pyx_get_object_dict_version(obj);
11615 }
11616 #endif
11617
11618 /* GetModuleGlobalName */
11619 #if CYTHON_USE_DICT_VERSIONS
__Pyx__GetModuleGlobalName(PyObject * name,PY_UINT64_T * dict_version,PyObject ** dict_cached_value)11620 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
11621 #else
11622 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
11623 #endif
11624 {
11625 PyObject *result;
11626 #if !CYTHON_AVOID_BORROWED_REFS
11627 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
11628 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
11629 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
11630 if (likely(result)) {
11631 return __Pyx_NewRef(result);
11632 } else if (unlikely(PyErr_Occurred())) {
11633 return NULL;
11634 }
11635 #else
11636 result = PyDict_GetItem(__pyx_d, name);
11637 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
11638 if (likely(result)) {
11639 return __Pyx_NewRef(result);
11640 }
11641 #endif
11642 #else
11643 result = PyObject_GetItem(__pyx_d, name);
11644 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
11645 if (likely(result)) {
11646 return __Pyx_NewRef(result);
11647 }
11648 PyErr_Clear();
11649 #endif
11650 return __Pyx_GetBuiltinName(name);
11651 }
11652
11653 /* PyObjectCallOneArg */
11654 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx__PyObject_CallOneArg(PyObject * func,PyObject * arg)11655 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
11656 PyObject *result;
11657 PyObject *args = PyTuple_New(1);
11658 if (unlikely(!args)) return NULL;
11659 Py_INCREF(arg);
11660 PyTuple_SET_ITEM(args, 0, arg);
11661 result = __Pyx_PyObject_Call(func, args, NULL);
11662 Py_DECREF(args);
11663 return result;
11664 }
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)11665 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
11666 #if CYTHON_FAST_PYCALL
11667 if (PyFunction_Check(func)) {
11668 return __Pyx_PyFunction_FastCall(func, &arg, 1);
11669 }
11670 #endif
11671 if (likely(PyCFunction_Check(func))) {
11672 if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
11673 return __Pyx_PyObject_CallMethO(func, arg);
11674 #if CYTHON_FAST_PYCCALL
11675 } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
11676 return __Pyx_PyCFunction_FastCall(func, &arg, 1);
11677 #endif
11678 }
11679 }
11680 return __Pyx__PyObject_CallOneArg(func, arg);
11681 }
11682 #else
__Pyx_PyObject_CallOneArg(PyObject * func,PyObject * arg)11683 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
11684 PyObject *result;
11685 PyObject *args = PyTuple_Pack(1, arg);
11686 if (unlikely(!args)) return NULL;
11687 result = __Pyx_PyObject_Call(func, args, NULL);
11688 Py_DECREF(args);
11689 return result;
11690 }
11691 #endif
11692
11693 /* RaiseException */
11694 #if PY_MAJOR_VERSION < 3
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,CYTHON_UNUSED PyObject * cause)11695 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
11696 CYTHON_UNUSED PyObject *cause) {
11697 __Pyx_PyThreadState_declare
11698 Py_XINCREF(type);
11699 if (!value || value == Py_None)
11700 value = NULL;
11701 else
11702 Py_INCREF(value);
11703 if (!tb || tb == Py_None)
11704 tb = NULL;
11705 else {
11706 Py_INCREF(tb);
11707 if (!PyTraceBack_Check(tb)) {
11708 PyErr_SetString(PyExc_TypeError,
11709 "raise: arg 3 must be a traceback or None");
11710 goto raise_error;
11711 }
11712 }
11713 if (PyType_Check(type)) {
11714 #if CYTHON_COMPILING_IN_PYPY
11715 if (!value) {
11716 Py_INCREF(Py_None);
11717 value = Py_None;
11718 }
11719 #endif
11720 PyErr_NormalizeException(&type, &value, &tb);
11721 } else {
11722 if (value) {
11723 PyErr_SetString(PyExc_TypeError,
11724 "instance exception may not have a separate value");
11725 goto raise_error;
11726 }
11727 value = type;
11728 type = (PyObject*) Py_TYPE(type);
11729 Py_INCREF(type);
11730 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
11731 PyErr_SetString(PyExc_TypeError,
11732 "raise: exception class must be a subclass of BaseException");
11733 goto raise_error;
11734 }
11735 }
11736 __Pyx_PyThreadState_assign
11737 __Pyx_ErrRestore(type, value, tb);
11738 return;
11739 raise_error:
11740 Py_XDECREF(value);
11741 Py_XDECREF(type);
11742 Py_XDECREF(tb);
11743 return;
11744 }
11745 #else
__Pyx_Raise(PyObject * type,PyObject * value,PyObject * tb,PyObject * cause)11746 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
11747 PyObject* owned_instance = NULL;
11748 if (tb == Py_None) {
11749 tb = 0;
11750 } else if (tb && !PyTraceBack_Check(tb)) {
11751 PyErr_SetString(PyExc_TypeError,
11752 "raise: arg 3 must be a traceback or None");
11753 goto bad;
11754 }
11755 if (value == Py_None)
11756 value = 0;
11757 if (PyExceptionInstance_Check(type)) {
11758 if (value) {
11759 PyErr_SetString(PyExc_TypeError,
11760 "instance exception may not have a separate value");
11761 goto bad;
11762 }
11763 value = type;
11764 type = (PyObject*) Py_TYPE(value);
11765 } else if (PyExceptionClass_Check(type)) {
11766 PyObject *instance_class = NULL;
11767 if (value && PyExceptionInstance_Check(value)) {
11768 instance_class = (PyObject*) Py_TYPE(value);
11769 if (instance_class != type) {
11770 int is_subclass = PyObject_IsSubclass(instance_class, type);
11771 if (!is_subclass) {
11772 instance_class = NULL;
11773 } else if (unlikely(is_subclass == -1)) {
11774 goto bad;
11775 } else {
11776 type = instance_class;
11777 }
11778 }
11779 }
11780 if (!instance_class) {
11781 PyObject *args;
11782 if (!value)
11783 args = PyTuple_New(0);
11784 else if (PyTuple_Check(value)) {
11785 Py_INCREF(value);
11786 args = value;
11787 } else
11788 args = PyTuple_Pack(1, value);
11789 if (!args)
11790 goto bad;
11791 owned_instance = PyObject_Call(type, args, NULL);
11792 Py_DECREF(args);
11793 if (!owned_instance)
11794 goto bad;
11795 value = owned_instance;
11796 if (!PyExceptionInstance_Check(value)) {
11797 PyErr_Format(PyExc_TypeError,
11798 "calling %R should have returned an instance of "
11799 "BaseException, not %R",
11800 type, Py_TYPE(value));
11801 goto bad;
11802 }
11803 }
11804 } else {
11805 PyErr_SetString(PyExc_TypeError,
11806 "raise: exception class must be a subclass of BaseException");
11807 goto bad;
11808 }
11809 if (cause) {
11810 PyObject *fixed_cause;
11811 if (cause == Py_None) {
11812 fixed_cause = NULL;
11813 } else if (PyExceptionClass_Check(cause)) {
11814 fixed_cause = PyObject_CallObject(cause, NULL);
11815 if (fixed_cause == NULL)
11816 goto bad;
11817 } else if (PyExceptionInstance_Check(cause)) {
11818 fixed_cause = cause;
11819 Py_INCREF(fixed_cause);
11820 } else {
11821 PyErr_SetString(PyExc_TypeError,
11822 "exception causes must derive from "
11823 "BaseException");
11824 goto bad;
11825 }
11826 PyException_SetCause(value, fixed_cause);
11827 }
11828 PyErr_SetObject(type, value);
11829 if (tb) {
11830 #if CYTHON_COMPILING_IN_PYPY
11831 PyObject *tmp_type, *tmp_value, *tmp_tb;
11832 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
11833 Py_INCREF(tb);
11834 PyErr_Restore(tmp_type, tmp_value, tb);
11835 Py_XDECREF(tmp_tb);
11836 #else
11837 PyThreadState *tstate = __Pyx_PyThreadState_Current;
11838 PyObject* tmp_tb = tstate->curexc_traceback;
11839 if (tb != tmp_tb) {
11840 Py_INCREF(tb);
11841 tstate->curexc_traceback = tb;
11842 Py_XDECREF(tmp_tb);
11843 }
11844 #endif
11845 }
11846 bad:
11847 Py_XDECREF(owned_instance);
11848 return;
11849 }
11850 #endif
11851
11852 /* PyObjectCall2Args */
__Pyx_PyObject_Call2Args(PyObject * function,PyObject * arg1,PyObject * arg2)11853 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
11854 PyObject *args, *result = NULL;
11855 #if CYTHON_FAST_PYCALL
11856 if (PyFunction_Check(function)) {
11857 PyObject *args[2] = {arg1, arg2};
11858 return __Pyx_PyFunction_FastCall(function, args, 2);
11859 }
11860 #endif
11861 #if CYTHON_FAST_PYCCALL
11862 if (__Pyx_PyFastCFunction_Check(function)) {
11863 PyObject *args[2] = {arg1, arg2};
11864 return __Pyx_PyCFunction_FastCall(function, args, 2);
11865 }
11866 #endif
11867 args = PyTuple_New(2);
11868 if (unlikely(!args)) goto done;
11869 Py_INCREF(arg1);
11870 PyTuple_SET_ITEM(args, 0, arg1);
11871 Py_INCREF(arg2);
11872 PyTuple_SET_ITEM(args, 1, arg2);
11873 Py_INCREF(function);
11874 result = __Pyx_PyObject_Call(function, args, NULL);
11875 Py_DECREF(args);
11876 Py_DECREF(function);
11877 done:
11878 return result;
11879 }
11880
11881 /* PyObjectGetMethod */
__Pyx_PyObject_GetMethod(PyObject * obj,PyObject * name,PyObject ** method)11882 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
11883 PyObject *attr;
11884 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
11885 PyTypeObject *tp = Py_TYPE(obj);
11886 PyObject *descr;
11887 descrgetfunc f = NULL;
11888 PyObject **dictptr, *dict;
11889 int meth_found = 0;
11890 assert (*method == NULL);
11891 if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
11892 attr = __Pyx_PyObject_GetAttrStr(obj, name);
11893 goto try_unpack;
11894 }
11895 if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
11896 return 0;
11897 }
11898 descr = _PyType_Lookup(tp, name);
11899 if (likely(descr != NULL)) {
11900 Py_INCREF(descr);
11901 #if PY_MAJOR_VERSION >= 3
11902 #ifdef __Pyx_CyFunction_USED
11903 if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
11904 #else
11905 if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
11906 #endif
11907 #else
11908 #ifdef __Pyx_CyFunction_USED
11909 if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
11910 #else
11911 if (likely(PyFunction_Check(descr)))
11912 #endif
11913 #endif
11914 {
11915 meth_found = 1;
11916 } else {
11917 f = Py_TYPE(descr)->tp_descr_get;
11918 if (f != NULL && PyDescr_IsData(descr)) {
11919 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
11920 Py_DECREF(descr);
11921 goto try_unpack;
11922 }
11923 }
11924 }
11925 dictptr = _PyObject_GetDictPtr(obj);
11926 if (dictptr != NULL && (dict = *dictptr) != NULL) {
11927 Py_INCREF(dict);
11928 attr = __Pyx_PyDict_GetItemStr(dict, name);
11929 if (attr != NULL) {
11930 Py_INCREF(attr);
11931 Py_DECREF(dict);
11932 Py_XDECREF(descr);
11933 goto try_unpack;
11934 }
11935 Py_DECREF(dict);
11936 }
11937 if (meth_found) {
11938 *method = descr;
11939 return 1;
11940 }
11941 if (f != NULL) {
11942 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
11943 Py_DECREF(descr);
11944 goto try_unpack;
11945 }
11946 if (descr != NULL) {
11947 *method = descr;
11948 return 0;
11949 }
11950 PyErr_Format(PyExc_AttributeError,
11951 #if PY_MAJOR_VERSION >= 3
11952 "'%.50s' object has no attribute '%U'",
11953 tp->tp_name, name);
11954 #else
11955 "'%.50s' object has no attribute '%.400s'",
11956 tp->tp_name, PyString_AS_STRING(name));
11957 #endif
11958 return 0;
11959 #else
11960 attr = __Pyx_PyObject_GetAttrStr(obj, name);
11961 goto try_unpack;
11962 #endif
11963 try_unpack:
11964 #if CYTHON_UNPACK_METHODS
11965 if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
11966 PyObject *function = PyMethod_GET_FUNCTION(attr);
11967 Py_INCREF(function);
11968 Py_DECREF(attr);
11969 *method = function;
11970 return 1;
11971 }
11972 #endif
11973 *method = attr;
11974 return 0;
11975 }
11976
11977 /* PyObjectCallMethod1 */
__Pyx__PyObject_CallMethod1(PyObject * method,PyObject * arg)11978 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
11979 PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
11980 Py_DECREF(method);
11981 return result;
11982 }
__Pyx_PyObject_CallMethod1(PyObject * obj,PyObject * method_name,PyObject * arg)11983 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
11984 PyObject *method = NULL, *result;
11985 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
11986 if (likely(is_method)) {
11987 result = __Pyx_PyObject_Call2Args(method, obj, arg);
11988 Py_DECREF(method);
11989 return result;
11990 }
11991 if (unlikely(!method)) return NULL;
11992 return __Pyx__PyObject_CallMethod1(method, arg);
11993 }
11994
11995 /* append */
__Pyx_PyObject_Append(PyObject * L,PyObject * x)11996 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
11997 if (likely(PyList_CheckExact(L))) {
11998 if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
11999 } else {
12000 PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
12001 if (unlikely(!retval))
12002 return -1;
12003 Py_DECREF(retval);
12004 }
12005 return 0;
12006 }
12007
12008 /* ArgTypeTest */
__Pyx__ArgTypeTest(PyObject * obj,PyTypeObject * type,const char * name,int exact)12009 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
12010 {
12011 if (unlikely(!type)) {
12012 PyErr_SetString(PyExc_SystemError, "Missing type object");
12013 return 0;
12014 }
12015 else if (exact) {
12016 #if PY_MAJOR_VERSION == 2
12017 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
12018 #endif
12019 }
12020 else {
12021 if (likely(__Pyx_TypeCheck(obj, type))) return 1;
12022 }
12023 PyErr_Format(PyExc_TypeError,
12024 "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
12025 name, type->tp_name, Py_TYPE(obj)->tp_name);
12026 return 0;
12027 }
12028
12029 /* GetItemInt */
__Pyx_GetItemInt_Generic(PyObject * o,PyObject * j)12030 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
12031 PyObject *r;
12032 if (!j) return NULL;
12033 r = PyObject_GetItem(o, j);
12034 Py_DECREF(j);
12035 return r;
12036 }
__Pyx_GetItemInt_List_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)12037 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
12038 CYTHON_NCP_UNUSED int wraparound,
12039 CYTHON_NCP_UNUSED int boundscheck) {
12040 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12041 Py_ssize_t wrapped_i = i;
12042 if (wraparound & unlikely(i < 0)) {
12043 wrapped_i += PyList_GET_SIZE(o);
12044 }
12045 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
12046 PyObject *r = PyList_GET_ITEM(o, wrapped_i);
12047 Py_INCREF(r);
12048 return r;
12049 }
12050 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
12051 #else
12052 return PySequence_GetItem(o, i);
12053 #endif
12054 }
__Pyx_GetItemInt_Tuple_Fast(PyObject * o,Py_ssize_t i,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)12055 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
12056 CYTHON_NCP_UNUSED int wraparound,
12057 CYTHON_NCP_UNUSED int boundscheck) {
12058 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12059 Py_ssize_t wrapped_i = i;
12060 if (wraparound & unlikely(i < 0)) {
12061 wrapped_i += PyTuple_GET_SIZE(o);
12062 }
12063 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
12064 PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
12065 Py_INCREF(r);
12066 return r;
12067 }
12068 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
12069 #else
12070 return PySequence_GetItem(o, i);
12071 #endif
12072 }
__Pyx_GetItemInt_Fast(PyObject * o,Py_ssize_t i,int is_list,CYTHON_NCP_UNUSED int wraparound,CYTHON_NCP_UNUSED int boundscheck)12073 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
12074 CYTHON_NCP_UNUSED int wraparound,
12075 CYTHON_NCP_UNUSED int boundscheck) {
12076 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
12077 if (is_list || PyList_CheckExact(o)) {
12078 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
12079 if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
12080 PyObject *r = PyList_GET_ITEM(o, n);
12081 Py_INCREF(r);
12082 return r;
12083 }
12084 }
12085 else if (PyTuple_CheckExact(o)) {
12086 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
12087 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
12088 PyObject *r = PyTuple_GET_ITEM(o, n);
12089 Py_INCREF(r);
12090 return r;
12091 }
12092 } else {
12093 PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
12094 if (likely(m && m->sq_item)) {
12095 if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
12096 Py_ssize_t l = m->sq_length(o);
12097 if (likely(l >= 0)) {
12098 i += l;
12099 } else {
12100 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
12101 return NULL;
12102 PyErr_Clear();
12103 }
12104 }
12105 return m->sq_item(o, i);
12106 }
12107 }
12108 #else
12109 if (is_list || PySequence_Check(o)) {
12110 return PySequence_GetItem(o, i);
12111 }
12112 #endif
12113 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
12114 }
12115
12116 /* ObjectGetItem */
12117 #if CYTHON_USE_TYPE_SLOTS
__Pyx_PyObject_GetIndex(PyObject * obj,PyObject * index)12118 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
12119 PyObject *runerr;
12120 Py_ssize_t key_value;
12121 PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
12122 if (unlikely(!(m && m->sq_item))) {
12123 PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
12124 return NULL;
12125 }
12126 key_value = __Pyx_PyIndex_AsSsize_t(index);
12127 if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
12128 return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
12129 }
12130 if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
12131 PyErr_Clear();
12132 PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
12133 }
12134 return NULL;
12135 }
__Pyx_PyObject_GetItem(PyObject * obj,PyObject * key)12136 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
12137 PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
12138 if (likely(m && m->mp_subscript)) {
12139 return m->mp_subscript(obj, key);
12140 }
12141 return __Pyx_PyObject_GetIndex(obj, key);
12142 }
12143 #endif
12144
12145 /* DictGetItem */
12146 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
__Pyx_PyDict_GetItem(PyObject * d,PyObject * key)12147 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
12148 PyObject *value;
12149 value = PyDict_GetItemWithError(d, key);
12150 if (unlikely(!value)) {
12151 if (!PyErr_Occurred()) {
12152 if (unlikely(PyTuple_Check(key))) {
12153 PyObject* args = PyTuple_Pack(1, key);
12154 if (likely(args)) {
12155 PyErr_SetObject(PyExc_KeyError, args);
12156 Py_DECREF(args);
12157 }
12158 } else {
12159 PyErr_SetObject(PyExc_KeyError, key);
12160 }
12161 }
12162 return NULL;
12163 }
12164 Py_INCREF(value);
12165 return value;
12166 }
12167 #endif
12168
12169 /* RaiseTooManyValuesToUnpack */
__Pyx_RaiseTooManyValuesError(Py_ssize_t expected)12170 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
12171 PyErr_Format(PyExc_ValueError,
12172 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
12173 }
12174
12175 /* RaiseNeedMoreValuesToUnpack */
__Pyx_RaiseNeedMoreValuesError(Py_ssize_t index)12176 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
12177 PyErr_Format(PyExc_ValueError,
12178 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
12179 index, (index == 1) ? "" : "s");
12180 }
12181
12182 /* RaiseNoneIterError */
__Pyx_RaiseNoneNotIterableError(void)12183 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
12184 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
12185 }
12186
12187 /* ExtTypeTest */
__Pyx_TypeTest(PyObject * obj,PyTypeObject * type)12188 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
12189 if (unlikely(!type)) {
12190 PyErr_SetString(PyExc_SystemError, "Missing type object");
12191 return 0;
12192 }
12193 if (likely(__Pyx_TypeCheck(obj, type)))
12194 return 1;
12195 PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
12196 Py_TYPE(obj)->tp_name, type->tp_name);
12197 return 0;
12198 }
12199
12200 /* GetTopmostException */
12201 #if CYTHON_USE_EXC_INFO_STACK
12202 static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState * tstate)12203 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
12204 {
12205 _PyErr_StackItem *exc_info = tstate->exc_info;
12206 while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
12207 exc_info->previous_item != NULL)
12208 {
12209 exc_info = exc_info->previous_item;
12210 }
12211 return exc_info;
12212 }
12213 #endif
12214
12215 /* SaveResetException */
12216 #if CYTHON_FAST_THREAD_STATE
__Pyx__ExceptionSave(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)12217 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
12218 #if CYTHON_USE_EXC_INFO_STACK
12219 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
12220 *type = exc_info->exc_type;
12221 *value = exc_info->exc_value;
12222 *tb = exc_info->exc_traceback;
12223 #else
12224 *type = tstate->exc_type;
12225 *value = tstate->exc_value;
12226 *tb = tstate->exc_traceback;
12227 #endif
12228 Py_XINCREF(*type);
12229 Py_XINCREF(*value);
12230 Py_XINCREF(*tb);
12231 }
__Pyx__ExceptionReset(PyThreadState * tstate,PyObject * type,PyObject * value,PyObject * tb)12232 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
12233 PyObject *tmp_type, *tmp_value, *tmp_tb;
12234 #if CYTHON_USE_EXC_INFO_STACK
12235 _PyErr_StackItem *exc_info = tstate->exc_info;
12236 tmp_type = exc_info->exc_type;
12237 tmp_value = exc_info->exc_value;
12238 tmp_tb = exc_info->exc_traceback;
12239 exc_info->exc_type = type;
12240 exc_info->exc_value = value;
12241 exc_info->exc_traceback = tb;
12242 #else
12243 tmp_type = tstate->exc_type;
12244 tmp_value = tstate->exc_value;
12245 tmp_tb = tstate->exc_traceback;
12246 tstate->exc_type = type;
12247 tstate->exc_value = value;
12248 tstate->exc_traceback = tb;
12249 #endif
12250 Py_XDECREF(tmp_type);
12251 Py_XDECREF(tmp_value);
12252 Py_XDECREF(tmp_tb);
12253 }
12254 #endif
12255
12256 /* PyErrExceptionMatches */
12257 #if CYTHON_FAST_THREAD_STATE
__Pyx_PyErr_ExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)12258 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
12259 Py_ssize_t i, n;
12260 n = PyTuple_GET_SIZE(tuple);
12261 #if PY_MAJOR_VERSION >= 3
12262 for (i=0; i<n; i++) {
12263 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
12264 }
12265 #endif
12266 for (i=0; i<n; i++) {
12267 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
12268 }
12269 return 0;
12270 }
__Pyx_PyErr_ExceptionMatchesInState(PyThreadState * tstate,PyObject * err)12271 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
12272 PyObject *exc_type = tstate->curexc_type;
12273 if (exc_type == err) return 1;
12274 if (unlikely(!exc_type)) return 0;
12275 if (unlikely(PyTuple_Check(err)))
12276 return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
12277 return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
12278 }
12279 #endif
12280
12281 /* GetException */
12282 #if CYTHON_FAST_THREAD_STATE
__Pyx__GetException(PyThreadState * tstate,PyObject ** type,PyObject ** value,PyObject ** tb)12283 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
12284 #else
12285 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
12286 #endif
12287 {
12288 PyObject *local_type, *local_value, *local_tb;
12289 #if CYTHON_FAST_THREAD_STATE
12290 PyObject *tmp_type, *tmp_value, *tmp_tb;
12291 local_type = tstate->curexc_type;
12292 local_value = tstate->curexc_value;
12293 local_tb = tstate->curexc_traceback;
12294 tstate->curexc_type = 0;
12295 tstate->curexc_value = 0;
12296 tstate->curexc_traceback = 0;
12297 #else
12298 PyErr_Fetch(&local_type, &local_value, &local_tb);
12299 #endif
12300 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
12301 #if CYTHON_FAST_THREAD_STATE
12302 if (unlikely(tstate->curexc_type))
12303 #else
12304 if (unlikely(PyErr_Occurred()))
12305 #endif
12306 goto bad;
12307 #if PY_MAJOR_VERSION >= 3
12308 if (local_tb) {
12309 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
12310 goto bad;
12311 }
12312 #endif
12313 Py_XINCREF(local_tb);
12314 Py_XINCREF(local_type);
12315 Py_XINCREF(local_value);
12316 *type = local_type;
12317 *value = local_value;
12318 *tb = local_tb;
12319 #if CYTHON_FAST_THREAD_STATE
12320 #if CYTHON_USE_EXC_INFO_STACK
12321 {
12322 _PyErr_StackItem *exc_info = tstate->exc_info;
12323 tmp_type = exc_info->exc_type;
12324 tmp_value = exc_info->exc_value;
12325 tmp_tb = exc_info->exc_traceback;
12326 exc_info->exc_type = local_type;
12327 exc_info->exc_value = local_value;
12328 exc_info->exc_traceback = local_tb;
12329 }
12330 #else
12331 tmp_type = tstate->exc_type;
12332 tmp_value = tstate->exc_value;
12333 tmp_tb = tstate->exc_traceback;
12334 tstate->exc_type = local_type;
12335 tstate->exc_value = local_value;
12336 tstate->exc_traceback = local_tb;
12337 #endif
12338 Py_XDECREF(tmp_type);
12339 Py_XDECREF(tmp_value);
12340 Py_XDECREF(tmp_tb);
12341 #else
12342 PyErr_SetExcInfo(local_type, local_value, local_tb);
12343 #endif
12344 return 0;
12345 bad:
12346 *type = 0;
12347 *value = 0;
12348 *tb = 0;
12349 Py_XDECREF(local_type);
12350 Py_XDECREF(local_value);
12351 Py_XDECREF(local_tb);
12352 return -1;
12353 }
12354
12355 /* PyObject_GenericGetAttrNoDict */
12356 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_RaiseGenericGetAttributeError(PyTypeObject * tp,PyObject * attr_name)12357 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
12358 PyErr_Format(PyExc_AttributeError,
12359 #if PY_MAJOR_VERSION >= 3
12360 "'%.50s' object has no attribute '%U'",
12361 tp->tp_name, attr_name);
12362 #else
12363 "'%.50s' object has no attribute '%.400s'",
12364 tp->tp_name, PyString_AS_STRING(attr_name));
12365 #endif
12366 return NULL;
12367 }
__Pyx_PyObject_GenericGetAttrNoDict(PyObject * obj,PyObject * attr_name)12368 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
12369 PyObject *descr;
12370 PyTypeObject *tp = Py_TYPE(obj);
12371 if (unlikely(!PyString_Check(attr_name))) {
12372 return PyObject_GenericGetAttr(obj, attr_name);
12373 }
12374 assert(!tp->tp_dictoffset);
12375 descr = _PyType_Lookup(tp, attr_name);
12376 if (unlikely(!descr)) {
12377 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
12378 }
12379 Py_INCREF(descr);
12380 #if PY_MAJOR_VERSION < 3
12381 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
12382 #endif
12383 {
12384 descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
12385 if (unlikely(f)) {
12386 PyObject *res = f(descr, obj, (PyObject *)tp);
12387 Py_DECREF(descr);
12388 return res;
12389 }
12390 }
12391 return descr;
12392 }
12393 #endif
12394
12395 /* PyObject_GenericGetAttr */
12396 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
__Pyx_PyObject_GenericGetAttr(PyObject * obj,PyObject * attr_name)12397 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
12398 if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
12399 return PyObject_GenericGetAttr(obj, attr_name);
12400 }
12401 return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
12402 }
12403 #endif
12404
12405 /* SetVTable */
__Pyx_SetVtable(PyObject * dict,void * vtable)12406 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
12407 #if PY_VERSION_HEX >= 0x02070000
12408 PyObject *ob = PyCapsule_New(vtable, 0, 0);
12409 #else
12410 PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
12411 #endif
12412 if (!ob)
12413 goto bad;
12414 if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
12415 goto bad;
12416 Py_DECREF(ob);
12417 return 0;
12418 bad:
12419 Py_XDECREF(ob);
12420 return -1;
12421 }
12422
12423 /* PyObjectGetAttrStrNoError */
__Pyx_PyObject_GetAttrStr_ClearAttributeError(void)12424 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
12425 __Pyx_PyThreadState_declare
12426 __Pyx_PyThreadState_assign
12427 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
12428 __Pyx_PyErr_Clear();
12429 }
__Pyx_PyObject_GetAttrStrNoError(PyObject * obj,PyObject * attr_name)12430 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
12431 PyObject *result;
12432 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
12433 PyTypeObject* tp = Py_TYPE(obj);
12434 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
12435 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
12436 }
12437 #endif
12438 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
12439 if (unlikely(!result)) {
12440 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
12441 }
12442 return result;
12443 }
12444
12445 /* SetupReduce */
__Pyx_setup_reduce_is_named(PyObject * meth,PyObject * name)12446 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
12447 int ret;
12448 PyObject *name_attr;
12449 name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
12450 if (likely(name_attr)) {
12451 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
12452 } else {
12453 ret = -1;
12454 }
12455 if (unlikely(ret < 0)) {
12456 PyErr_Clear();
12457 ret = 0;
12458 }
12459 Py_XDECREF(name_attr);
12460 return ret;
12461 }
__Pyx_setup_reduce(PyObject * type_obj)12462 static int __Pyx_setup_reduce(PyObject* type_obj) {
12463 int ret = 0;
12464 PyObject *object_reduce = NULL;
12465 PyObject *object_reduce_ex = NULL;
12466 PyObject *reduce = NULL;
12467 PyObject *reduce_ex = NULL;
12468 PyObject *reduce_cython = NULL;
12469 PyObject *setstate = NULL;
12470 PyObject *setstate_cython = NULL;
12471 #if CYTHON_USE_PYTYPE_LOOKUP
12472 if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
12473 #else
12474 if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD;
12475 #endif
12476 #if CYTHON_USE_PYTYPE_LOOKUP
12477 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
12478 #else
12479 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
12480 #endif
12481 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
12482 if (reduce_ex == object_reduce_ex) {
12483 #if CYTHON_USE_PYTYPE_LOOKUP
12484 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
12485 #else
12486 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
12487 #endif
12488 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
12489 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
12490 reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
12491 if (likely(reduce_cython)) {
12492 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
12493 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
12494 } else if (reduce == object_reduce || PyErr_Occurred()) {
12495 goto __PYX_BAD;
12496 }
12497 setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
12498 if (!setstate) PyErr_Clear();
12499 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
12500 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
12501 if (likely(setstate_cython)) {
12502 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
12503 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
12504 } else if (!setstate || PyErr_Occurred()) {
12505 goto __PYX_BAD;
12506 }
12507 }
12508 PyType_Modified((PyTypeObject*)type_obj);
12509 }
12510 }
12511 goto __PYX_GOOD;
12512 __PYX_BAD:
12513 if (!PyErr_Occurred())
12514 PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
12515 ret = -1;
12516 __PYX_GOOD:
12517 #if !CYTHON_USE_PYTYPE_LOOKUP
12518 Py_XDECREF(object_reduce);
12519 Py_XDECREF(object_reduce_ex);
12520 #endif
12521 Py_XDECREF(reduce);
12522 Py_XDECREF(reduce_ex);
12523 Py_XDECREF(reduce_cython);
12524 Py_XDECREF(setstate);
12525 Py_XDECREF(setstate_cython);
12526 return ret;
12527 }
12528
12529 /* TypeImport */
12530 #ifndef __PYX_HAVE_RT_ImportType
12531 #define __PYX_HAVE_RT_ImportType
__Pyx_ImportType(PyObject * module,const char * module_name,const char * class_name,size_t size,enum __Pyx_ImportType_CheckSize check_size)12532 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
12533 size_t size, enum __Pyx_ImportType_CheckSize check_size)
12534 {
12535 PyObject *result = 0;
12536 char warning[200];
12537 Py_ssize_t basicsize;
12538 #ifdef Py_LIMITED_API
12539 PyObject *py_basicsize;
12540 #endif
12541 result = PyObject_GetAttrString(module, class_name);
12542 if (!result)
12543 goto bad;
12544 if (!PyType_Check(result)) {
12545 PyErr_Format(PyExc_TypeError,
12546 "%.200s.%.200s is not a type object",
12547 module_name, class_name);
12548 goto bad;
12549 }
12550 #ifndef Py_LIMITED_API
12551 basicsize = ((PyTypeObject *)result)->tp_basicsize;
12552 #else
12553 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
12554 if (!py_basicsize)
12555 goto bad;
12556 basicsize = PyLong_AsSsize_t(py_basicsize);
12557 Py_DECREF(py_basicsize);
12558 py_basicsize = 0;
12559 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
12560 goto bad;
12561 #endif
12562 if ((size_t)basicsize < size) {
12563 PyErr_Format(PyExc_ValueError,
12564 "%.200s.%.200s size changed, may indicate binary incompatibility. "
12565 "Expected %zd from C header, got %zd from PyObject",
12566 module_name, class_name, size, basicsize);
12567 goto bad;
12568 }
12569 if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
12570 PyErr_Format(PyExc_ValueError,
12571 "%.200s.%.200s size changed, may indicate binary incompatibility. "
12572 "Expected %zd from C header, got %zd from PyObject",
12573 module_name, class_name, size, basicsize);
12574 goto bad;
12575 }
12576 else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
12577 PyOS_snprintf(warning, sizeof(warning),
12578 "%s.%s size changed, may indicate binary incompatibility. "
12579 "Expected %zd from C header, got %zd from PyObject",
12580 module_name, class_name, size, basicsize);
12581 if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
12582 }
12583 return (PyTypeObject *)result;
12584 bad:
12585 Py_XDECREF(result);
12586 return NULL;
12587 }
12588 #endif
12589
12590 /* GetVTable */
__Pyx_GetVtable(PyObject * dict)12591 static void* __Pyx_GetVtable(PyObject *dict) {
12592 void* ptr;
12593 PyObject *ob = PyObject_GetItem(dict, __pyx_n_s_pyx_vtable);
12594 if (!ob)
12595 goto bad;
12596 #if PY_VERSION_HEX >= 0x02070000
12597 ptr = PyCapsule_GetPointer(ob, 0);
12598 #else
12599 ptr = PyCObject_AsVoidPtr(ob);
12600 #endif
12601 if (!ptr && !PyErr_Occurred())
12602 PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
12603 Py_DECREF(ob);
12604 return ptr;
12605 bad:
12606 Py_XDECREF(ob);
12607 return NULL;
12608 }
12609
12610 /* Import */
__Pyx_Import(PyObject * name,PyObject * from_list,int level)12611 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
12612 PyObject *empty_list = 0;
12613 PyObject *module = 0;
12614 PyObject *global_dict = 0;
12615 PyObject *empty_dict = 0;
12616 PyObject *list;
12617 #if PY_MAJOR_VERSION < 3
12618 PyObject *py_import;
12619 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
12620 if (!py_import)
12621 goto bad;
12622 #endif
12623 if (from_list)
12624 list = from_list;
12625 else {
12626 empty_list = PyList_New(0);
12627 if (!empty_list)
12628 goto bad;
12629 list = empty_list;
12630 }
12631 global_dict = PyModule_GetDict(__pyx_m);
12632 if (!global_dict)
12633 goto bad;
12634 empty_dict = PyDict_New();
12635 if (!empty_dict)
12636 goto bad;
12637 {
12638 #if PY_MAJOR_VERSION >= 3
12639 if (level == -1) {
12640 if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
12641 module = PyImport_ImportModuleLevelObject(
12642 name, global_dict, empty_dict, list, 1);
12643 if (!module) {
12644 if (!PyErr_ExceptionMatches(PyExc_ImportError))
12645 goto bad;
12646 PyErr_Clear();
12647 }
12648 }
12649 level = 0;
12650 }
12651 #endif
12652 if (!module) {
12653 #if PY_MAJOR_VERSION < 3
12654 PyObject *py_level = PyInt_FromLong(level);
12655 if (!py_level)
12656 goto bad;
12657 module = PyObject_CallFunctionObjArgs(py_import,
12658 name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
12659 Py_DECREF(py_level);
12660 #else
12661 module = PyImport_ImportModuleLevelObject(
12662 name, global_dict, empty_dict, list, level);
12663 #endif
12664 }
12665 }
12666 bad:
12667 #if PY_MAJOR_VERSION < 3
12668 Py_XDECREF(py_import);
12669 #endif
12670 Py_XDECREF(empty_list);
12671 Py_XDECREF(empty_dict);
12672 return module;
12673 }
12674
12675 /* ImportFrom */
__Pyx_ImportFrom(PyObject * module,PyObject * name)12676 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
12677 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
12678 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
12679 PyErr_Format(PyExc_ImportError,
12680 #if PY_MAJOR_VERSION < 3
12681 "cannot import name %.230s", PyString_AS_STRING(name));
12682 #else
12683 "cannot import name %S", name);
12684 #endif
12685 }
12686 return value;
12687 }
12688
12689 /* CLineInTraceback */
12690 #ifndef CYTHON_CLINE_IN_TRACEBACK
__Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState * tstate,int c_line)12691 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
12692 PyObject *use_cline;
12693 PyObject *ptype, *pvalue, *ptraceback;
12694 #if CYTHON_COMPILING_IN_CPYTHON
12695 PyObject **cython_runtime_dict;
12696 #endif
12697 if (unlikely(!__pyx_cython_runtime)) {
12698 return c_line;
12699 }
12700 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
12701 #if CYTHON_COMPILING_IN_CPYTHON
12702 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
12703 if (likely(cython_runtime_dict)) {
12704 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
12705 use_cline, *cython_runtime_dict,
12706 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
12707 } else
12708 #endif
12709 {
12710 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
12711 if (use_cline_obj) {
12712 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
12713 Py_DECREF(use_cline_obj);
12714 } else {
12715 PyErr_Clear();
12716 use_cline = NULL;
12717 }
12718 }
12719 if (!use_cline) {
12720 c_line = 0;
12721 PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
12722 }
12723 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
12724 c_line = 0;
12725 }
12726 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
12727 return c_line;
12728 }
12729 #endif
12730
12731 /* CodeObjectCache */
__pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry * entries,int count,int code_line)12732 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
12733 int start = 0, mid = 0, end = count - 1;
12734 if (end >= 0 && code_line > entries[end].code_line) {
12735 return count;
12736 }
12737 while (start < end) {
12738 mid = start + (end - start) / 2;
12739 if (code_line < entries[mid].code_line) {
12740 end = mid;
12741 } else if (code_line > entries[mid].code_line) {
12742 start = mid + 1;
12743 } else {
12744 return mid;
12745 }
12746 }
12747 if (code_line <= entries[mid].code_line) {
12748 return mid;
12749 } else {
12750 return mid + 1;
12751 }
12752 }
__pyx_find_code_object(int code_line)12753 static PyCodeObject *__pyx_find_code_object(int code_line) {
12754 PyCodeObject* code_object;
12755 int pos;
12756 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
12757 return NULL;
12758 }
12759 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
12760 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
12761 return NULL;
12762 }
12763 code_object = __pyx_code_cache.entries[pos].code_object;
12764 Py_INCREF(code_object);
12765 return code_object;
12766 }
__pyx_insert_code_object(int code_line,PyCodeObject * code_object)12767 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
12768 int pos, i;
12769 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
12770 if (unlikely(!code_line)) {
12771 return;
12772 }
12773 if (unlikely(!entries)) {
12774 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
12775 if (likely(entries)) {
12776 __pyx_code_cache.entries = entries;
12777 __pyx_code_cache.max_count = 64;
12778 __pyx_code_cache.count = 1;
12779 entries[0].code_line = code_line;
12780 entries[0].code_object = code_object;
12781 Py_INCREF(code_object);
12782 }
12783 return;
12784 }
12785 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
12786 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
12787 PyCodeObject* tmp = entries[pos].code_object;
12788 entries[pos].code_object = code_object;
12789 Py_DECREF(tmp);
12790 return;
12791 }
12792 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
12793 int new_max = __pyx_code_cache.max_count + 64;
12794 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
12795 __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
12796 if (unlikely(!entries)) {
12797 return;
12798 }
12799 __pyx_code_cache.entries = entries;
12800 __pyx_code_cache.max_count = new_max;
12801 }
12802 for (i=__pyx_code_cache.count; i>pos; i--) {
12803 entries[i] = entries[i-1];
12804 }
12805 entries[pos].code_line = code_line;
12806 entries[pos].code_object = code_object;
12807 __pyx_code_cache.count++;
12808 Py_INCREF(code_object);
12809 }
12810
12811 /* AddTraceback */
12812 #include "compile.h"
12813 #include "frameobject.h"
12814 #include "traceback.h"
__Pyx_CreateCodeObjectForTraceback(const char * funcname,int c_line,int py_line,const char * filename)12815 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
12816 const char *funcname, int c_line,
12817 int py_line, const char *filename) {
12818 PyCodeObject *py_code = 0;
12819 PyObject *py_srcfile = 0;
12820 PyObject *py_funcname = 0;
12821 #if PY_MAJOR_VERSION < 3
12822 py_srcfile = PyString_FromString(filename);
12823 #else
12824 py_srcfile = PyUnicode_FromString(filename);
12825 #endif
12826 if (!py_srcfile) goto bad;
12827 if (c_line) {
12828 #if PY_MAJOR_VERSION < 3
12829 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12830 #else
12831 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
12832 #endif
12833 }
12834 else {
12835 #if PY_MAJOR_VERSION < 3
12836 py_funcname = PyString_FromString(funcname);
12837 #else
12838 py_funcname = PyUnicode_FromString(funcname);
12839 #endif
12840 }
12841 if (!py_funcname) goto bad;
12842 py_code = __Pyx_PyCode_New(
12843 0,
12844 0,
12845 0,
12846 0,
12847 0,
12848 __pyx_empty_bytes, /*PyObject *code,*/
12849 __pyx_empty_tuple, /*PyObject *consts,*/
12850 __pyx_empty_tuple, /*PyObject *names,*/
12851 __pyx_empty_tuple, /*PyObject *varnames,*/
12852 __pyx_empty_tuple, /*PyObject *freevars,*/
12853 __pyx_empty_tuple, /*PyObject *cellvars,*/
12854 py_srcfile, /*PyObject *filename,*/
12855 py_funcname, /*PyObject *name,*/
12856 py_line,
12857 __pyx_empty_bytes /*PyObject *lnotab*/
12858 );
12859 Py_DECREF(py_srcfile);
12860 Py_DECREF(py_funcname);
12861 return py_code;
12862 bad:
12863 Py_XDECREF(py_srcfile);
12864 Py_XDECREF(py_funcname);
12865 return NULL;
12866 }
__Pyx_AddTraceback(const char * funcname,int c_line,int py_line,const char * filename)12867 static void __Pyx_AddTraceback(const char *funcname, int c_line,
12868 int py_line, const char *filename) {
12869 PyCodeObject *py_code = 0;
12870 PyFrameObject *py_frame = 0;
12871 PyThreadState *tstate = __Pyx_PyThreadState_Current;
12872 if (c_line) {
12873 c_line = __Pyx_CLineForTraceback(tstate, c_line);
12874 }
12875 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
12876 if (!py_code) {
12877 py_code = __Pyx_CreateCodeObjectForTraceback(
12878 funcname, c_line, py_line, filename);
12879 if (!py_code) goto bad;
12880 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
12881 }
12882 py_frame = PyFrame_New(
12883 tstate, /*PyThreadState *tstate,*/
12884 py_code, /*PyCodeObject *code,*/
12885 __pyx_d, /*PyObject *globals,*/
12886 0 /*PyObject *locals*/
12887 );
12888 if (!py_frame) goto bad;
12889 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
12890 PyTraceBack_Here(py_frame);
12891 bad:
12892 Py_XDECREF(py_code);
12893 Py_XDECREF(py_frame);
12894 }
12895
12896 /* CIntFromPyVerify */
12897 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
12898 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
12899 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
12900 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
12901 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
12902 {\
12903 func_type value = func_value;\
12904 if (sizeof(target_type) < sizeof(func_type)) {\
12905 if (unlikely(value != (func_type) (target_type) value)) {\
12906 func_type zero = 0;\
12907 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
12908 return (target_type) -1;\
12909 if (is_unsigned && unlikely(value < zero))\
12910 goto raise_neg_overflow;\
12911 else\
12912 goto raise_overflow;\
12913 }\
12914 }\
12915 return (target_type) value;\
12916 }
12917
12918 /* CIntToPy */
__Pyx_PyInt_From_int(int value)12919 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
12920 const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
12921 const int is_unsigned = neg_one > const_zero;
12922 if (is_unsigned) {
12923 if (sizeof(int) < sizeof(long)) {
12924 return PyInt_FromLong((long) value);
12925 } else if (sizeof(int) <= sizeof(unsigned long)) {
12926 return PyLong_FromUnsignedLong((unsigned long) value);
12927 #ifdef HAVE_LONG_LONG
12928 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
12929 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
12930 #endif
12931 }
12932 } else {
12933 if (sizeof(int) <= sizeof(long)) {
12934 return PyInt_FromLong((long) value);
12935 #ifdef HAVE_LONG_LONG
12936 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
12937 return PyLong_FromLongLong((PY_LONG_LONG) value);
12938 #endif
12939 }
12940 }
12941 {
12942 int one = 1; int little = (int)*(unsigned char *)&one;
12943 unsigned char *bytes = (unsigned char *)&value;
12944 return _PyLong_FromByteArray(bytes, sizeof(int),
12945 little, !is_unsigned);
12946 }
12947 }
12948
12949 /* CIntToPy */
__Pyx_PyInt_From_long(long value)12950 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
12951 const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
12952 const int is_unsigned = neg_one > const_zero;
12953 if (is_unsigned) {
12954 if (sizeof(long) < sizeof(long)) {
12955 return PyInt_FromLong((long) value);
12956 } else if (sizeof(long) <= sizeof(unsigned long)) {
12957 return PyLong_FromUnsignedLong((unsigned long) value);
12958 #ifdef HAVE_LONG_LONG
12959 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
12960 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
12961 #endif
12962 }
12963 } else {
12964 if (sizeof(long) <= sizeof(long)) {
12965 return PyInt_FromLong((long) value);
12966 #ifdef HAVE_LONG_LONG
12967 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
12968 return PyLong_FromLongLong((PY_LONG_LONG) value);
12969 #endif
12970 }
12971 }
12972 {
12973 int one = 1; int little = (int)*(unsigned char *)&one;
12974 unsigned char *bytes = (unsigned char *)&value;
12975 return _PyLong_FromByteArray(bytes, sizeof(long),
12976 little, !is_unsigned);
12977 }
12978 }
12979
12980 /* Declarations */
12981 #if CYTHON_CCOMPLEX
12982 #ifdef __cplusplus
__pyx_t_float_complex_from_parts(float x,float y)12983 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
12984 return ::std::complex< float >(x, y);
12985 }
12986 #else
__pyx_t_float_complex_from_parts(float x,float y)12987 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
12988 return x + y*(__pyx_t_float_complex)_Complex_I;
12989 }
12990 #endif
12991 #else
__pyx_t_float_complex_from_parts(float x,float y)12992 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
12993 __pyx_t_float_complex z;
12994 z.real = x;
12995 z.imag = y;
12996 return z;
12997 }
12998 #endif
12999
13000 /* Arithmetic */
13001 #if CYTHON_CCOMPLEX
13002 #else
__Pyx_c_eq_float(__pyx_t_float_complex a,__pyx_t_float_complex b)13003 static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
13004 return (a.real == b.real) && (a.imag == b.imag);
13005 }
__Pyx_c_sum_float(__pyx_t_float_complex a,__pyx_t_float_complex b)13006 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
13007 __pyx_t_float_complex z;
13008 z.real = a.real + b.real;
13009 z.imag = a.imag + b.imag;
13010 return z;
13011 }
__Pyx_c_diff_float(__pyx_t_float_complex a,__pyx_t_float_complex b)13012 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
13013 __pyx_t_float_complex z;
13014 z.real = a.real - b.real;
13015 z.imag = a.imag - b.imag;
13016 return z;
13017 }
__Pyx_c_prod_float(__pyx_t_float_complex a,__pyx_t_float_complex b)13018 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
13019 __pyx_t_float_complex z;
13020 z.real = a.real * b.real - a.imag * b.imag;
13021 z.imag = a.real * b.imag + a.imag * b.real;
13022 return z;
13023 }
13024 #if 1
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)13025 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
13026 if (b.imag == 0) {
13027 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
13028 } else if (fabsf(b.real) >= fabsf(b.imag)) {
13029 if (b.real == 0 && b.imag == 0) {
13030 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
13031 } else {
13032 float r = b.imag / b.real;
13033 float s = (float)(1.0) / (b.real + b.imag * r);
13034 return __pyx_t_float_complex_from_parts(
13035 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
13036 }
13037 } else {
13038 float r = b.real / b.imag;
13039 float s = (float)(1.0) / (b.imag + b.real * r);
13040 return __pyx_t_float_complex_from_parts(
13041 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
13042 }
13043 }
13044 #else
__Pyx_c_quot_float(__pyx_t_float_complex a,__pyx_t_float_complex b)13045 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
13046 if (b.imag == 0) {
13047 return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
13048 } else {
13049 float denom = b.real * b.real + b.imag * b.imag;
13050 return __pyx_t_float_complex_from_parts(
13051 (a.real * b.real + a.imag * b.imag) / denom,
13052 (a.imag * b.real - a.real * b.imag) / denom);
13053 }
13054 }
13055 #endif
__Pyx_c_neg_float(__pyx_t_float_complex a)13056 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
13057 __pyx_t_float_complex z;
13058 z.real = -a.real;
13059 z.imag = -a.imag;
13060 return z;
13061 }
__Pyx_c_is_zero_float(__pyx_t_float_complex a)13062 static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
13063 return (a.real == 0) && (a.imag == 0);
13064 }
__Pyx_c_conj_float(__pyx_t_float_complex a)13065 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
13066 __pyx_t_float_complex z;
13067 z.real = a.real;
13068 z.imag = -a.imag;
13069 return z;
13070 }
13071 #if 1
__Pyx_c_abs_float(__pyx_t_float_complex z)13072 static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
13073 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
13074 return sqrtf(z.real*z.real + z.imag*z.imag);
13075 #else
13076 return hypotf(z.real, z.imag);
13077 #endif
13078 }
__Pyx_c_pow_float(__pyx_t_float_complex a,__pyx_t_float_complex b)13079 static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
13080 __pyx_t_float_complex z;
13081 float r, lnr, theta, z_r, z_theta;
13082 if (b.imag == 0 && b.real == (int)b.real) {
13083 if (b.real < 0) {
13084 float denom = a.real * a.real + a.imag * a.imag;
13085 a.real = a.real / denom;
13086 a.imag = -a.imag / denom;
13087 b.real = -b.real;
13088 }
13089 switch ((int)b.real) {
13090 case 0:
13091 z.real = 1;
13092 z.imag = 0;
13093 return z;
13094 case 1:
13095 return a;
13096 case 2:
13097 return __Pyx_c_prod_float(a, a);
13098 case 3:
13099 z = __Pyx_c_prod_float(a, a);
13100 return __Pyx_c_prod_float(z, a);
13101 case 4:
13102 z = __Pyx_c_prod_float(a, a);
13103 return __Pyx_c_prod_float(z, z);
13104 }
13105 }
13106 if (a.imag == 0) {
13107 if (a.real == 0) {
13108 return a;
13109 } else if (b.imag == 0) {
13110 z.real = powf(a.real, b.real);
13111 z.imag = 0;
13112 return z;
13113 } else if (a.real > 0) {
13114 r = a.real;
13115 theta = 0;
13116 } else {
13117 r = -a.real;
13118 theta = atan2f(0.0, -1.0);
13119 }
13120 } else {
13121 r = __Pyx_c_abs_float(a);
13122 theta = atan2f(a.imag, a.real);
13123 }
13124 lnr = logf(r);
13125 z_r = expf(lnr * b.real - theta * b.imag);
13126 z_theta = theta * b.real + lnr * b.imag;
13127 z.real = z_r * cosf(z_theta);
13128 z.imag = z_r * sinf(z_theta);
13129 return z;
13130 }
13131 #endif
13132 #endif
13133
13134 /* Declarations */
13135 #if CYTHON_CCOMPLEX
13136 #ifdef __cplusplus
__pyx_t_double_complex_from_parts(double x,double y)13137 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
13138 return ::std::complex< double >(x, y);
13139 }
13140 #else
__pyx_t_double_complex_from_parts(double x,double y)13141 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
13142 return x + y*(__pyx_t_double_complex)_Complex_I;
13143 }
13144 #endif
13145 #else
__pyx_t_double_complex_from_parts(double x,double y)13146 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
13147 __pyx_t_double_complex z;
13148 z.real = x;
13149 z.imag = y;
13150 return z;
13151 }
13152 #endif
13153
13154 /* Arithmetic */
13155 #if CYTHON_CCOMPLEX
13156 #else
__Pyx_c_eq_double(__pyx_t_double_complex a,__pyx_t_double_complex b)13157 static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13158 return (a.real == b.real) && (a.imag == b.imag);
13159 }
__Pyx_c_sum_double(__pyx_t_double_complex a,__pyx_t_double_complex b)13160 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13161 __pyx_t_double_complex z;
13162 z.real = a.real + b.real;
13163 z.imag = a.imag + b.imag;
13164 return z;
13165 }
__Pyx_c_diff_double(__pyx_t_double_complex a,__pyx_t_double_complex b)13166 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13167 __pyx_t_double_complex z;
13168 z.real = a.real - b.real;
13169 z.imag = a.imag - b.imag;
13170 return z;
13171 }
__Pyx_c_prod_double(__pyx_t_double_complex a,__pyx_t_double_complex b)13172 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13173 __pyx_t_double_complex z;
13174 z.real = a.real * b.real - a.imag * b.imag;
13175 z.imag = a.real * b.imag + a.imag * b.real;
13176 return z;
13177 }
13178 #if 1
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)13179 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13180 if (b.imag == 0) {
13181 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
13182 } else if (fabs(b.real) >= fabs(b.imag)) {
13183 if (b.real == 0 && b.imag == 0) {
13184 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
13185 } else {
13186 double r = b.imag / b.real;
13187 double s = (double)(1.0) / (b.real + b.imag * r);
13188 return __pyx_t_double_complex_from_parts(
13189 (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
13190 }
13191 } else {
13192 double r = b.real / b.imag;
13193 double s = (double)(1.0) / (b.imag + b.real * r);
13194 return __pyx_t_double_complex_from_parts(
13195 (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
13196 }
13197 }
13198 #else
__Pyx_c_quot_double(__pyx_t_double_complex a,__pyx_t_double_complex b)13199 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13200 if (b.imag == 0) {
13201 return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
13202 } else {
13203 double denom = b.real * b.real + b.imag * b.imag;
13204 return __pyx_t_double_complex_from_parts(
13205 (a.real * b.real + a.imag * b.imag) / denom,
13206 (a.imag * b.real - a.real * b.imag) / denom);
13207 }
13208 }
13209 #endif
__Pyx_c_neg_double(__pyx_t_double_complex a)13210 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
13211 __pyx_t_double_complex z;
13212 z.real = -a.real;
13213 z.imag = -a.imag;
13214 return z;
13215 }
__Pyx_c_is_zero_double(__pyx_t_double_complex a)13216 static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
13217 return (a.real == 0) && (a.imag == 0);
13218 }
__Pyx_c_conj_double(__pyx_t_double_complex a)13219 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
13220 __pyx_t_double_complex z;
13221 z.real = a.real;
13222 z.imag = -a.imag;
13223 return z;
13224 }
13225 #if 1
__Pyx_c_abs_double(__pyx_t_double_complex z)13226 static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
13227 #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
13228 return sqrt(z.real*z.real + z.imag*z.imag);
13229 #else
13230 return hypot(z.real, z.imag);
13231 #endif
13232 }
__Pyx_c_pow_double(__pyx_t_double_complex a,__pyx_t_double_complex b)13233 static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
13234 __pyx_t_double_complex z;
13235 double r, lnr, theta, z_r, z_theta;
13236 if (b.imag == 0 && b.real == (int)b.real) {
13237 if (b.real < 0) {
13238 double denom = a.real * a.real + a.imag * a.imag;
13239 a.real = a.real / denom;
13240 a.imag = -a.imag / denom;
13241 b.real = -b.real;
13242 }
13243 switch ((int)b.real) {
13244 case 0:
13245 z.real = 1;
13246 z.imag = 0;
13247 return z;
13248 case 1:
13249 return a;
13250 case 2:
13251 return __Pyx_c_prod_double(a, a);
13252 case 3:
13253 z = __Pyx_c_prod_double(a, a);
13254 return __Pyx_c_prod_double(z, a);
13255 case 4:
13256 z = __Pyx_c_prod_double(a, a);
13257 return __Pyx_c_prod_double(z, z);
13258 }
13259 }
13260 if (a.imag == 0) {
13261 if (a.real == 0) {
13262 return a;
13263 } else if (b.imag == 0) {
13264 z.real = pow(a.real, b.real);
13265 z.imag = 0;
13266 return z;
13267 } else if (a.real > 0) {
13268 r = a.real;
13269 theta = 0;
13270 } else {
13271 r = -a.real;
13272 theta = atan2(0.0, -1.0);
13273 }
13274 } else {
13275 r = __Pyx_c_abs_double(a);
13276 theta = atan2(a.imag, a.real);
13277 }
13278 lnr = log(r);
13279 z_r = exp(lnr * b.real - theta * b.imag);
13280 z_theta = theta * b.real + lnr * b.imag;
13281 z.real = z_r * cos(z_theta);
13282 z.imag = z_r * sin(z_theta);
13283 return z;
13284 }
13285 #endif
13286 #endif
13287
13288 /* CIntToPy */
__Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value)13289 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
13290 const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
13291 const int is_unsigned = neg_one > const_zero;
13292 if (is_unsigned) {
13293 if (sizeof(enum NPY_TYPES) < sizeof(long)) {
13294 return PyInt_FromLong((long) value);
13295 } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
13296 return PyLong_FromUnsignedLong((unsigned long) value);
13297 #ifdef HAVE_LONG_LONG
13298 } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
13299 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
13300 #endif
13301 }
13302 } else {
13303 if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
13304 return PyInt_FromLong((long) value);
13305 #ifdef HAVE_LONG_LONG
13306 } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
13307 return PyLong_FromLongLong((PY_LONG_LONG) value);
13308 #endif
13309 }
13310 }
13311 {
13312 int one = 1; int little = (int)*(unsigned char *)&one;
13313 unsigned char *bytes = (unsigned char *)&value;
13314 return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
13315 little, !is_unsigned);
13316 }
13317 }
13318
13319 /* CIntFromPy */
__Pyx_PyInt_As_int(PyObject * x)13320 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
13321 const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
13322 const int is_unsigned = neg_one > const_zero;
13323 #if PY_MAJOR_VERSION < 3
13324 if (likely(PyInt_Check(x))) {
13325 if (sizeof(int) < sizeof(long)) {
13326 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
13327 } else {
13328 long val = PyInt_AS_LONG(x);
13329 if (is_unsigned && unlikely(val < 0)) {
13330 goto raise_neg_overflow;
13331 }
13332 return (int) val;
13333 }
13334 } else
13335 #endif
13336 if (likely(PyLong_Check(x))) {
13337 if (is_unsigned) {
13338 #if CYTHON_USE_PYLONG_INTERNALS
13339 const digit* digits = ((PyLongObject*)x)->ob_digit;
13340 switch (Py_SIZE(x)) {
13341 case 0: return (int) 0;
13342 case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
13343 case 2:
13344 if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
13345 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
13346 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13347 } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
13348 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13349 }
13350 }
13351 break;
13352 case 3:
13353 if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
13354 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
13355 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13356 } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
13357 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13358 }
13359 }
13360 break;
13361 case 4:
13362 if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
13363 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
13364 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13365 } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
13366 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
13367 }
13368 }
13369 break;
13370 }
13371 #endif
13372 #if CYTHON_COMPILING_IN_CPYTHON
13373 if (unlikely(Py_SIZE(x) < 0)) {
13374 goto raise_neg_overflow;
13375 }
13376 #else
13377 {
13378 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
13379 if (unlikely(result < 0))
13380 return (int) -1;
13381 if (unlikely(result == 1))
13382 goto raise_neg_overflow;
13383 }
13384 #endif
13385 if (sizeof(int) <= sizeof(unsigned long)) {
13386 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
13387 #ifdef HAVE_LONG_LONG
13388 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
13389 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
13390 #endif
13391 }
13392 } else {
13393 #if CYTHON_USE_PYLONG_INTERNALS
13394 const digit* digits = ((PyLongObject*)x)->ob_digit;
13395 switch (Py_SIZE(x)) {
13396 case 0: return (int) 0;
13397 case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
13398 case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
13399 case -2:
13400 if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
13401 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
13402 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13403 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
13404 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13405 }
13406 }
13407 break;
13408 case 2:
13409 if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
13410 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
13411 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13412 } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
13413 return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13414 }
13415 }
13416 break;
13417 case -3:
13418 if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
13419 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
13420 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13421 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
13422 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13423 }
13424 }
13425 break;
13426 case 3:
13427 if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
13428 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
13429 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13430 } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
13431 return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13432 }
13433 }
13434 break;
13435 case -4:
13436 if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
13437 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
13438 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13439 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
13440 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13441 }
13442 }
13443 break;
13444 case 4:
13445 if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
13446 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
13447 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13448 } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
13449 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
13450 }
13451 }
13452 break;
13453 }
13454 #endif
13455 if (sizeof(int) <= sizeof(long)) {
13456 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
13457 #ifdef HAVE_LONG_LONG
13458 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
13459 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
13460 #endif
13461 }
13462 }
13463 {
13464 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
13465 PyErr_SetString(PyExc_RuntimeError,
13466 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
13467 #else
13468 int val;
13469 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
13470 #if PY_MAJOR_VERSION < 3
13471 if (likely(v) && !PyLong_Check(v)) {
13472 PyObject *tmp = v;
13473 v = PyNumber_Long(tmp);
13474 Py_DECREF(tmp);
13475 }
13476 #endif
13477 if (likely(v)) {
13478 int one = 1; int is_little = (int)*(unsigned char *)&one;
13479 unsigned char *bytes = (unsigned char *)&val;
13480 int ret = _PyLong_AsByteArray((PyLongObject *)v,
13481 bytes, sizeof(val),
13482 is_little, !is_unsigned);
13483 Py_DECREF(v);
13484 if (likely(!ret))
13485 return val;
13486 }
13487 #endif
13488 return (int) -1;
13489 }
13490 } else {
13491 int val;
13492 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
13493 if (!tmp) return (int) -1;
13494 val = __Pyx_PyInt_As_int(tmp);
13495 Py_DECREF(tmp);
13496 return val;
13497 }
13498 raise_overflow:
13499 PyErr_SetString(PyExc_OverflowError,
13500 "value too large to convert to int");
13501 return (int) -1;
13502 raise_neg_overflow:
13503 PyErr_SetString(PyExc_OverflowError,
13504 "can't convert negative value to int");
13505 return (int) -1;
13506 }
13507
13508 /* CIntFromPy */
__Pyx_PyInt_As_long(PyObject * x)13509 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
13510 const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
13511 const int is_unsigned = neg_one > const_zero;
13512 #if PY_MAJOR_VERSION < 3
13513 if (likely(PyInt_Check(x))) {
13514 if (sizeof(long) < sizeof(long)) {
13515 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
13516 } else {
13517 long val = PyInt_AS_LONG(x);
13518 if (is_unsigned && unlikely(val < 0)) {
13519 goto raise_neg_overflow;
13520 }
13521 return (long) val;
13522 }
13523 } else
13524 #endif
13525 if (likely(PyLong_Check(x))) {
13526 if (is_unsigned) {
13527 #if CYTHON_USE_PYLONG_INTERNALS
13528 const digit* digits = ((PyLongObject*)x)->ob_digit;
13529 switch (Py_SIZE(x)) {
13530 case 0: return (long) 0;
13531 case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
13532 case 2:
13533 if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
13534 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
13535 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13536 } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
13537 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13538 }
13539 }
13540 break;
13541 case 3:
13542 if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
13543 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
13544 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13545 } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
13546 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13547 }
13548 }
13549 break;
13550 case 4:
13551 if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
13552 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
13553 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13554 } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
13555 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
13556 }
13557 }
13558 break;
13559 }
13560 #endif
13561 #if CYTHON_COMPILING_IN_CPYTHON
13562 if (unlikely(Py_SIZE(x) < 0)) {
13563 goto raise_neg_overflow;
13564 }
13565 #else
13566 {
13567 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
13568 if (unlikely(result < 0))
13569 return (long) -1;
13570 if (unlikely(result == 1))
13571 goto raise_neg_overflow;
13572 }
13573 #endif
13574 if (sizeof(long) <= sizeof(unsigned long)) {
13575 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
13576 #ifdef HAVE_LONG_LONG
13577 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
13578 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
13579 #endif
13580 }
13581 } else {
13582 #if CYTHON_USE_PYLONG_INTERNALS
13583 const digit* digits = ((PyLongObject*)x)->ob_digit;
13584 switch (Py_SIZE(x)) {
13585 case 0: return (long) 0;
13586 case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
13587 case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
13588 case -2:
13589 if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
13590 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
13591 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13592 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
13593 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13594 }
13595 }
13596 break;
13597 case 2:
13598 if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
13599 if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
13600 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13601 } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
13602 return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13603 }
13604 }
13605 break;
13606 case -3:
13607 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
13608 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
13609 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13610 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
13611 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13612 }
13613 }
13614 break;
13615 case 3:
13616 if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
13617 if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
13618 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13619 } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
13620 return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13621 }
13622 }
13623 break;
13624 case -4:
13625 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
13626 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
13627 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13628 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
13629 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13630 }
13631 }
13632 break;
13633 case 4:
13634 if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
13635 if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
13636 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
13637 } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
13638 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
13639 }
13640 }
13641 break;
13642 }
13643 #endif
13644 if (sizeof(long) <= sizeof(long)) {
13645 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
13646 #ifdef HAVE_LONG_LONG
13647 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
13648 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
13649 #endif
13650 }
13651 }
13652 {
13653 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
13654 PyErr_SetString(PyExc_RuntimeError,
13655 "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
13656 #else
13657 long val;
13658 PyObject *v = __Pyx_PyNumber_IntOrLong(x);
13659 #if PY_MAJOR_VERSION < 3
13660 if (likely(v) && !PyLong_Check(v)) {
13661 PyObject *tmp = v;
13662 v = PyNumber_Long(tmp);
13663 Py_DECREF(tmp);
13664 }
13665 #endif
13666 if (likely(v)) {
13667 int one = 1; int is_little = (int)*(unsigned char *)&one;
13668 unsigned char *bytes = (unsigned char *)&val;
13669 int ret = _PyLong_AsByteArray((PyLongObject *)v,
13670 bytes, sizeof(val),
13671 is_little, !is_unsigned);
13672 Py_DECREF(v);
13673 if (likely(!ret))
13674 return val;
13675 }
13676 #endif
13677 return (long) -1;
13678 }
13679 } else {
13680 long val;
13681 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
13682 if (!tmp) return (long) -1;
13683 val = __Pyx_PyInt_As_long(tmp);
13684 Py_DECREF(tmp);
13685 return val;
13686 }
13687 raise_overflow:
13688 PyErr_SetString(PyExc_OverflowError,
13689 "value too large to convert to long");
13690 return (long) -1;
13691 raise_neg_overflow:
13692 PyErr_SetString(PyExc_OverflowError,
13693 "can't convert negative value to long");
13694 return (long) -1;
13695 }
13696
13697 /* FastTypeChecks */
13698 #if CYTHON_COMPILING_IN_CPYTHON
__Pyx_InBases(PyTypeObject * a,PyTypeObject * b)13699 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
13700 while (a) {
13701 a = a->tp_base;
13702 if (a == b)
13703 return 1;
13704 }
13705 return b == &PyBaseObject_Type;
13706 }
__Pyx_IsSubtype(PyTypeObject * a,PyTypeObject * b)13707 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
13708 PyObject *mro;
13709 if (a == b) return 1;
13710 mro = a->tp_mro;
13711 if (likely(mro)) {
13712 Py_ssize_t i, n;
13713 n = PyTuple_GET_SIZE(mro);
13714 for (i = 0; i < n; i++) {
13715 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
13716 return 1;
13717 }
13718 return 0;
13719 }
13720 return __Pyx_InBases(a, b);
13721 }
13722 #if PY_MAJOR_VERSION == 2
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)13723 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
13724 PyObject *exception, *value, *tb;
13725 int res;
13726 __Pyx_PyThreadState_declare
13727 __Pyx_PyThreadState_assign
13728 __Pyx_ErrFetch(&exception, &value, &tb);
13729 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
13730 if (unlikely(res == -1)) {
13731 PyErr_WriteUnraisable(err);
13732 res = 0;
13733 }
13734 if (!res) {
13735 res = PyObject_IsSubclass(err, exc_type2);
13736 if (unlikely(res == -1)) {
13737 PyErr_WriteUnraisable(err);
13738 res = 0;
13739 }
13740 }
13741 __Pyx_ErrRestore(exception, value, tb);
13742 return res;
13743 }
13744 #else
__Pyx_inner_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)13745 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
13746 int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
13747 if (!res) {
13748 res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
13749 }
13750 return res;
13751 }
13752 #endif
__Pyx_PyErr_GivenExceptionMatchesTuple(PyObject * exc_type,PyObject * tuple)13753 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
13754 Py_ssize_t i, n;
13755 assert(PyExceptionClass_Check(exc_type));
13756 n = PyTuple_GET_SIZE(tuple);
13757 #if PY_MAJOR_VERSION >= 3
13758 for (i=0; i<n; i++) {
13759 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
13760 }
13761 #endif
13762 for (i=0; i<n; i++) {
13763 PyObject *t = PyTuple_GET_ITEM(tuple, i);
13764 #if PY_MAJOR_VERSION < 3
13765 if (likely(exc_type == t)) return 1;
13766 #endif
13767 if (likely(PyExceptionClass_Check(t))) {
13768 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
13769 } else {
13770 }
13771 }
13772 return 0;
13773 }
__Pyx_PyErr_GivenExceptionMatches(PyObject * err,PyObject * exc_type)13774 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
13775 if (likely(err == exc_type)) return 1;
13776 if (likely(PyExceptionClass_Check(err))) {
13777 if (likely(PyExceptionClass_Check(exc_type))) {
13778 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
13779 } else if (likely(PyTuple_Check(exc_type))) {
13780 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
13781 } else {
13782 }
13783 }
13784 return PyErr_GivenExceptionMatches(err, exc_type);
13785 }
__Pyx_PyErr_GivenExceptionMatches2(PyObject * err,PyObject * exc_type1,PyObject * exc_type2)13786 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
13787 assert(PyExceptionClass_Check(exc_type1));
13788 assert(PyExceptionClass_Check(exc_type2));
13789 if (likely(err == exc_type1 || err == exc_type2)) return 1;
13790 if (likely(PyExceptionClass_Check(err))) {
13791 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
13792 }
13793 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
13794 }
13795 #endif
13796
13797 /* CheckBinaryVersion */
__Pyx_check_binary_version(void)13798 static int __Pyx_check_binary_version(void) {
13799 char ctversion[4], rtversion[4];
13800 PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
13801 PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
13802 if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
13803 char message[200];
13804 PyOS_snprintf(message, sizeof(message),
13805 "compiletime version %s of module '%.100s' "
13806 "does not match runtime version %s",
13807 ctversion, __Pyx_MODULE_NAME, rtversion);
13808 return PyErr_WarnEx(NULL, message, 1);
13809 }
13810 return 0;
13811 }
13812
13813 /* InitStrings */
__Pyx_InitStrings(__Pyx_StringTabEntry * t)13814 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
13815 while (t->p) {
13816 #if PY_MAJOR_VERSION < 3
13817 if (t->is_unicode) {
13818 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
13819 } else if (t->intern) {
13820 *t->p = PyString_InternFromString(t->s);
13821 } else {
13822 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
13823 }
13824 #else
13825 if (t->is_unicode | t->is_str) {
13826 if (t->intern) {
13827 *t->p = PyUnicode_InternFromString(t->s);
13828 } else if (t->encoding) {
13829 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
13830 } else {
13831 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
13832 }
13833 } else {
13834 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
13835 }
13836 #endif
13837 if (!*t->p)
13838 return -1;
13839 if (PyObject_Hash(*t->p) == -1)
13840 return -1;
13841 ++t;
13842 }
13843 return 0;
13844 }
13845
__Pyx_PyUnicode_FromString(const char * c_str)13846 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
13847 return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
13848 }
__Pyx_PyObject_AsString(PyObject * o)13849 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
13850 Py_ssize_t ignore;
13851 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
13852 }
13853 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
13854 #if !CYTHON_PEP393_ENABLED
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)13855 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
13856 char* defenc_c;
13857 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
13858 if (!defenc) return NULL;
13859 defenc_c = PyBytes_AS_STRING(defenc);
13860 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
13861 {
13862 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
13863 char* c;
13864 for (c = defenc_c; c < end; c++) {
13865 if ((unsigned char) (*c) >= 128) {
13866 PyUnicode_AsASCIIString(o);
13867 return NULL;
13868 }
13869 }
13870 }
13871 #endif
13872 *length = PyBytes_GET_SIZE(defenc);
13873 return defenc_c;
13874 }
13875 #else
__Pyx_PyUnicode_AsStringAndSize(PyObject * o,Py_ssize_t * length)13876 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
13877 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
13878 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
13879 if (likely(PyUnicode_IS_ASCII(o))) {
13880 *length = PyUnicode_GET_LENGTH(o);
13881 return PyUnicode_AsUTF8(o);
13882 } else {
13883 PyUnicode_AsASCIIString(o);
13884 return NULL;
13885 }
13886 #else
13887 return PyUnicode_AsUTF8AndSize(o, length);
13888 #endif
13889 }
13890 #endif
13891 #endif
__Pyx_PyObject_AsStringAndSize(PyObject * o,Py_ssize_t * length)13892 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
13893 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
13894 if (
13895 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
13896 __Pyx_sys_getdefaultencoding_not_ascii &&
13897 #endif
13898 PyUnicode_Check(o)) {
13899 return __Pyx_PyUnicode_AsStringAndSize(o, length);
13900 } else
13901 #endif
13902 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
13903 if (PyByteArray_Check(o)) {
13904 *length = PyByteArray_GET_SIZE(o);
13905 return PyByteArray_AS_STRING(o);
13906 } else
13907 #endif
13908 {
13909 char* result;
13910 int r = PyBytes_AsStringAndSize(o, &result, length);
13911 if (unlikely(r < 0)) {
13912 return NULL;
13913 } else {
13914 return result;
13915 }
13916 }
13917 }
__Pyx_PyObject_IsTrue(PyObject * x)13918 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
13919 int is_true = x == Py_True;
13920 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
13921 else return PyObject_IsTrue(x);
13922 }
__Pyx_PyObject_IsTrueAndDecref(PyObject * x)13923 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
13924 int retval;
13925 if (unlikely(!x)) return -1;
13926 retval = __Pyx_PyObject_IsTrue(x);
13927 Py_DECREF(x);
13928 return retval;
13929 }
__Pyx_PyNumber_IntOrLongWrongResultType(PyObject * result,const char * type_name)13930 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
13931 #if PY_MAJOR_VERSION >= 3
13932 if (PyLong_Check(result)) {
13933 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
13934 "__int__ returned non-int (type %.200s). "
13935 "The ability to return an instance of a strict subclass of int "
13936 "is deprecated, and may be removed in a future version of Python.",
13937 Py_TYPE(result)->tp_name)) {
13938 Py_DECREF(result);
13939 return NULL;
13940 }
13941 return result;
13942 }
13943 #endif
13944 PyErr_Format(PyExc_TypeError,
13945 "__%.4s__ returned non-%.4s (type %.200s)",
13946 type_name, type_name, Py_TYPE(result)->tp_name);
13947 Py_DECREF(result);
13948 return NULL;
13949 }
__Pyx_PyNumber_IntOrLong(PyObject * x)13950 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
13951 #if CYTHON_USE_TYPE_SLOTS
13952 PyNumberMethods *m;
13953 #endif
13954 const char *name = NULL;
13955 PyObject *res = NULL;
13956 #if PY_MAJOR_VERSION < 3
13957 if (likely(PyInt_Check(x) || PyLong_Check(x)))
13958 #else
13959 if (likely(PyLong_Check(x)))
13960 #endif
13961 return __Pyx_NewRef(x);
13962 #if CYTHON_USE_TYPE_SLOTS
13963 m = Py_TYPE(x)->tp_as_number;
13964 #if PY_MAJOR_VERSION < 3
13965 if (m && m->nb_int) {
13966 name = "int";
13967 res = m->nb_int(x);
13968 }
13969 else if (m && m->nb_long) {
13970 name = "long";
13971 res = m->nb_long(x);
13972 }
13973 #else
13974 if (likely(m && m->nb_int)) {
13975 name = "int";
13976 res = m->nb_int(x);
13977 }
13978 #endif
13979 #else
13980 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
13981 res = PyNumber_Int(x);
13982 }
13983 #endif
13984 if (likely(res)) {
13985 #if PY_MAJOR_VERSION < 3
13986 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
13987 #else
13988 if (unlikely(!PyLong_CheckExact(res))) {
13989 #endif
13990 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
13991 }
13992 }
13993 else if (!PyErr_Occurred()) {
13994 PyErr_SetString(PyExc_TypeError,
13995 "an integer is required");
13996 }
13997 return res;
13998 }
13999 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
14000 Py_ssize_t ival;
14001 PyObject *x;
14002 #if PY_MAJOR_VERSION < 3
14003 if (likely(PyInt_CheckExact(b))) {
14004 if (sizeof(Py_ssize_t) >= sizeof(long))
14005 return PyInt_AS_LONG(b);
14006 else
14007 return PyInt_AsSsize_t(b);
14008 }
14009 #endif
14010 if (likely(PyLong_CheckExact(b))) {
14011 #if CYTHON_USE_PYLONG_INTERNALS
14012 const digit* digits = ((PyLongObject*)b)->ob_digit;
14013 const Py_ssize_t size = Py_SIZE(b);
14014 if (likely(__Pyx_sst_abs(size) <= 1)) {
14015 ival = likely(size) ? digits[0] : 0;
14016 if (size == -1) ival = -ival;
14017 return ival;
14018 } else {
14019 switch (size) {
14020 case 2:
14021 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
14022 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14023 }
14024 break;
14025 case -2:
14026 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
14027 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14028 }
14029 break;
14030 case 3:
14031 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
14032 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14033 }
14034 break;
14035 case -3:
14036 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
14037 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14038 }
14039 break;
14040 case 4:
14041 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
14042 return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14043 }
14044 break;
14045 case -4:
14046 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
14047 return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
14048 }
14049 break;
14050 }
14051 }
14052 #endif
14053 return PyLong_AsSsize_t(b);
14054 }
14055 x = PyNumber_Index(b);
14056 if (!x) return -1;
14057 ival = PyInt_AsSsize_t(x);
14058 Py_DECREF(x);
14059 return ival;
14060 }
14061 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
14062 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
14063 }
14064 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
14065 return PyInt_FromSize_t(ival);
14066 }
14067
14068
14069 #endif /* Py_PYTHON_H */
14070