16 #define SWIG_DIRECTORS
17 #define SWIG_PYTHON_THREADS
18 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
23 template<
typename T>
class SwigValueWrapper {
24 struct SwigMovePointer {
26 SwigMovePointer(T *p) : ptr(p) { }
27 ~SwigMovePointer() {
delete ptr; }
28 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0;
delete oldptr; ptr = rhs.ptr; rhs.ptr = 0;
return *
this; }
30 SwigValueWrapper& operator=(
const SwigValueWrapper<T>& rhs);
31 SwigValueWrapper(
const SwigValueWrapper<T>& rhs);
33 SwigValueWrapper() : pointer(0) { }
34 SwigValueWrapper& operator=(
const T& t) { SwigMovePointer tmp(
new T(t)); pointer = tmp;
return *
this; }
35 operator T&()
const {
return *pointer.ptr; }
36 T *operator&() {
return pointer.ptr; }
39 template <
typename T> T SwigValueInit() {
50 #ifndef SWIGTEMPLATEDISAMBIGUATOR
51 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
52 # define SWIGTEMPLATEDISAMBIGUATOR template
53 # elif defined(__HP_aCC)
56 # define SWIGTEMPLATEDISAMBIGUATOR template
58 # define SWIGTEMPLATEDISAMBIGUATOR
64 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
65 # define SWIGINLINE inline
73 # if defined(__GNUC__)
74 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
75 # define SWIGUNUSED __attribute__ ((__unused__))
80 # define SWIGUNUSED __attribute__ ((__unused__))
86 #ifndef SWIG_MSC_UNSUPPRESS_4505
87 # if defined(_MSC_VER)
88 # pragma warning(disable : 4505)
92 #ifndef SWIGUNUSEDPARM
94 # define SWIGUNUSEDPARM(p)
96 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
102 # define SWIGINTERN static SWIGUNUSED
106 #ifndef SWIGINTERNINLINE
107 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
111 #if defined(__GNUC__)
112 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
113 # ifndef GCC_HASCLASSVISIBILITY
114 # define GCC_HASCLASSVISIBILITY
120 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
121 # if defined(STATIC_LINKED)
124 # define SWIGEXPORT __declspec(dllexport)
127 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
128 # define SWIGEXPORT __attribute__ ((visibility("default")))
137 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
138 # define SWIGSTDCALL __stdcall
145 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
146 # define _CRT_SECURE_NO_DEPRECATE
150 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
151 # define _SCL_SECURE_NO_DEPRECATE
155 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
156 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
164 #ifdef __INTEL_COMPILER
165 # pragma warning disable 592
169 #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
174 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
192 #define SWIG_RUNTIME_VERSION "4"
195 #ifdef SWIG_TYPE_TABLE
196 # define SWIG_QUOTE_STRING(x) #x
197 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
198 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
200 # define SWIG_TYPE_TABLE_NAME
213 # define SWIGRUNTIME SWIGINTERN
216 #ifndef SWIGRUNTIMEINLINE
217 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
221 #ifndef SWIG_BUFFER_SIZE
222 # define SWIG_BUFFER_SIZE 1024
226 #define SWIG_POINTER_DISOWN 0x1
227 #define SWIG_CAST_NEW_MEMORY 0x2
228 #define SWIG_POINTER_NO_NULL 0x4
231 #define SWIG_POINTER_OWN 0x1
314 #define SWIG_ERROR (-1)
315 #define SWIG_IsOK(r) (r >= 0)
316 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
319 #define SWIG_CASTRANKLIMIT (1 << 8)
321 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
323 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
325 #define SWIG_BADOBJ (SWIG_ERROR)
326 #define SWIG_OLDOBJ (SWIG_OK)
327 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
328 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
330 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
331 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
332 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
333 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
334 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
335 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
338 #if defined(SWIG_CASTRANK_MODE)
339 # ifndef SWIG_TypeRank
340 # define SWIG_TypeRank unsigned long
342 # ifndef SWIG_MAXCASTRANK
343 # define SWIG_MAXCASTRANK (2)
345 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
346 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
351 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
354 # define SWIG_AddCast(r) (r)
355 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
365 typedef void *(*swig_converter_func)(
void *,
int *);
407 const char *f2,
const char *l2) {
408 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
409 while ((*f1 ==
' ') && (f1 != l1)) ++f1;
410 while ((*f2 ==
' ') && (f2 != l2)) ++f2;
411 if (*f1 != *f2)
return (*f1 > *f2) ? 1 : -1;
413 return (
int)((l1 - f1) - (l2 - f2));
423 const char* te = tb + strlen(tb);
425 while (equiv != 0 && *ne) {
426 for (nb = ne; *ne; ++ne) {
427 if (*ne ==
'|')
break;
452 if (strcmp(iter->
type->
name, c) == 0) {
453 if (iter == ty->
cast)
480 if (iter == ty->
cast)
512 if (!ty || !ty->
dcast)
return ty;
513 while (ty && (ty->
dcast)) {
514 ty = (*ty->
dcast)(ptr);
538 if (!type)
return NULL;
539 if (type->
str != NULL) {
540 const char *last_name = type->
str;
542 for (s = type->
str; *s; s++)
543 if (*s ==
'|') last_name = s+1;
591 size_t r = iter->
size - 1;
594 size_t i = (l + r) >> 1;
595 const char *iname = iter->
types[i]->
name;
597 int compare = strcmp(
name, iname);
599 return iter->
types[i];
600 }
else if (compare < 0) {
606 }
else if (compare > 0) {
615 }
while (iter != end);
642 for (; i < iter->
size; ++i) {
644 return iter->
types[i];
647 }
while (iter != end);
659 static const char hex[17] =
"0123456789abcdef";
660 const unsigned char *u = (
unsigned char *) ptr;
661 const unsigned char *eu = u + sz;
662 for (; u != eu; ++u) {
663 unsigned char uu = *u;
664 *(c++) = hex[(uu & 0xf0) >> 4];
665 *(c++) = hex[uu & 0xf];
675 unsigned char *u = (
unsigned char *) ptr;
676 const unsigned char *eu = u + sz;
677 for (; u != eu; ++u) {
680 if ((d >=
'0') && (d <=
'9'))
681 uu = (
unsigned char)((d -
'0') << 4);
682 else if ((d >=
'a') && (d <=
'f'))
683 uu = (
unsigned char)((d - (
'a'-10)) << 4);
687 if ((d >=
'0') && (d <=
'9'))
688 uu |= (
unsigned char)(d -
'0');
689 else if ((d >=
'a') && (d <=
'f'))
690 uu |= (
unsigned char)(d - (
'a'-10));
704 if ((2*
sizeof(
void *) + 2) > bsz)
return 0;
707 if (strlen(
name) + 1 > (bsz - (r - buff)))
return 0;
715 if (strcmp(c,
"NULL") == 0) {
728 size_t lname = (
name ? strlen(
name) : 0);
729 if ((2*sz + 2 + lname) > bsz)
return 0;
733 strncpy(r,
name,lname+1);
743 if (strcmp(c,
"NULL") == 0) {
758 #define SWIG_UnknownError -1
759 #define SWIG_IOError -2
760 #define SWIG_RuntimeError -3
761 #define SWIG_IndexError -4
762 #define SWIG_TypeError -5
763 #define SWIG_DivisionByZero -6
764 #define SWIG_OverflowError -7
765 #define SWIG_SyntaxError -8
766 #define SWIG_ValueError -9
767 #define SWIG_SystemError -10
768 #define SWIG_AttributeError -11
769 #define SWIG_MemoryError -12
770 #define SWIG_NullReferenceError -13
775 #if PY_VERSION_HEX >= 0x03000000
777 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
778 #define PyInt_Check(x) PyLong_Check(x)
779 #define PyInt_AsLong(x) PyLong_AsLong(x)
780 #define PyInt_FromLong(x) PyLong_FromLong(x)
781 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
782 #define PyString_Check(name) PyBytes_Check(name)
783 #define PyString_FromString(x) PyUnicode_FromString(x)
784 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
785 #define PyString_AsString(str) PyBytes_AsString(str)
786 #define PyString_Size(str) PyBytes_Size(str)
787 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
788 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
789 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
790 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
795 # define Py_TYPE(op) ((op)->ob_type)
800 #if PY_VERSION_HEX >= 0x03000000
801 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
803 # define SWIG_Python_str_FromFormat PyString_FromFormat
813 #if PY_VERSION_HEX >= 0x03030000
814 return (
char *)PyUnicode_AsUTF8(str);
815 #elif PY_VERSION_HEX >= 0x03000000
817 str = PyUnicode_AsUTF8String(str);
821 if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
822 newstr = (
char *)
malloc(len+1);
824 memcpy(newstr, cstr, len+1);
830 return PyString_AsString(str);
834 #if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
835 # define SWIG_Python_str_DelForPy3(x)
837 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
844 #if PY_VERSION_HEX >= 0x03000000
845 return PyUnicode_FromString(c);
847 return PyString_FromString(c);
852 # define PyObject_DEL PyObject_Del
857 # define SWIGPY_USE_CAPSULE
858 # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
860 #if PY_VERSION_HEX < 0x03020000
861 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
862 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
863 #define Py_hash_t long
875 type = PyExc_MemoryError;
878 type = PyExc_IOError;
881 type = PyExc_RuntimeError;
884 type = PyExc_IndexError;
887 type = PyExc_TypeError;
890 type = PyExc_ZeroDivisionError;
893 type = PyExc_OverflowError;
896 type = PyExc_SyntaxError;
899 type = PyExc_ValueError;
902 type = PyExc_SystemError;
905 type = PyExc_AttributeError;
908 type = PyExc_RuntimeError;
919 PyObject *traceback = 0;
921 if (PyErr_Occurred())
922 PyErr_Fetch(&type, &
value, &traceback);
924 PyObject *old_str = PyObject_Str(
value);
929 PyErr_Format(type,
"%s %s", tmp, mesg);
931 PyErr_Format(type,
"%s", mesg);
936 PyErr_SetString(PyExc_RuntimeError, mesg);
946 error = PyErr_Occurred();
947 return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
956 PyObject *type = NULL, *
value = NULL, *traceback = NULL;
957 PyErr_Fetch(&type, &
value, &traceback);
958 #if PY_VERSION_HEX >= 0x03000000
959 newvalue = PyUnicode_FromFormat(
"%S\nAdditional information:\n%s",
value,
message);
961 newvalue = PyString_FromFormat(
"%s\nAdditional information:\n%s", PyString_AsString(
value),
message);
964 PyErr_Restore(type, newvalue, traceback);
967 PyErr_SetString(PyExc_TypeError,
message);
971 #if defined(SWIG_PYTHON_NO_THREADS)
972 # if defined(SWIG_PYTHON_THREADS)
973 # undef SWIG_PYTHON_THREADS
976 #if defined(SWIG_PYTHON_THREADS)
977 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
978 # define SWIG_PYTHON_USE_GIL
980 # if defined(SWIG_PYTHON_USE_GIL)
981 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
982 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
985 class SWIG_Python_Thread_Block {
987 PyGILState_STATE state;
989 void end() {
if (status) { PyGILState_Release(state); status =
false;} }
990 SWIG_Python_Thread_Block() : status(
true), state(PyGILState_Ensure()) {}
991 ~SWIG_Python_Thread_Block() { end(); }
993 class SWIG_Python_Thread_Allow {
997 void end() {
if (status) { PyEval_RestoreThread(save); status =
false; }}
998 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
999 ~SWIG_Python_Thread_Allow() { end(); }
1001 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1002 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1003 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1004 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1006 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1007 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1008 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1009 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1012 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1013 # define SWIG_PYTHON_INITIALIZE_THREADS
1015 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1016 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1018 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1019 # define SWIG_PYTHON_THREAD_END_BLOCK
1021 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1022 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1024 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1025 # define SWIG_PYTHON_THREAD_END_ALLOW
1029 # define SWIG_PYTHON_INITIALIZE_THREADS
1030 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1031 # define SWIG_PYTHON_THREAD_END_BLOCK
1032 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1033 # define SWIG_PYTHON_THREAD_END_ALLOW
1049 #define SWIG_PY_POINTER 4
1050 #define SWIG_PY_BINARY 5
1076 #if PY_VERSION_HEX < 0x02070000
1077 # error "This version of SWIG only supports Python >= 2.7"
1080 #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1081 # error "This version of SWIG only supports Python 3 >= 3.2"
1087 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1088 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1089 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1091 #ifdef SWIGPYTHON_BUILTIN
1092 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1094 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1097 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1099 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1100 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1101 #define swig_owntype int
1104 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1105 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1108 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1109 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1112 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1113 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1116 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1117 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1122 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1123 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1124 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1126 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1127 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1128 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1129 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1130 #define SWIG_fail goto fail
1140 PyErr_SetObject(errtype, obj);
1148 PyErr_SetString(errtype, msg);
1152 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1156 #if defined(SWIGPYTHON_BUILTIN)
1159 SwigPyBuiltin_AddPublicSymbol(PyObject *seq,
const char *key) {
1160 PyObject *s = PyString_InternFromString(key);
1161 PyList_Append(seq, s);
1167 PyDict_SetItemString(d,
name, obj);
1169 if (public_interface)
1170 SwigPyBuiltin_AddPublicSymbol(public_interface,
name);
1177 PyDict_SetItemString(d,
name, obj);
1189 }
else if (result == Py_None) {
1193 if (!PyList_Check(result)) {
1194 PyObject *o2 = result;
1195 result = PyList_New(1);
1196 PyList_SetItem(result, 0, o2);
1198 PyList_Append(result,obj);
1213 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got none",
1218 if (!PyTuple_Check(args)) {
1219 if (min <= 1 && max >= 1) {
1222 for (i = 1; i <
max; ++i) {
1227 PyErr_SetString(PyExc_SystemError,
"UnpackTuple() argument list is not a tuple");
1230 Py_ssize_t l = PyTuple_GET_SIZE(args);
1232 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1235 }
else if (l >
max) {
1236 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1241 for (i = 0; i < l; ++i) {
1242 objs[i] = PyTuple_GET_ITEM(args, i);
1244 for (; l <
max; ++l) {
1256 assert(PyDict_Check(kwargs));
1257 if (PyDict_Size(kwargs) > 0) {
1258 PyErr_Format(PyExc_TypeError,
"%s() does not take keyword arguments",
name);
1266 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1273 #define SWIG_STATIC_POINTER(var) var
1275 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1283 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1284 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1286 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1288 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1289 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1300 PyObject *none = Py_None;
1314 PyTypeObject *pytype;
1323 PyErr_SetString(PyExc_TypeError,
"Implicit conversion is prohibited for explicit constructors.");
1330 PyObject *klass = data ? data->
klass : 0;
1331 return (klass ? klass : PyExc_RuntimeError);
1344 Py_INCREF(data->
klass);
1346 if (PyClass_Check(obj)) {
1351 data->
newraw = PyObject_GetAttrString(data->
klass,
"__new__");
1354 data->
newargs = PyTuple_New(1);
1355 PyTuple_SetItem(data->
newargs, 0, obj);
1362 data->
destroy = PyObject_GetAttrString(data->
klass,
"__swig_destroy__");
1363 if (PyErr_Occurred()) {
1370 flags = PyCFunction_GET_FLAGS(data->
destroy);
1371 data->
delargs = !(flags & (METH_O));
1383 Py_XDECREF(data->
newraw);
1396 #ifdef SWIGPYTHON_BUILTIN
1402 #ifdef SWIGPYTHON_BUILTIN
1405 SwigPyObject_get___dict__(PyObject *v, PyObject *
SWIGUNUSEDPARM(args))
1410 sobj->dict = PyDict_New();
1412 Py_INCREF(sobj->dict);
1421 return PyLong_FromVoidPtr(v->
ptr);
1427 PyObject *res = NULL;
1428 PyObject *args = PyTuple_New(1);
1433 #if PY_VERSION_HEX >= 0x03000000
1434 res = PyUnicode_Format(ofmt,args);
1436 res = PyString_Format(ofmt,args);
1465 # if PY_VERSION_HEX >= 0x03000000
1466 PyObject *joined = PyUnicode_Concat(repr, nrep);
1471 PyString_ConcatAndDel(&repr,nrep);
1490 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1498 if( op != Py_EQ && op != Py_NE ) {
1499 Py_INCREF(Py_NotImplemented);
1500 return Py_NotImplemented;
1509 #ifdef SWIGPYTHON_BUILTIN
1514 assert(SwigPyObject_stype);
1530 #ifdef SWIGPYTHON_BUILTIN
1532 if (PyType_IsSubtype(op->ob_type, target_tp))
1534 return (strcmp(op->ob_type->tp_name,
"SwigPyObject") == 0);
1537 || (strcmp(
Py_TYPE(op)->tp_name,
"SwigPyObject") == 0);
1552 PyObject *destroy = data ? data->
destroy : 0;
1564 PyObject *type = NULL, *
value = NULL, *traceback = NULL;
1565 PyErr_Fetch(&type, &
value, &traceback);
1573 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1574 PyObject *mself = PyCFunction_GET_SELF(destroy);
1575 res = ((*meth)(mself, v));
1578 PyErr_WriteUnraisable(destroy);
1580 PyErr_Restore(type,
value, traceback);
1584 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1587 printf(
"swig/python detected a memory leak of type '%s', no destructor found.\n", (
name ?
name :
"unknown"));
1600 PyErr_SetString(PyExc_TypeError,
"Attempt to append a non SwigPyObject");
1613 Py_INCREF(sobj->
next);
1640 if (!PyArg_UnpackTuple(args,
"own", 0, 1, &val)) {
1644 PyObject *obj = PyBool_FromLong(sobj->
own);
1646 if (PyObject_IsTrue(val)) {
1660 {
"own",
SwigPyObject_own, METH_VARARGS,
"returns/sets ownership of the pointer"},
1669 static char swigobject_doc[] =
"Swig object carries a C/C++ instance pointer";
1671 static PyNumberMethods SwigPyObject_as_number = {
1676 #
if PY_VERSION_HEX < 0x03000000
1692 #
if PY_VERSION_HEX < 0x03000000
1696 #if PY_VERSION_HEX < 0x03000000
1702 #if PY_VERSION_HEX < 0x03000000
1706 #if PY_VERSION_HEX >= 0x03050000
1707 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1708 #elif PY_VERSION_HEX >= 0x03000000
1709 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1711 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1715 static PyTypeObject swigpyobject_type;
1716 static int type_init = 0;
1718 const PyTypeObject tmp = {
1719 #if PY_VERSION_HEX >= 0x03000000
1720 PyVarObject_HEAD_INIT(NULL, 0)
1722 PyObject_HEAD_INIT(NULL)
1732 #if PY_VERSION_HEX >= 0x03000000
1738 &SwigPyObject_as_number,
1744 PyObject_GenericGetAttr,
1775 #
if PY_VERSION_HEX >= 0x03040000
1778 #
if PY_VERSION_HEX >= 0x03080000
1781 #
if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1792 swigpyobject_type = tmp;
1794 if (PyType_Ready(&swigpyobject_type) < 0)
1797 return &swigpyobject_type;
1810 return (PyObject *)sobj;
1851 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1852 return s ? s : strncmp((
const char *)v->
pack, (
const char *)w->
pack, 2*v->
size);
1866 || (strcmp((op)->ob_type->tp_name,
"SwigPyPacked") == 0);
1881 static char swigpacked_doc[] =
"Swig object carries a C/C++ instance pointer";
1882 static PyTypeObject swigpypacked_type;
1883 static int type_init = 0;
1885 const PyTypeObject tmp = {
1886 #if PY_VERSION_HEX>=0x03000000
1887 PyVarObject_HEAD_INIT(NULL, 0)
1889 PyObject_HEAD_INIT(NULL)
1899 #if PY_VERSION_HEX>=0x03000000
1911 PyObject_GenericGetAttr,
1942 #
if PY_VERSION_HEX >= 0x03040000
1945 #
if PY_VERSION_HEX >= 0x03080000
1948 #
if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1959 swigpypacked_type = tmp;
1961 if (PyType_Ready(&swigpypacked_type) < 0)
1964 return &swigpypacked_type;
1972 void *pack =
malloc(size);
1974 memcpy(pack, ptr, size);
1983 return (PyObject *) sobj;
1991 if (sobj->
size != size)
return 0;
1992 memcpy(ptr, sobj->
pack, size);
2016 #if PY_VERSION_HEX>=0x03000000
2017 #define SWIG_PYTHON_SLOW_GETSET_THIS
2028 #ifdef SWIGPYTHON_BUILTIN
2030 # ifdef PyWeakref_CheckProxy
2031 if (PyWeakref_CheckProxy(pyobj)) {
2032 pyobj = PyWeakref_GET_OBJECT(pyobj);
2042 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2043 if (PyInstance_Check(pyobj)) {
2044 obj = _PyInstance_Lookup(pyobj,
SWIG_This());
2046 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2047 if (dictptr != NULL) {
2048 PyObject *dict = *dictptr;
2049 obj = dict ? PyDict_GetItem(dict,
SWIG_This()) : 0;
2051 #ifdef PyWeakref_CheckProxy
2052 if (PyWeakref_CheckProxy(pyobj)) {
2053 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2057 obj = PyObject_GetAttr(pyobj,
SWIG_This());
2061 if (PyErr_Occurred()) PyErr_Clear();
2067 obj = PyObject_GetAttr(pyobj,
SWIG_This());
2071 if (PyErr_Occurred()) PyErr_Clear();
2091 int oldown = sobj->
own;
2109 if (obj == Py_None && !implicit_conv) {
2121 void *vptr = sobj->
ptr;
2126 if (ptr) *ptr = vptr;
2146 if (ptr) *ptr = vptr;
2152 *own = *own | sobj->
own;
2158 if (implicit_conv) {
2161 PyObject *klass = data->
klass;
2167 if (PyErr_Occurred()) {
2192 if (!
SWIG_IsOK(res) && obj == Py_None) {
2195 if (PyErr_Occurred())
2208 if (!PyCFunction_Check(obj)) {
2215 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2216 const char *desc = doc ? strstr(doc,
"swig_ptr: ") : 0;
2262 PyObject *newraw = data->
newraw;
2264 inst = PyObject_Call(newraw, data->
newargs, NULL);
2266 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2267 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2268 if (dictptr != NULL) {
2269 PyObject *dict = *dictptr;
2271 dict = PyDict_New();
2273 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2277 if (PyObject_SetAttr(inst,
SWIG_This(), swig_this) == -1) {
2284 #if PY_VERSION_HEX >= 0x03000000
2285 PyObject *empty_args = PyTuple_New(0);
2287 PyObject *empty_kwargs = PyDict_New();
2289 inst = ((PyTypeObject *)data->
newargs)->tp_new((PyTypeObject *)data->
newargs, empty_args, empty_kwargs);
2290 Py_DECREF(empty_kwargs);
2292 if (PyObject_SetAttr(inst,
SWIG_This(), swig_this) == -1) {
2296 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2300 Py_DECREF(empty_args);
2303 PyObject *dict = PyDict_New();
2305 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2306 inst = PyInstance_NewRaw(data->
newargs, dict);
2317 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2318 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2319 if (dictptr != NULL) {
2320 PyObject *dict = *dictptr;
2322 dict = PyDict_New();
2325 return PyDict_SetItem(dict,
SWIG_This(), swig_this);
2328 return PyObject_SetAttr(inst,
SWIG_This(), swig_this);
2362 if (clientdata && clientdata->
pytype) {
2367 PyObject *next_self = clientdata->
pytype->tp_alloc(clientdata->
pytype, 0);
2368 while (newobj->
next)
2370 newobj->
next = next_self;
2372 #ifdef SWIGPYTHON_BUILTIN
2378 #ifdef SWIGPYTHON_BUILTIN
2387 return (PyObject*) newobj;
2414 #ifdef SWIG_LINK_RUNTIME
2415 void *SWIG_ReturnGlobalTypeList(
void *);
2420 static void *type_pointer = (
void *)0;
2422 if (!type_pointer) {
2423 #ifdef SWIG_LINK_RUNTIME
2424 type_pointer = SWIG_ReturnGlobalTypeList((
void *)0);
2427 if (PyErr_Occurred()) {
2429 type_pointer = (
void *)0;
2455 #if PY_VERSION_HEX >= 0x03000000
2459 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };
2460 PyObject *module = Py_InitModule(
"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2463 if (pointer && module) {
2466 Py_XDECREF(pointer);
2482 PyObject *obj = PyDict_GetItem(cache, key);
2490 obj = PyCapsule_New((
void*) descriptor, NULL, NULL);
2491 PyDict_SetItem(cache, key, obj);
2502 #define SWIG_POINTER_EXCEPTION 0
2503 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2504 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2509 if (PyErr_Occurred()) {
2511 PyObject *
value = 0;
2512 PyObject *traceback = 0;
2513 PyErr_Fetch(&type, &
value, &traceback);
2515 PyObject *old_str = PyObject_Str(
value);
2517 const char *errmesg = tmp ? tmp :
"Invalid error message";
2521 PyErr_Format(type,
"%s %s", mesg, errmesg);
2523 PyErr_Format(type,
"%s %s", errmesg, mesg);
2537 if (PyErr_Occurred()) {
2540 PyOS_snprintf(mesg,
sizeof(mesg),
"argument number %d:", argnum);
2552 return ty ? ty->
str :
"";
2559 #if defined(SWIG_COBJECT_TYPES)
2563 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, 'SwigPyObject(%s)' is received",
2570 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2572 PyObject *str = PyObject_Str(obj);
2575 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s(%s)' is received",
2579 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s' is received",
2586 PyErr_Format(PyExc_TypeError,
"a '%s' is expected", type);
2588 PyErr_Format(PyExc_TypeError,
"unexpected type is received");
2599 #if SWIG_POINTER_EXCEPTION
2609 #ifdef SWIGPYTHON_BUILTIN
2611 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *
name, PyObject *
value) {
2612 PyTypeObject *tp = obj->ob_type;
2614 PyObject *encoded_name;
2618 # ifdef Py_USING_UNICODE
2619 if (PyString_Check(
name)) {
2620 name = PyUnicode_Decode(PyString_AsString(
name), PyString_Size(
name), NULL, NULL);
2623 }
else if (!PyUnicode_Check(
name))
2625 if (!PyString_Check(
name))
2628 PyErr_Format(PyExc_TypeError,
"attribute name must be string, not '%.200s'",
name->ob_type->tp_name);
2635 if (PyType_Ready(tp) < 0)
2639 descr = _PyType_Lookup(tp,
name);
2642 f = descr->ob_type->tp_descr_set;
2644 if (PyString_Check(
name)) {
2645 encoded_name =
name;
2648 encoded_name = PyUnicode_AsUTF8String(
name);
2652 PyErr_Format(PyExc_AttributeError,
"'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2653 Py_DECREF(encoded_name);
2655 res = f(descr, obj,
value);
2671 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2673 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2692 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2705 #ifdef SWIG_DIRECTOR_STATIC
2716 #ifndef SWIG_DIRECTOR_PYTHON_HEADER_
2717 #define SWIG_DIRECTOR_PYTHON_HEADER_
2721 #include <exception>
2732 #ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE
2733 #ifndef SWIG_PYTHON_DIRECTOR_VTABLE
2734 #define SWIG_PYTHON_DIRECTOR_VTABLE
2744 #ifndef SWIG_DIRECTOR_NO_UEH
2745 #ifndef SWIG_DIRECTOR_UEH
2746 #define SWIG_DIRECTOR_UEH
2756 #ifdef SWIG_DIRECTOR_NORTTI
2761 # ifndef SWIG_DIRECTOR_RTDIR
2762 # define SWIG_DIRECTOR_RTDIR
2766 SWIGINTERN std::map<void *, Director *>& get_rtdir_map() {
2767 static std::map<void *, Director *> rtdir_map;
2772 get_rtdir_map()[vptr] = rtdir;
2776 std::map<void *, Director *>::const_iterator pos = get_rtdir_map().find(vptr);
2777 Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0;
2783 # define SWIG_DIRECTOR_CAST(ARG) Swig::get_rtdir(static_cast<void *>(ARG))
2784 # define SWIG_DIRECTOR_RGTR(ARG1, ARG2) Swig::set_rtdir(static_cast<void *>(ARG1), ARG2)
2788 # define SWIG_DIRECTOR_CAST(ARG) dynamic_cast<Swig::Director *>(ARG)
2789 # define SWIG_DIRECTOR_RGTR(ARG1, ARG2)
2831 struct GCItem_Object : GCItem {
2846 template <
typename Type>
2847 struct GCItem_T : GCItem {
2859 template <
typename Type>
2860 struct GCArray_T : GCItem {
2873 class DirectorException :
public std::exception {
2883 if (!PyErr_Occurred()) {
2884 PyErr_SetString(error,
what());
2901 static void raise(PyObject *error,
const char *msg) {
2905 static void raise(
const char *msg) {
2906 raise(PyExc_RuntimeError, msg);
2911 class DirectorTypeMismatchException :
public DirectorException {
2921 static void raise(PyObject *error,
const char *msg) {
2925 static void raise(
const char *msg) {
2931 class DirectorMethodException :
public DirectorException {
2937 static void raise(
const char *msg) {
2943 class DirectorPureVirtualException :
public DirectorException {
2946 :
DirectorException(PyExc_RuntimeError,
"SWIG director pure virtual method called", msg) {
2949 static void raise(
const char *msg) {
2955 #if defined(SWIG_PYTHON_THREADS)
2957 # if !defined(__THREAD__)
2958 # define __THREAD__ 1
2963 # include "pythread.h"
2965 PyThread_type_lock &mutex_;
2968 Guard(PyThread_type_lock & mutex) : mutex_(mutex) {
2969 PyThread_acquire_lock(mutex_, WAIT_LOCK);
2973 PyThread_release_lock(mutex_);
2976 # define SWIG_GUARD(mutex) Guard _guard(mutex)
2978 # define SWIG_GUARD(mutex)
2985 PyObject *swig_self;
2987 mutable bool swig_disown_flag;
2990 void swig_decref()
const {
2991 if (swig_disown_flag) {
2993 Py_DECREF(swig_self);
3000 Director(PyObject *
self) : swig_self(self), swig_disown_flag(false) {
3015 if (!swig_disown_flag) {
3016 swig_disown_flag=
true;
3023 if (swig_disown_flag) {
3024 Py_INCREF(swig_self);
3038 typedef std::map<void *, GCItem_var> swig_ownership_map;
3039 mutable swig_ownership_map swig_owner;
3041 static PyThread_type_lock swig_mutex_own;
3045 template <
typename Type>
3053 template <
typename Type>
3072 swig_ownership_map::iterator iter = swig_owner.find(vptr);
3073 if (iter != swig_owner.end()) {
3074 own = iter->second->get_own();
3075 swig_owner.erase(iter);
3081 template <
typename Type>
3088 return PyWeakref_NewProxy(pyobj, NULL);
3093 PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock();
3101 #define SWIGTYPE_p_char swig_types[0]
3102 #define SWIGTYPE_p_int swig_types[1]
3103 #define SWIGTYPE_p_long swig_types[2]
3104 #define SWIGTYPE_p_operations_research__Domain swig_types[3]
3105 #define SWIGTYPE_p_operations_research__sat__IntegerVariableProto swig_types[4]
3106 #define SWIGTYPE_p_operations_research__sat__SatHelper swig_types[5]
3107 #define SWIGTYPE_p_operations_research__sat__SolutionCallback swig_types[6]
3108 #define SWIGTYPE_p_short swig_types[7]
3109 #define SWIGTYPE_p_signed_char swig_types[8]
3110 #define SWIGTYPE_p_unsigned_char swig_types[9]
3111 #define SWIGTYPE_p_unsigned_int swig_types[10]
3112 #define SWIGTYPE_p_unsigned_long swig_types[11]
3113 #define SWIGTYPE_p_unsigned_short swig_types[12]
3116 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3117 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3121 #ifdef SWIG_TypeQuery
3122 # undef SWIG_TypeQuery
3124 #define SWIG_TypeQuery SWIG_Python_TypeQuery
3129 #if PY_VERSION_HEX >= 0x03000000
3130 # define SWIG_init PyInit__pywrapsat
3133 # define SWIG_init init_pywrapsat
3136 #define SWIG_name "_pywrapsat"
3138 #define SWIGVERSION 0x040002
3139 #define SWIG_VERSION SWIGVERSION
3142 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
3143 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
3146 #include <stdexcept>
3150 class SwigPtr_PyObject {
3178 Py_XINCREF(item._obj);
3192 operator PyObject *()
const
3206 struct SwigVar_PyObject : SwigPtr_PyObject {
3222 #define SWIGWORDSIZE64
3226 #if (__WORDSIZE == 32) || (LONG_MAX == INT_MAX)
3227 # error "SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32"
3241 #include "ortools/base/python-swig.h"
3244 #include <functional>
3256 PyObject*
get()
const {
return obj_; }
3262 PyObject*
const obj_;
3265 template <
typename ReturnT>
3268 ReturnT result = ReturnT();
3270 if (!PyErr_Occurred()) {
3271 PyErr_SetString(PyExc_RuntimeError,
3272 "SWIG std::function invocation failed.");
3276 if (!PyObjAs<ReturnT>(pyresult, &result)) {
3277 if (!PyErr_Occurred()) {
3278 PyErr_SetString(PyExc_RuntimeError,
3279 "SWIG std::function invocation failed.");
3282 Py_DECREF(pyresult);
3290 if (!PyErr_Occurred()) {
3291 PyErr_SetString(PyExc_RuntimeError,
3292 "SWIG std::function invocation failed.");
3295 Py_DECREF(pyresult);
3299 template <
typename ReturnT,
typename... Args>
3301 const char* format, Args... args) {
3304 return HandleResult<ReturnT>(
3305 PyObject_CallFunction(pyfunc,
const_cast<char*
>(format), args...));
3308 template <
typename ReturnT>
3310 return HandleResult<ReturnT>(PyObject_CallFunctionObjArgs(pyfunc,
nullptr));
3317 #include "ortools/sat/swig_helper.h"
3320 #define SWIG_From_long PyInt_FromLong
3323 #define SWIG_From_double PyFloat_FromDouble
3327 #if !defined(SWIG_NO_LLONG_MAX)
3328 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3329 # define LLONG_MAX __LONG_LONG_MAX__
3330 # define LLONG_MIN (-LLONG_MAX - 1LL)
3331 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3340 if (PyFloat_Check(obj)) {
3341 if (val) *val = PyFloat_AsDouble(obj);
3343 #if PY_VERSION_HEX < 0x03000000
3344 }
else if (PyInt_Check(obj)) {
3345 if (val) *val = (double) PyInt_AsLong(obj);
3348 }
else if (PyLong_Check(obj)) {
3349 double v = PyLong_AsDouble(obj);
3350 if (!PyErr_Occurred()) {
3357 #ifdef SWIG_PYTHON_CAST_MODE
3360 double d = PyFloat_AsDouble(obj);
3361 if (!PyErr_Occurred()) {
3368 long v = PyLong_AsLong(obj);
3369 if (!PyErr_Occurred()) {
3391 if ((
min <= x && x <=
max)) {
3392 double fx = floor(x);
3393 double cx = ceil(x);
3394 double rd = ((x - fx) < 0.5) ? fx : cx;
3395 if ((errno == EDOM) || (errno == ERANGE)) {
3398 double summ, reps, diff;
3401 }
else if (rd > x) {
3408 if (reps < 8*DBL_EPSILON) {
3421 #if PY_VERSION_HEX < 0x03000000
3422 if (PyInt_Check(obj)) {
3423 if (val) *val = PyInt_AsLong(obj);
3427 if (PyLong_Check(obj)) {
3428 long v = PyLong_AsLong(obj);
3429 if (!PyErr_Occurred()) {
3437 #ifdef SWIG_PYTHON_CAST_MODE
3440 long v = PyInt_AsLong(obj);
3441 if (!PyErr_Occurred()) {
3451 if (val) *val = (long)(d);
3467 if ((v < INT_MIN || v > INT_MAX)) {
3470 if (val) *val =
static_cast< int >(v);
3480 return PyBool_FromLong(
value ? 1 : 0);
3487 static int init = 0;
3501 if (size > INT_MAX) {
3503 return pchar_descriptor ?
3506 #if PY_VERSION_HEX >= 0x03000000
3507 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3508 return PyBytes_FromStringAndSize(carray,
static_cast< Py_ssize_t
>(size));
3510 return PyUnicode_DecodeUTF8(carray,
static_cast< Py_ssize_t
>(size),
"surrogateescape");
3513 return PyString_FromStringAndSize(carray,
static_cast< Py_ssize_t
>(size));
3532 #if PY_VERSION_HEX>=0x03000000
3533 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3534 if (PyBytes_Check(obj))
3536 if (PyUnicode_Check(obj))
3539 if (PyString_Check(obj))
3542 char *cstr; Py_ssize_t len;
3544 #if PY_VERSION_HEX>=0x03000000
3545 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3546 if (!alloc && cptr) {
3553 obj = PyUnicode_AsUTF8String(obj);
3559 if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
3562 if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
3568 *cptr =
reinterpret_cast< char*
>(memcpy(
new char[len + 1], cstr,
sizeof(
char)*(len + 1)));
3575 #if PY_VERSION_HEX>=0x03000000
3576 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3577 *cptr = PyBytes_AsString(obj);
3588 if (psize) *psize = len + 1;
3589 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3594 #if defined(SWIG_PYTHON_2_UNICODE)
3595 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3596 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3598 #if PY_VERSION_HEX<0x03000000
3599 if (PyUnicode_Check(obj)) {
3600 char *cstr; Py_ssize_t len;
3601 if (!alloc && cptr) {
3604 obj = PyUnicode_AsUTF8String(obj);
3607 if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3610 *cptr =
reinterpret_cast< char*
>(memcpy(
new char[len + 1], cstr,
sizeof(
char)*(len + 1)));
3612 if (psize) *psize = len + 1;
3624 if (pchar_descriptor) {
3627 if (cptr) *cptr = (
char *) vptr;
3628 if (psize) *psize = vptr ? (strlen((
char *)vptr) + 1) : 0;
3641 char* buf = 0 ;
size_t size = 0;
int alloc =
SWIG_OLDOBJ;
3644 if (val) *val =
new std::string(buf, size - 1);
3652 static int init = 0;
3692 #if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
3693 const size_t swig_method_index = 0;
3694 const char *
const swig_method_name =
"OnSolutionCallback";
3695 PyObject *method = swig_get_method(swig_method_index, swig_method_name);
3703 PyObject *error = PyErr_Occurred();
3717 PyObject *resultobj = 0;
3718 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3721 PyObject *swig_obj[1] ;
3727 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "delete_SolutionCallback" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
3729 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3743 PyObject *resultobj = 0;
3744 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3747 PyObject *swig_obj[1] ;
3749 bool upcall =
false;
3755 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_OnSolutionCallback" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3757 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3759 upcall = (director && (director->
swig_get_self()==swig_obj[0]));
3764 ((operations_research::sat::SolutionCallback
const *)arg1)->OnSolutionCallback();
3777 PyObject *resultobj = 0;
3778 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3781 PyObject *swig_obj[1] ;
3788 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumBooleans" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3790 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3793 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumBooleans();
3804 PyObject *resultobj = 0;
3805 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3808 PyObject *swig_obj[1] ;
3815 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumBranches" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3817 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3820 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumBranches();
3831 PyObject *resultobj = 0;
3832 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3835 PyObject *swig_obj[1] ;
3842 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumConflicts" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3844 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3847 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumConflicts();
3858 PyObject *resultobj = 0;
3859 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3862 PyObject *swig_obj[1] ;
3869 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumBinaryPropagations" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3871 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3874 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumBinaryPropagations();
3885 PyObject *resultobj = 0;
3886 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3889 PyObject *swig_obj[1] ;
3896 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumIntegerPropagations" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3898 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3901 result = (
int64)((operations_research::sat::SolutionCallback
const *)arg1)->NumIntegerPropagations();
3912 PyObject *resultobj = 0;
3913 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3916 PyObject *swig_obj[1] ;
3923 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_WallTime" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3925 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3928 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->WallTime();
3939 PyObject *resultobj = 0;
3940 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3943 PyObject *swig_obj[1] ;
3950 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_UserTime" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3952 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3955 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->UserTime();
3966 PyObject *resultobj = 0;
3967 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3970 PyObject *swig_obj[1] ;
3977 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_ObjectiveValue" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3979 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3982 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->ObjectiveValue();
3993 PyObject *resultobj = 0;
3994 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3997 PyObject *swig_obj[1] ;
4004 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_BestObjectiveBound" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
4006 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4009 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->BestObjectiveBound();
4020 PyObject *resultobj = 0;
4021 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4027 PyObject *swig_obj[2] ;
4033 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_SolutionIntegerValue" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
4035 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4040 arg2 =
static_cast< int >(val2);
4043 result = (
int64)(arg1)->SolutionIntegerValue(arg2);
4054 PyObject *resultobj = 0;
4055 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4061 PyObject *swig_obj[2] ;
4067 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_SolutionBooleanValue" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
4069 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4074 arg2 =
static_cast< int >(val2);
4077 result = (bool)(arg1)->SolutionBooleanValue(arg2);
4088 PyObject *resultobj = 0;
4089 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4092 PyObject *swig_obj[1] ;
4098 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_StopSearch" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
4100 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4103 (arg1)->StopSearch();
4114 PyObject *resultobj = 0;
4115 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4118 PyObject *swig_obj[1] ;
4119 operations_research::sat::CpSolverResponse result;
4125 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_Response" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
4127 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4130 result = ((operations_research::sat::SolutionCallback
const *)arg1)->Response();
4134 PyObject*
const module = PyImport_ImportModule(
"ortools.sat.cp_model_pb2");
4135 if (module !=
nullptr) {
4136 PyObject*
const dict = PyModule_GetDict(module);
4137 if (dict !=
nullptr) {
4138 PyObject*
const clss = PyDict_GetItemString(dict,
"CpSolverResponse");
4139 if (clss !=
nullptr) {
4140 std::string encoded_protobuf;
4141 (&result)->SerializeToString(&encoded_protobuf);
4143 PyObject*
const python_encoded_protobuf = PyBytes_FromStringAndSize(
4144 encoded_protobuf.c_str(), encoded_protobuf.size());
4149 PyObject*
const result = PyObject_CallMethod(
4150 clss,
const_cast<char*
>(
"FromString"),
4151 const_cast<char*
>(
"(O)"),
4152 python_encoded_protobuf);
4153 Py_DECREF(python_encoded_protobuf);
4167 PyObject *resultobj = 0;
4168 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4171 PyObject *swig_obj[1] ;
4178 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_HasResponse" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
4180 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4183 result = (bool)((operations_research::sat::SolutionCallback
const *)arg1)->HasResponse();
4194 PyObject *resultobj = 0;
4195 PyObject *arg1 = (PyObject *) 0 ;
4196 PyObject *swig_obj[1] ;
4197 operations_research::sat::SolutionCallback *result = 0 ;
4204 if ( arg1 != Py_None ) {
4208 SWIG_SetErrorMsg(PyExc_RuntimeError,
"accessing abstract class or protected constructor");
4222 PyObject *resultobj = 0;
4223 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4226 PyObject *swig_obj[1] ;
4232 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "disown_SolutionCallback" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
4234 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4263 PyObject *resultobj = 0;
4264 operations_research::sat::CpModelProto *arg1 = 0 ;
4265 PyObject *swig_obj[1] ;
4266 operations_research::sat::CpSolverResponse result;
4271 arg1 =
new operations_research::sat::CpModelProto;
4272 PyObject*
const pyresult = PyObject_CallMethod(
4273 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4274 if (pyresult !=
nullptr) {
4275 char* buffer =
nullptr;
4276 Py_ssize_t length = 0;
4277 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4278 if (buffer !=
nullptr) {
4279 arg1->ParseFromArray(buffer, length);
4281 Py_DECREF(pyresult);
4290 PyObject*
const module = PyImport_ImportModule(
"ortools.sat.cp_model_pb2");
4291 if (module !=
nullptr) {
4292 PyObject*
const dict = PyModule_GetDict(module);
4293 if (dict !=
nullptr) {
4294 PyObject*
const clss = PyDict_GetItemString(dict,
"CpSolverResponse");
4295 if (clss !=
nullptr) {
4296 std::string encoded_protobuf;
4297 (&result)->SerializeToString(&encoded_protobuf);
4299 PyObject*
const python_encoded_protobuf = PyBytes_FromStringAndSize(
4300 encoded_protobuf.c_str(), encoded_protobuf.size());
4305 PyObject*
const result = PyObject_CallMethod(
4306 clss,
const_cast<char*
>(
"FromString"),
4307 const_cast<char*
>(
"(O)"),
4308 python_encoded_protobuf);
4309 Py_DECREF(python_encoded_protobuf);
4329 PyObject *resultobj = 0;
4330 operations_research::sat::CpModelProto *arg1 = 0 ;
4331 operations_research::sat::SatParameters *arg2 = 0 ;
4332 PyObject *swig_obj[2] ;
4333 operations_research::sat::CpSolverResponse result;
4337 arg1 =
new operations_research::sat::CpModelProto;
4338 PyObject*
const pyresult = PyObject_CallMethod(
4339 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4340 if (pyresult !=
nullptr) {
4341 char* buffer =
nullptr;
4342 Py_ssize_t length = 0;
4343 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4344 if (buffer !=
nullptr) {
4345 arg1->ParseFromArray(buffer, length);
4347 Py_DECREF(pyresult);
4351 arg2 =
new operations_research::sat::SatParameters;
4352 PyObject*
const pyresult = PyObject_CallMethod(
4353 swig_obj[1],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4354 if (pyresult !=
nullptr) {
4355 char* buffer =
nullptr;
4356 Py_ssize_t length = 0;
4357 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4358 if (buffer !=
nullptr) {
4359 arg2->ParseFromArray(buffer, length);
4361 Py_DECREF(pyresult);
4370 PyObject*
const module = PyImport_ImportModule(
"ortools.sat.cp_model_pb2");
4371 if (module !=
nullptr) {
4372 PyObject*
const dict = PyModule_GetDict(module);
4373 if (dict !=
nullptr) {
4374 PyObject*
const clss = PyDict_GetItemString(dict,
"CpSolverResponse");
4375 if (clss !=
nullptr) {
4376 std::string encoded_protobuf;
4377 (&result)->SerializeToString(&encoded_protobuf);
4379 PyObject*
const python_encoded_protobuf = PyBytes_FromStringAndSize(
4380 encoded_protobuf.c_str(), encoded_protobuf.size());
4385 PyObject*
const result = PyObject_CallMethod(
4386 clss,
const_cast<char*
>(
"FromString"),
4387 const_cast<char*
>(
"(O)"),
4388 python_encoded_protobuf);
4389 Py_DECREF(python_encoded_protobuf);
4415 PyObject *resultobj = 0;
4416 operations_research::sat::CpModelProto *arg1 = 0 ;
4417 operations_research::sat::SatParameters *arg2 = 0 ;
4418 operations_research::sat::SolutionCallback *arg3 = 0 ;
4421 PyObject *swig_obj[3] ;
4422 operations_research::sat::CpSolverResponse result;
4426 arg1 =
new operations_research::sat::CpModelProto;
4427 PyObject*
const pyresult = PyObject_CallMethod(
4428 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4429 if (pyresult !=
nullptr) {
4430 char* buffer =
nullptr;
4431 Py_ssize_t length = 0;
4432 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4433 if (buffer !=
nullptr) {
4434 arg1->ParseFromArray(buffer, length);
4436 Py_DECREF(pyresult);
4440 arg2 =
new operations_research::sat::SatParameters;
4441 PyObject*
const pyresult = PyObject_CallMethod(
4442 swig_obj[1],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4443 if (pyresult !=
nullptr) {
4444 char* buffer =
nullptr;
4445 Py_ssize_t length = 0;
4446 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4447 if (buffer !=
nullptr) {
4448 arg2->ParseFromArray(buffer, length);
4450 Py_DECREF(pyresult);
4455 SWIG_exception_fail(
SWIG_ArgError(res3),
"in method '" "SatHelper_SolveWithParametersAndSolutionCallback" "', argument " "3"" of type '" "operations_research::sat::SolutionCallback const &""'");
4458 SWIG_exception_fail(
SWIG_ValueError,
"invalid null reference " "in method '" "SatHelper_SolveWithParametersAndSolutionCallback" "', argument " "3"" of type '" "operations_research::sat::SolutionCallback const &""'");
4460 arg3 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp3);
4463 result = operations_research::sat::SatHelper::SolveWithParametersAndSolutionCallback((operations_research::sat::CpModelProto
const &)*arg1,(operations_research::sat::SatParameters
const &)*arg2,(operations_research::sat::SolutionCallback
const &)*arg3);
4467 PyObject*
const module = PyImport_ImportModule(
"ortools.sat.cp_model_pb2");
4468 if (module !=
nullptr) {
4469 PyObject*
const dict = PyModule_GetDict(module);
4470 if (dict !=
nullptr) {
4471 PyObject*
const clss = PyDict_GetItemString(dict,
"CpSolverResponse");
4472 if (clss !=
nullptr) {
4473 std::string encoded_protobuf;
4474 (&result)->SerializeToString(&encoded_protobuf);
4476 PyObject*
const python_encoded_protobuf = PyBytes_FromStringAndSize(
4477 encoded_protobuf.c_str(), encoded_protobuf.size());
4482 PyObject*
const result = PyObject_CallMethod(
4483 clss,
const_cast<char*
>(
"FromString"),
4484 const_cast<char*
>(
"(O)"),
4485 python_encoded_protobuf);
4486 Py_DECREF(python_encoded_protobuf);
4512 PyObject *resultobj = 0;
4513 operations_research::sat::CpModelProto *arg1 = 0 ;
4514 PyObject *swig_obj[1] ;
4520 arg1 =
new operations_research::sat::CpModelProto;
4521 PyObject*
const pyresult = PyObject_CallMethod(
4522 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4523 if (pyresult !=
nullptr) {
4524 char* buffer =
nullptr;
4525 Py_ssize_t length = 0;
4526 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4527 if (buffer !=
nullptr) {
4528 arg1->ParseFromArray(buffer, length);
4530 Py_DECREF(pyresult);
4535 result = operations_research::sat::SatHelper::ModelStats((operations_research::sat::CpModelProto
const &)*arg1);
4552 PyObject *resultobj = 0;
4553 operations_research::sat::CpSolverResponse *arg1 = 0 ;
4554 PyObject *swig_obj[1] ;
4560 arg1 =
new operations_research::sat::CpSolverResponse;
4561 PyObject*
const pyresult = PyObject_CallMethod(
4562 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4563 if (pyresult !=
nullptr) {
4564 char* buffer =
nullptr;
4565 Py_ssize_t length = 0;
4566 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4567 if (buffer !=
nullptr) {
4568 arg1->ParseFromArray(buffer, length);
4570 Py_DECREF(pyresult);
4575 result = operations_research::sat::SatHelper::SolverResponseStats((operations_research::sat::CpSolverResponse
const &)*arg1);
4592 PyObject *resultobj = 0;
4593 operations_research::sat::CpModelProto *arg1 = 0 ;
4594 PyObject *swig_obj[1] ;
4600 arg1 =
new operations_research::sat::CpModelProto;
4601 PyObject*
const pyresult = PyObject_CallMethod(
4602 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4603 if (pyresult !=
nullptr) {
4604 char* buffer =
nullptr;
4605 Py_ssize_t length = 0;
4606 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4607 if (buffer !=
nullptr) {
4608 arg1->ParseFromArray(buffer, length);
4610 Py_DECREF(pyresult);
4615 result = operations_research::sat::SatHelper::ValidateModel((operations_research::sat::CpModelProto
const &)*arg1);
4632 PyObject *resultobj = 0;
4633 operations_research::sat::IntegerVariableProto *arg1 = 0 ;
4636 PyObject *swig_obj[1] ;
4643 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SatHelper_VariableDomain" "', argument " "1"" of type '" "operations_research::sat::IntegerVariableProto const &""'");
4646 SWIG_exception_fail(
SWIG_ValueError,
"invalid null reference " "in method '" "SatHelper_VariableDomain" "', argument " "1"" of type '" "operations_research::sat::IntegerVariableProto const &""'");
4648 arg1 =
reinterpret_cast< operations_research::sat::IntegerVariableProto *
>(argp1);
4651 result = operations_research::sat::SatHelper::VariableDomain((operations_research::sat::IntegerVariableProto
const &)*arg1);
4662 PyObject *resultobj = 0;
4663 operations_research::sat::CpModelProto *arg1 = 0 ;
4664 std::string *arg2 = 0 ;
4666 PyObject *swig_obj[2] ;
4671 arg1 =
new operations_research::sat::CpModelProto;
4672 PyObject*
const pyresult = PyObject_CallMethod(
4673 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4674 if (pyresult !=
nullptr) {
4675 char* buffer =
nullptr;
4676 Py_ssize_t length = 0;
4677 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4678 if (buffer !=
nullptr) {
4679 arg1->ParseFromArray(buffer, length);
4681 Py_DECREF(pyresult);
4685 std::string *ptr = (std::string *)0;
4697 result = (bool)operations_research::sat::SatHelper::WriteModelToFile((operations_research::sat::CpModelProto
const &)*arg1,(std::string
const &)*arg2);
4716 PyObject *resultobj = 0;
4717 operations_research::sat::SatHelper *result = 0 ;
4722 result = (operations_research::sat::SatHelper *)
new operations_research::sat::SatHelper();
4733 PyObject *resultobj = 0;
4734 operations_research::sat::SatHelper *arg1 = (operations_research::sat::SatHelper *) 0 ;
4737 PyObject *swig_obj[1] ;
4745 arg1 =
reinterpret_cast< operations_research::sat::SatHelper *
>(argp1);
4803 { NULL, NULL, 0, NULL }
4807 { NULL, NULL, 0, NULL }
4815 static swig_type_info _swigt__p_long = {
"_p_long",
"intptr_t *|int_least64_t *|int_fast32_t *|int_fast64_t *|int64 *|int64_t *|long *|int_fast16_t *|intmax_t *", 0, 0, (
void*)0, 0};
4824 static swig_type_info _swigt__p_unsigned_long = {
"_p_unsigned_long",
"uintptr_t *|uint_least64_t *|uint_fast32_t *|uint_fast64_t *|uint64 *|uint64_t *|unsigned long *|uint_fast16_t *|uintmax_t *", 0, 0, (
void*)0, 0};
4877 {0, 0, 0, 0.0, 0, 0}};
4931 #define SWIGRUNTIME_DEBUG
4967 }
while (iter!= module_head);
4978 if (init == 0)
return;
4981 #ifdef SWIGRUNTIME_DEBUG
4982 printf(
"SWIG_InitializeModule: size %lu\n", (
unsigned long)
swig_module.
size);
4989 #ifdef SWIGRUNTIME_DEBUG
4999 #ifdef SWIGRUNTIME_DEBUG
5000 printf(
"SWIG_InitializeModule: found type %s\n", type->
name);
5004 #ifdef SWIGRUNTIME_DEBUG
5005 printf(
"SWIG_InitializeModule: found and overwrite type %s \n", type->
name);
5014 while (cast->
type) {
5017 #ifdef SWIGRUNTIME_DEBUG
5018 printf(
"SWIG_InitializeModule: look cast %s\n", cast->
type->
name);
5022 #ifdef SWIGRUNTIME_DEBUG
5023 if (ret) printf(
"SWIG_InitializeModule: found cast %s\n", ret->
name);
5028 #ifdef SWIGRUNTIME_DEBUG
5029 printf(
"SWIG_InitializeModule: skip old type %s\n", ret->
name);
5036 #ifdef SWIGRUNTIME_DEBUG
5037 if (ocast) printf(
"SWIG_InitializeModule: skip old cast %s\n", ret->
name);
5039 if (!ocast) ret = 0;
5044 #ifdef SWIGRUNTIME_DEBUG
5045 printf(
"SWIG_InitializeModule: adding cast %s\n", cast->
type->
name);
5060 #ifdef SWIGRUNTIME_DEBUG
5061 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
5066 while (cast->
type) {
5067 printf(
"SWIG_InitializeModule: cast type %s\n", cast->
type->
name);
5071 printf(
"---- Total casts: %d\n",j);
5073 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
5086 static int init_run = 0;
5088 if (init_run)
return;
5099 equiv = equiv->
next;
5120 #define SWIG_newvarlink() SWIG_Python_newvarlink()
5121 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
5122 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
5130 PyObject *(*get_attr)(void);
5142 #if PY_VERSION_HEX >= 0x03000000
5143 return PyUnicode_InternFromString(
"<Swig global variables>");
5145 return PyString_FromString(
"<Swig global variables>");
5151 #if PY_VERSION_HEX >= 0x03000000
5152 PyObject *str = PyUnicode_InternFromString(
"(");
5157 tail = PyUnicode_FromString(
var->name);
5158 joined = PyUnicode_Concat(str,
tail);
5163 tail = PyUnicode_InternFromString(
", ");
5164 joined = PyUnicode_Concat(str,
tail);
5170 tail = PyUnicode_InternFromString(
")");
5171 joined = PyUnicode_Concat(str,
tail);
5176 PyObject *str = PyString_FromString(
"(");
5179 PyString_ConcatAndDel(&str,PyString_FromString(
var->name));
5180 if (
var->next) PyString_ConcatAndDel(&str,PyString_FromString(
", "));
5182 PyString_ConcatAndDel(&str,PyString_FromString(
")"));
5200 PyObject *res = NULL;
5203 if (strcmp(
var->name,n) == 0) {
5204 res = (*
var->get_attr)();
5209 if (res == NULL && !PyErr_Occurred()) {
5210 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
5220 if (strcmp(
var->name,n) == 0) {
5221 res = (*
var->set_attr)(p);
5226 if (res == 1 && !PyErr_Occurred()) {
5227 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
5234 static char varlink__doc__[] =
"Swig var link object";
5235 static PyTypeObject varlink_type;
5236 static int type_init = 0;
5238 const PyTypeObject tmp = {
5239 #if PY_VERSION_HEX >= 0x03000000
5240 PyVarObject_HEAD_INIT(NULL, 0)
5242 PyObject_HEAD_INIT(NULL)
5269 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5272 #if PY_VERSION_HEX >= 0x03040000
5275 #if PY_VERSION_HEX >= 0x03080000
5278 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
5291 if (PyType_Ready(&varlink_type) < 0)
5294 return &varlink_type;
5304 return ((PyObject*) result);
5312 size_t size = strlen(
name)+1;
5326 static PyObject *globals = 0;
5342 for (i = 0; constants[i].
type; ++i) {
5343 switch(constants[i].type) {
5348 obj =
SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
5355 PyDict_SetItemString(d, constants[i].
name, obj);
5371 for (i = 0; methods[i].ml_name; ++i) {
5372 const char *c = methods[i].ml_doc;
5374 c = strstr(c,
"swig_ptr: ");
5378 const char *
name = c + 10;
5379 for (j = 0; const_table[j].
type; ++j) {
5380 if (strncmp(const_table[j].
name,
name,
5381 strlen(const_table[j].
name)) == 0) {
5382 ci = &(const_table[j]);
5389 size_t shift = (ci->
ptype) - types;
5391 size_t ldoc = (c - methods[i].ml_doc);
5392 size_t lptr = strlen(ty->
name)+2*
sizeof(
void*)+2;
5393 char *ndoc = (
char*)
malloc(ldoc + lptr + 10);
5396 memcpy(buff, methods[i].ml_doc, ldoc);
5398 memcpy(buff,
"swig_ptr: ", 10);
5401 methods[i].ml_doc = ndoc;
5439 if (PyCFunction_Check(func)) {
5440 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5443 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5445 #if PY_VERSION_HEX >= 0x03000000
5446 return PyInstanceMethod_New(func);
5448 return PyMethod_New(func, NULL, NULL);
5458 if (PyCFunction_Check(func)) {
5459 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5462 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5464 return PyStaticMethod_New(func);
5480 #if PY_VERSION_HEX >= 0x03000000
5486 PyObject *m, *d, *md, *globals;
5488 #if PY_VERSION_HEX >= 0x03000000
5489 static struct PyModuleDef SWIG_module = {
5490 PyModuleDef_HEAD_INIT,
5502 #if defined(SWIGPYTHON_BUILTIN)
5506 static PyGetSetDef this_getset_def = {
5507 (
char *)
"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
5509 static SwigPyGetSet thisown_getset_closure = {
5513 static PyGetSetDef thisown_getset_def = {
5514 (
char *)
"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
5516 PyTypeObject *builtin_pytype;
5517 int builtin_base_count;
5520 PyGetSetDescrObject *static_getset;
5521 PyTypeObject *metatype;
5522 PyTypeObject *swigpyobject;
5524 PyObject *public_interface, *public_symbol;
5525 PyObject *this_descr;
5526 PyObject *thisown_descr;
5530 (void)builtin_pytype;
5531 (void)builtin_base_count;
5532 (void)builtin_basetype;
5534 (void)static_getset;
5538 metatype = SwigPyObjectType();
5548 #ifndef SWIGPYTHON_BUILTIN
5555 #if PY_VERSION_HEX >= 0x03000000
5556 m = PyModule_Create(&SWIG_module);
5561 md = d = PyModule_GetDict(m);
5566 #ifdef SWIGPYTHON_BUILTIN
5570 assert(SwigPyObject_stype);
5573 SwigPyObject_stype->
clientdata = &SwigPyObject_clientdata;
5574 SwigPyObject_clientdata.
pytype = swigpyobject;
5575 }
else if (swigpyobject->tp_basicsize != cd->
pytype->tp_basicsize) {
5576 PyErr_SetString(PyExc_RuntimeError,
"Import error: attempted to load two incompatible swig-generated modules.");
5577 # if PY_VERSION_HEX >= 0x03000000
5590 (void)thisown_descr;
5592 public_interface = PyList_New(0);
5594 (void)public_symbol;
5596 PyDict_SetItemString(md,
"__all__", public_interface);
5597 Py_DECREF(public_interface);
5599 SwigPyBuiltin_AddPublicSymbol(public_interface,
SwigMethods[i].ml_name);
5609 #if PY_VERSION_HEX >= 0x03000000
SharedPyPtr(const SharedPyPtr &other)
SharedPyPtr(PyObject *obj)
static void raise(JNIEnv *jenv, jthrowable throwable)
const char * getMessage() const
const char * what() const
DirectorException(const char *msg)
DirectorException(PyObject *error, const char *hdr="", const char *msg="")
virtual ~DirectorException()
PyObject * swig_get_self() const
int swig_release_ownership(void *vptr) const
jobject swig_get_self(JNIEnv *jenv) const
virtual void swig_set_inner(const char *, bool) const
static PyObject * swig_pyobj_disown(PyObject *pyobj, PyObject *SWIGUNUSEDPARM(args))
void swig_acquire_ownership_array(Type *vptr) const
void swig_acquire_ownership_obj(void *vptr, int own) const
virtual bool swig_get_inner(const char *) const
void swig_acquire_ownership(Type *vptr) const
DirectorMethodException(const char *msg="")
static void raise(const char *msg)
static void raise(const char *msg)
DirectorPureVirtualException(const char *msg)
DirectorPureVirtualException(const char *msg="")
DirectorTypeMismatchException(PyObject *error, const char *msg="")
DirectorTypeMismatchException(const char *msg="")
Guard(PyThread_type_lock &mutex)
virtual ~SwigDirector_SolutionCallback()
virtual void OnSolutionCallback() const
SwigDirector_SolutionCallback()
We call domain any subset of Int64 = [kint64min, kint64max].
SwigPtr_PyObject(PyObject *obj, bool initial_ref=true)
SwigPtr_PyObject & operator=(const SwigPtr_PyObject &item)
SwigPtr_PyObject(const SwigPtr_PyObject &item)
PyObject * operator->() const
CpSolverResponse SolveWithParameters(const CpModelProto &model_proto, const SatParameters ¶ms)
Solves the given CpModelProto with the given parameters.
CpSolverResponse Solve(const CpModelProto &model_proto)
Solves the given CpModelProto and returns an instance of CpSolverResponse.
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
PyObject * from(const Type &val)
SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type)
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
static swig_cast_info * swig_cast_initial[]
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
#define SWIG_MangledTypeQuery(name)
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
SWIGINTERN PyObject * _wrap_SatHelper_SolverResponseStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static PyObject * Swig_This_global
SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
SWIGINTERN int SWIG_AsVal_double(PyObject *obj, double *val)
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
static swig_type_info _swigt__p_operations_research__Domain
#define SWIG_TypeQuery(name)
SWIGINTERN PyObject * _wrap_SatHelper_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_CheckState(r)
static swig_cast_info _swigc__p_int[]
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n)
SWIGRUNTIME PyTypeObject * SwigPyPacked_TypeOnce(void)
SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront)
SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[])
#define SWIG_POINTER_IMPLICIT_CONV
SWIGINTERN PyObject * _wrap_SolutionCallback_HasResponse(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static ReturnT HandleResult(PyObject *pyresult)
struct swig_cast_info swig_cast_info
SWIGINTERN PyObject * _wrap_delete_SatHelper(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_DIRECTOR_RGTR(ARG1, ARG2)
SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v)
#define SWIG_PYTHON_THREAD_END_BLOCK
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
#define SWIG_RuntimeError
struct swig_varlinkobject swig_varlinkobject
#define SWIG_NewClientData(obj)
static swig_type_info _swigt__p_operations_research__sat__SolutionCallback
SWIGINTERN PyObject * _wrap_SolutionCallback_StopSearch(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
static swig_type_info _swigt__p_unsigned_char
static swig_cast_info _swigc__p_operations_research__sat__IntegerVariableProto[]
SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max)
static swig_type_info * swig_types[14]
SWIGINTERN PyObject * SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGINTERN PyObject * _wrap_disown_SolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_RUNTIME_VERSION
#define SWIG_POINTER_NOSHADOW
SWIGINTERN PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
static swig_type_info _swigt__p_short
SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
SWIGINTERN PyObject * SWIG_Python_newvarlink(void)
static PyMethodDef swigobject_methods[]
SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
#define SWIG_InternalNewPointerObj(ptr, type, flags)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
#define SWIG_exception_fail(code, msg)
SWIGINTERNINLINE PyObject * SWIG_From_bool(bool value)
#define SWIG_DIRECTOR_CAST(ARG)
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
#define SWIG_AttributeError
SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self)
SWIGINTERN PyObject * _wrap_SolutionCallback_SolutionIntegerValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_module_info swig_module
static swig_cast_info _swigc__p_unsigned_char[]
static swig_cast_info _swigc__p_short[]
SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v)
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGRUNTIME int SWIG_Python_TypeErrorOccurred(PyObject *obj)
SWIGRUNTIME void SWIG_Python_DestroyModule(PyObject *obj)
#define SWIG_SetModule(clientdata, pointer)
SWIGINTERN PyObject * _wrap_SatHelper_SolveWithParametersAndSolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
SWIGINTERN PyObject * _wrap_SolutionCallback_WallTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyTypeObject * swig_varlink_type(void)
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
SWIGINTERN PyObject * _wrap_delete_SolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGUNUSEDPARM(p)
SWIGRUNTIME PyObject * SWIG_This(void)
SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
SWIGRUNTIME PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
#define SWIG_as_voidptr(a)
static swig_const_info swig_const_table[]
SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op)
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v)
#define SWIG_Python_CallFunctor(functor, obj)
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
static swig_type_info _swigt__p_unsigned_short
SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
SWIGINTERN PyObject * _wrap_SatHelper_SolveWithParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_ConvertPtr(obj, pptr, type, flags)
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
SWIGINTERN PyObject * _wrap_SolutionCallback_NumBooleans(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
struct swig_const_info swig_const_info
SWIGINTERNINLINE PyObject * SWIG_From_std_string(const std::string &s)
void HandleResult< void >(PyObject *pyresult)
SWIGINTERN int SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name)
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
#define SWIGTYPE_p_operations_research__sat__SatHelper
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
SWIGINTERN PyObject * _wrap_new_SatHelper(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
SWIGINTERN PyObject * SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
SWIGINTERN PyObject * _wrap_SatHelper_VariableDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_newvarlink()
SWIGRUNTIME void SWIG_Python_RaiseOrModifyTypeError(const char *message)
static swig_type_info _swigt__p_unsigned_long
#define SWIG_Python_str_DelForPy3(x)
static swig_cast_info _swigc__p_char[]
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
SWIGINTERN PyObject * SatHelper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v))
SWIGINTERN PyObject * SatHelper_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SatHelper_WriteModelToFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject *obj)
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
SWIGINTERN char * SWIG_Python_str_AsChar(PyObject *str)
static swig_cast_info _swigc__p_unsigned_short[]
struct swig_globalvar swig_globalvar
#define SWIGPY_CAPSULE_NAME
SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg)
SWIGINTERN PyObject * _wrap_SolutionCallback_NumBranches(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_NewPointerObj(ptr, type, flags)
SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module)
#define SWIG_GUARD(mutex)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
void *(* swig_converter_func)(void *, int *)
#define SWIG_POINTER_NO_NULL
#define SWIG_Python_str_FromFormat
#define SWIG_InstallConstants(d, constants)
SWIGINTERN PyObject * _wrap_SolutionCallback_OnSolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SolutionCallback_SolutionBooleanValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SolutionCallback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static PyMethodDef SwigMethods[]
#define SWIGTYPE_p_operations_research__sat__SolutionCallback
#define SWIG_NullReferenceError
#define SWIG_POINTER_DISOWN
#define SWIG_STATIC_POINTER(var)
struct swig_type_info swig_type_info
SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags)
SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char *carray, size_t size)
SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
SWIGINTERN PyMethodDef * SWIG_PythonGetProxyDoc(const char *name)
SWIGINTERN PyObject * _wrap_SatHelper_ModelStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_signed_char
SWIGINTERN int SWIG_AsPtr_std_string(PyObject *obj, std::string **val)
SWIGRUNTIME int SWIG_Python_ArgFail(int argnum)
SWIGINTERN PyObject * SWIG_globals(void)
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
SWIGINTERN PyObject * _wrap_SatHelper_ValidateModel(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
#define SWIG_NewPackedObj(ptr, sz, type)
static swig_cast_info _swigc__p_operations_research__sat__SatHelper[]
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v)
#define SWIG_GetModule(clientdata)
static swig_type_info _swigt__p_operations_research__sat__SatHelper
static swig_cast_info _swigc__p_unsigned_int[]
static swig_type_info _swigt__p_int
SWIGINTERN PyObject * _wrap_SolutionCallback_NumIntegerPropagations(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SWIG_PropagateClientData(void)
static swig_cast_info _swigc__p_unsigned_long[]
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
SWIGRUNTIME PyObject * SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGINTERN PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
SWIGINTERN PyObject * _wrap_new_SolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
#define SWIGTYPE_p_operations_research__Domain
static swig_type_info _swigt__p_long
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
static PyMethodDef SwigMethods_proxydocs[]
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
SWIGINTERN int SWIG_AsVal_int(PyObject *obj, int *val)
#define SWIG_TYPE_TABLE_NAME
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
#define SWIG_BUILTIN_TP_INIT
static swig_type_info _swigt__p_unsigned_int
#define SWIG_CAST_NEW_MEMORY
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
SWIGINTERN int SWIG_AsVal_long(PyObject *obj, long *val)
SWIGINTERN PyObject * _wrap_SolutionCallback_BestObjectiveBound(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_PYTHON_THREAD_END_ALLOW
struct swig_module_info swig_module_info
SWIGINTERN PyObject * _wrap_SolutionCallback_ObjectiveValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
static swig_cast_info _swigc__p_operations_research__sat__SolutionCallback[]
SWIGRUNTIME PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
SWIGINTERN PyObject * _wrap_SolutionCallback_NumConflicts(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_long[]
static swig_type_info * swig_type_initial[]
SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
static ReturnT InvokePythonCallableReturning(PyObject *pyfunc, const char *format, Args... args)
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
SWIGINTERN PyObject * SolutionCallback_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
SWIGINTERN PyObject * _wrap_SolutionCallback_NumBinaryPropagations(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SolutionCallback_Response(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
static swig_type_info _swigt__p_operations_research__sat__IntegerVariableProto
#define SWIG_DivisionByZero
static swig_type_info _swigt__p_char
SWIGINTERN swig_type_info * SWIG_pchar_descriptor(void)
static swig_cast_info _swigc__p_operations_research__Domain[]
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
#define SWIG_OverflowError
SWIGINTERN PyObject * _wrap_SolutionCallback_UserTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc)
struct swig_type_info *(* swig_dycast_func)(void **)
#define SWIGTYPE_p_operations_research__sat__IntegerVariableProto
#define SWIG_PYTHON_INITIALIZE_THREADS
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
#define SWIG_AddNewMask(r)
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
static swig_cast_info _swigc__p_signed_char[]
#define SWIG_PYTHON_THREAD_BEGIN_ALLOW
SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own)
SWIGINTERN PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
#define SWIGRUNTIMEINLINE
GCItem_var(GCItem *item=0)
GCItem_var & operator=(GCItem *item)
GCItem * operator->() const
virtual int get_own() const
PyObject_HEAD void * pack
SwigVar_PyObject(PyObject *obj=0)
SwigVar_PyObject & operator=(PyObject *obj)
struct swig_cast_info * prev
struct swig_cast_info * next
swig_converter_func converter
int(* set_attr)(PyObject *)
struct swig_globalvar * next
PyObject *(* get_attr)(void)
swig_type_info ** type_initial
struct swig_module_info * next
swig_cast_info ** cast_initial
struct swig_cast_info * cast
PyObject_HEAD swig_globalvar * vars