17#define SWIG_PYTHON_THREADS
18#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
23template<
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; }
39template <
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
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
88# pragma warning(disable : 4505)
94# define SWIGUNUSEDPARM(p)
96# define SWIGUNUSEDPARM(p) p SWIGUNUSED
102# define SWIGINTERN static SWIGUNUSED
106#ifndef SWIGINTERNINLINE
107# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
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)
365typedef 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)
479 if (iter->
type == from) {
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)
1159SwigPyBuiltin_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
1405SwigPyObject_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
2415void *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
2611SWIG_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_
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) {
2906 raise(PyExc_RuntimeError, msg);
2911 class DirectorTypeMismatchException :
public DirectorException {
2921 static void raise(PyObject *error,
const char *msg) {
2931 class DirectorMethodException :
public DirectorException {
2943 class DirectorPureVirtualException :
public DirectorException {
2946 :
DirectorException(PyExc_RuntimeError,
"SWIG director pure virtual method called", 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_long swig_types[2]
3104#define SWIGTYPE_p_operations_research__Domain swig_types[3]
3105#define SWIGTYPE_p_operations_research__sat__CpSatHelper swig_types[4]
3106#define SWIGTYPE_p_operations_research__sat__IntegerVariableProto swig_types[5]
3107#define SWIGTYPE_p_operations_research__sat__SolutionCallback swig_types[6]
3108#define SWIGTYPE_p_operations_research__sat__SolveWrapper swig_types[7]
3109#define SWIGTYPE_p_short swig_types[8]
3110#define SWIGTYPE_p_signed_char swig_types[9]
3111#define SWIGTYPE_p_unsigned_char swig_types[10]
3112#define SWIGTYPE_p_unsigned_int swig_types[11]
3113#define SWIGTYPE_p_unsigned_long_long swig_types[12]
3114#define SWIGTYPE_p_unsigned_short swig_types[13]
3117#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3118#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3122#ifdef SWIG_TypeQuery
3123# undef SWIG_TypeQuery
3125#define SWIG_TypeQuery SWIG_Python_TypeQuery
3130#if PY_VERSION_HEX >= 0x03000000
3131# define SWIG_init PyInit__pywrapsat
3134# define SWIG_init init_pywrapsat
3137#define SWIG_name "_pywrapsat"
3139#define SWIGVERSION 0x040002
3140#define SWIG_VERSION SWIGVERSION
3143#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
3144#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
3151 class SwigPtr_PyObject {
3179 Py_XINCREF(item._obj);
3193 operator PyObject *()
const
3207 struct SwigVar_PyObject : SwigPtr_PyObject {
3233#include "ortools/base/python-swig.h"
3236#include <functional>
3248 PyObject*
get()
const {
return obj_; }
3254 PyObject*
const obj_;
3257template <
typename ReturnT>
3260 ReturnT result = ReturnT();
3262 if (!PyErr_Occurred()) {
3263 PyErr_SetString(PyExc_RuntimeError,
3264 "SWIG std::function invocation failed.");
3268 if (!PyObjAs<ReturnT>(pyresult, &result)) {
3269 if (!PyErr_Occurred()) {
3270 PyErr_SetString(PyExc_RuntimeError,
3271 "SWIG std::function invocation failed.");
3274 Py_DECREF(pyresult);
3282 if (!PyErr_Occurred()) {
3283 PyErr_SetString(PyExc_RuntimeError,
3284 "SWIG std::function invocation failed.");
3287 Py_DECREF(pyresult);
3291template <
typename ReturnT,
typename... Args>
3293 const char* format, Args... args) {
3296 return HandleResult<ReturnT>(
3297 PyObject_CallFunction(pyfunc,
const_cast<char*
>(format), args...));
3300template <
typename ReturnT>
3302 return HandleResult<ReturnT>(PyObject_CallFunctionObjArgs(pyfunc,
nullptr));
3309#include "ortools/sat/swig_helper.h"
3313#if !defined(SWIG_NO_LLONG_MAX)
3314# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3315# define LLONG_MAX __LONG_LONG_MAX__
3316# define LLONG_MIN (-LLONG_MAX - 1LL)
3317# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3322#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
3323# define SWIG_LONG_LONG_AVAILABLE
3327#ifdef SWIG_LONG_LONG_AVAILABLE
3329SWIG_From_long_SS_long (
long long value)
3331 return ((
value < LONG_MIN) || (
value > LONG_MAX)) ?
3332 PyLong_FromLongLong(
value) : PyInt_FromLong(static_cast< long >(
value));
3337 #define SWIG_From_double PyFloat_FromDouble
3344 if (PyFloat_Check(obj)) {
3345 if (val) *val = PyFloat_AsDouble(obj);
3347#if PY_VERSION_HEX < 0x03000000
3348 }
else if (PyInt_Check(obj)) {
3349 if (val) *val = (double) PyInt_AsLong(obj);
3352 }
else if (PyLong_Check(obj)) {
3353 double v = PyLong_AsDouble(obj);
3354 if (!PyErr_Occurred()) {
3361#ifdef SWIG_PYTHON_CAST_MODE
3364 double d = PyFloat_AsDouble(obj);
3365 if (!PyErr_Occurred()) {
3372 long v = PyLong_AsLong(obj);
3373 if (!PyErr_Occurred()) {
3395 if ((
min <= x && x <=
max)) {
3396 double fx = floor(x);
3397 double cx = ceil(x);
3398 double rd = ((x - fx) < 0.5) ? fx : cx;
3399 if ((errno == EDOM) || (errno == ERANGE)) {
3402 double summ, reps, diff;
3405 }
else if (rd > x) {
3412 if (reps < 8*DBL_EPSILON) {
3425#if PY_VERSION_HEX < 0x03000000
3426 if (PyInt_Check(obj)) {
3427 if (val) *val = PyInt_AsLong(obj);
3431 if (PyLong_Check(obj)) {
3432 long v = PyLong_AsLong(obj);
3433 if (!PyErr_Occurred()) {
3441#ifdef SWIG_PYTHON_CAST_MODE
3444 long v = PyInt_AsLong(obj);
3445 if (!PyErr_Occurred()) {
3455 if (val) *val = (long)(d);
3471 if ((v < INT_MIN || v > INT_MAX)) {
3474 if (val) *val =
static_cast< int >(v);
3484 return PyBool_FromLong(
value ? 1 : 0);
3491 static int init = 0;
3505 if (size > INT_MAX) {
3507 return pchar_descriptor ?
3510#if PY_VERSION_HEX >= 0x03000000
3511#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3512 return PyBytes_FromStringAndSize(carray,
static_cast< Py_ssize_t
>(size));
3514 return PyUnicode_DecodeUTF8(carray,
static_cast< Py_ssize_t
>(size),
"surrogateescape");
3517 return PyString_FromStringAndSize(carray,
static_cast< Py_ssize_t
>(size));
3536#if PY_VERSION_HEX>=0x03000000
3537#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3538 if (PyBytes_Check(obj))
3540 if (PyUnicode_Check(obj))
3543 if (PyString_Check(obj))
3546 char *cstr; Py_ssize_t len;
3548#if PY_VERSION_HEX>=0x03000000
3549#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3550 if (!alloc && cptr) {
3557 obj = PyUnicode_AsUTF8String(obj);
3563 if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
3566 if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
3572 *cptr =
reinterpret_cast< char*
>(memcpy(
new char[len + 1], cstr,
sizeof(
char)*(len + 1)));
3579#if PY_VERSION_HEX>=0x03000000
3580#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3581 *cptr = PyBytes_AsString(obj);
3592 if (psize) *psize = len + 1;
3593#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3598#if defined(SWIG_PYTHON_2_UNICODE)
3599#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3600#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3602#if PY_VERSION_HEX<0x03000000
3603 if (PyUnicode_Check(obj)) {
3604 char *cstr; Py_ssize_t len;
3605 if (!alloc && cptr) {
3608 obj = PyUnicode_AsUTF8String(obj);
3611 if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3614 *cptr =
reinterpret_cast< char*
>(memcpy(
new char[len + 1], cstr,
sizeof(
char)*(len + 1)));
3616 if (psize) *psize = len + 1;
3628 if (pchar_descriptor) {
3631 if (cptr) *cptr = (
char *) vptr;
3632 if (psize) *psize = vptr ? (strlen((
char *)vptr) + 1) : 0;
3645 char* buf = 0 ;
size_t size = 0;
int alloc =
SWIG_OLDOBJ;
3648 if (val) *val =
new std::string(buf, size - 1);
3656 static int init = 0;
3696#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
3697 const size_t swig_method_index = 0;
3698 const char *
const swig_method_name =
"OnSolutionCallback";
3699 PyObject *method = swig_get_method(swig_method_index, swig_method_name);
3707 PyObject *error = PyErr_Occurred();
3721 PyObject *resultobj = 0;
3722 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3725 PyObject *swig_obj[1] ;
3731 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "delete_SolutionCallback" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
3733 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3747 PyObject *resultobj = 0;
3748 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3751 PyObject *swig_obj[1] ;
3753 bool upcall =
false;
3759 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_OnSolutionCallback" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3761 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3763 upcall = (director && (director->
swig_get_self()==swig_obj[0]));
3768 ((operations_research::sat::SolutionCallback
const *)arg1)->OnSolutionCallback();
3781 PyObject *resultobj = 0;
3782 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3785 PyObject *swig_obj[1] ;
3792 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumBooleans" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3794 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3797 result = (int64_t)((operations_research::sat::SolutionCallback
const *)arg1)->NumBooleans();
3800 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3808 PyObject *resultobj = 0;
3809 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3812 PyObject *swig_obj[1] ;
3819 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumBranches" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3821 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3824 result = (int64_t)((operations_research::sat::SolutionCallback
const *)arg1)->NumBranches();
3827 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3835 PyObject *resultobj = 0;
3836 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3839 PyObject *swig_obj[1] ;
3846 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumConflicts" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3848 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3851 result = (int64_t)((operations_research::sat::SolutionCallback
const *)arg1)->NumConflicts();
3854 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3862 PyObject *resultobj = 0;
3863 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3866 PyObject *swig_obj[1] ;
3873 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumBinaryPropagations" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3875 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3878 result = (int64_t)((operations_research::sat::SolutionCallback
const *)arg1)->NumBinaryPropagations();
3881 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3889 PyObject *resultobj = 0;
3890 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3893 PyObject *swig_obj[1] ;
3900 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_NumIntegerPropagations" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3902 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3905 result = (int64_t)((operations_research::sat::SolutionCallback
const *)arg1)->NumIntegerPropagations();
3908 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3916 PyObject *resultobj = 0;
3917 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3920 PyObject *swig_obj[1] ;
3927 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_WallTime" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3929 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3932 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->WallTime();
3943 PyObject *resultobj = 0;
3944 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3947 PyObject *swig_obj[1] ;
3954 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_UserTime" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3956 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3959 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->UserTime();
3970 PyObject *resultobj = 0;
3971 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
3974 PyObject *swig_obj[1] ;
3981 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_ObjectiveValue" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
3983 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
3986 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->ObjectiveValue();
3997 PyObject *resultobj = 0;
3998 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4001 PyObject *swig_obj[1] ;
4008 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_BestObjectiveBound" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
4010 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4013 result = (double)((operations_research::sat::SolutionCallback
const *)arg1)->BestObjectiveBound();
4024 PyObject *resultobj = 0;
4025 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4031 PyObject *swig_obj[2] ;
4037 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_SolutionIntegerValue" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
4039 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4044 arg2 =
static_cast< int >(val2);
4047 result = (int64_t)(arg1)->SolutionIntegerValue(arg2);
4050 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
4058 PyObject *resultobj = 0;
4059 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4065 PyObject *swig_obj[2] ;
4071 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_SolutionBooleanValue" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
4073 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4078 arg2 =
static_cast< int >(val2);
4081 result = (bool)(arg1)->SolutionBooleanValue(arg2);
4092 PyObject *resultobj = 0;
4093 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4096 PyObject *swig_obj[1] ;
4102 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_StopSearch" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
4104 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4107 (arg1)->StopSearch();
4118 PyObject *resultobj = 0;
4119 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4122 PyObject *swig_obj[1] ;
4129 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_Response" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
4131 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4134 result = ((operations_research::sat::SolutionCallback
const *)arg1)->Response();
4138 PyObject*
const module = PyImport_ImportModule(
"ortools.sat.cp_model_pb2");
4139 if (module !=
nullptr) {
4140 PyObject*
const dict = PyModule_GetDict(module);
4141 if (dict !=
nullptr) {
4142 PyObject*
const clss = PyDict_GetItemString(dict,
"CpSolverResponse");
4143 if (clss !=
nullptr) {
4144 std::string encoded_protobuf;
4145 (&result)->SerializeToString(&encoded_protobuf);
4147 PyObject*
const python_encoded_protobuf = PyBytes_FromStringAndSize(
4148 encoded_protobuf.c_str(), encoded_protobuf.size());
4153 PyObject*
const result = PyObject_CallMethod(
4154 clss,
const_cast<char*
>(
"FromString"),
4155 const_cast<char*
>(
"(O)"),
4156 python_encoded_protobuf);
4157 Py_DECREF(python_encoded_protobuf);
4171 PyObject *resultobj = 0;
4172 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4175 PyObject *swig_obj[1] ;
4182 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolutionCallback_HasResponse" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback const *""'");
4184 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4187 result = (bool)((operations_research::sat::SolutionCallback
const *)arg1)->HasResponse();
4198 PyObject *resultobj = 0;
4199 PyObject *arg1 = (PyObject *) 0 ;
4200 PyObject *swig_obj[1] ;
4201 operations_research::sat::SolutionCallback *result = 0 ;
4208 if ( arg1 != Py_None ) {
4212 SWIG_SetErrorMsg(PyExc_RuntimeError,
"accessing abstract class or protected constructor");
4226 PyObject *resultobj = 0;
4227 operations_research::sat::SolutionCallback *arg1 = (operations_research::sat::SolutionCallback *) 0 ;
4230 PyObject *swig_obj[1] ;
4236 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "disown_SolutionCallback" "', argument " "1"" of type '" "operations_research::sat::SolutionCallback *""'");
4238 arg1 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp1);
4267 PyObject *resultobj = 0;
4268 operations_research::sat::SolveWrapper *arg1 = (operations_research::sat::SolveWrapper *) 0 ;
4272 PyObject *swig_obj[2] ;
4277 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolveWrapper_SetParameters" "', argument " "1"" of type '" "operations_research::sat::SolveWrapper *""'");
4279 arg1 =
reinterpret_cast< operations_research::sat::SolveWrapper *
>(argp1);
4282 PyObject*
const pyresult = PyObject_CallMethod(
4283 swig_obj[1],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4284 if (pyresult !=
nullptr) {
4285 char* buffer =
nullptr;
4286 Py_ssize_t length = 0;
4287 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4288 if (buffer !=
nullptr) {
4289 arg2->ParseFromArray(buffer, length);
4291 Py_DECREF(pyresult);
4313 PyObject *resultobj = 0;
4314 operations_research::sat::SolveWrapper *arg1 = (operations_research::sat::SolveWrapper *) 0 ;
4315 operations_research::sat::SolutionCallback *arg2 = 0 ;
4320 PyObject *swig_obj[2] ;
4325 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolveWrapper_AddSolutionCallback" "', argument " "1"" of type '" "operations_research::sat::SolveWrapper *""'");
4327 arg1 =
reinterpret_cast< operations_research::sat::SolveWrapper *
>(argp1);
4330 SWIG_exception_fail(
SWIG_ArgError(res2),
"in method '" "SolveWrapper_AddSolutionCallback" "', argument " "2"" of type '" "operations_research::sat::SolutionCallback const &""'");
4333 SWIG_exception_fail(
SWIG_ValueError,
"invalid null reference " "in method '" "SolveWrapper_AddSolutionCallback" "', argument " "2"" of type '" "operations_research::sat::SolutionCallback const &""'");
4335 arg2 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp2);
4338 (arg1)->AddSolutionCallback((operations_research::sat::SolutionCallback
const &)*arg2);
4349 PyObject *resultobj = 0;
4350 operations_research::sat::SolveWrapper *arg1 = (operations_research::sat::SolveWrapper *) 0 ;
4351 operations_research::sat::SolutionCallback *arg2 = 0 ;
4356 PyObject *swig_obj[2] ;
4361 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolveWrapper_ClearSolutionCallback" "', argument " "1"" of type '" "operations_research::sat::SolveWrapper *""'");
4363 arg1 =
reinterpret_cast< operations_research::sat::SolveWrapper *
>(argp1);
4366 SWIG_exception_fail(
SWIG_ArgError(res2),
"in method '" "SolveWrapper_ClearSolutionCallback" "', argument " "2"" of type '" "operations_research::sat::SolutionCallback const &""'");
4369 SWIG_exception_fail(
SWIG_ValueError,
"invalid null reference " "in method '" "SolveWrapper_ClearSolutionCallback" "', argument " "2"" of type '" "operations_research::sat::SolutionCallback const &""'");
4371 arg2 =
reinterpret_cast< operations_research::sat::SolutionCallback *
>(argp2);
4374 (arg1)->ClearSolutionCallback((operations_research::sat::SolutionCallback
const &)*arg2);
4385 PyObject *resultobj = 0;
4386 operations_research::sat::SolveWrapper *arg1 = (operations_research::sat::SolveWrapper *) 0 ;
4387 SwigValueWrapper< std::function< void (std::string
const &) > > arg2 ;
4390 PyObject *swig_obj[2] ;
4395 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolveWrapper_AddLogCallback" "', argument " "1"" of type '" "operations_research::sat::SolveWrapper *""'");
4397 arg1 =
reinterpret_cast< operations_research::sat::SolveWrapper *
>(argp1);
4400 arg2 = [
input](
const std::string& str) {
4401 PyObject* py_str = PyUnicode_FromStringAndSize(str.c_str(), str.size());
4404 result = PyObject_CallFunction(
input.get(),
"O", py_str);
4412 (arg1)->AddLogCallback(arg2);
4423 PyObject *resultobj = 0;
4424 operations_research::sat::SolveWrapper *arg1 = (operations_research::sat::SolveWrapper *) 0 ;
4428 PyObject *swig_obj[2] ;
4436 arg1 =
reinterpret_cast< operations_research::sat::SolveWrapper *
>(argp1);
4439 PyObject*
const pyresult = PyObject_CallMethod(
4440 swig_obj[1],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4441 if (pyresult !=
nullptr) {
4442 char* buffer =
nullptr;
4443 Py_ssize_t length = 0;
4444 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4445 if (buffer !=
nullptr) {
4446 arg2->ParseFromArray(buffer, length);
4448 Py_DECREF(pyresult);
4457 PyObject*
const module = PyImport_ImportModule(
"ortools.sat.cp_model_pb2");
4458 if (module !=
nullptr) {
4459 PyObject*
const dict = PyModule_GetDict(module);
4460 if (dict !=
nullptr) {
4461 PyObject*
const clss = PyDict_GetItemString(dict,
"CpSolverResponse");
4462 if (clss !=
nullptr) {
4463 std::string encoded_protobuf;
4464 (&result)->SerializeToString(&encoded_protobuf);
4466 PyObject*
const python_encoded_protobuf = PyBytes_FromStringAndSize(
4467 encoded_protobuf.c_str(), encoded_protobuf.size());
4472 PyObject*
const result = PyObject_CallMethod(
4473 clss,
const_cast<char*
>(
"FromString"),
4474 const_cast<char*
>(
"(O)"),
4475 python_encoded_protobuf);
4476 Py_DECREF(python_encoded_protobuf);
4496 PyObject *resultobj = 0;
4497 operations_research::sat::SolveWrapper *arg1 = (operations_research::sat::SolveWrapper *) 0 ;
4500 PyObject *swig_obj[1] ;
4506 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SolveWrapper_StopSearch" "', argument " "1"" of type '" "operations_research::sat::SolveWrapper *""'");
4508 arg1 =
reinterpret_cast< operations_research::sat::SolveWrapper *
>(argp1);
4511 (arg1)->StopSearch();
4522 PyObject *resultobj = 0;
4523 operations_research::sat::SolveWrapper *result = 0 ;
4528 result = (operations_research::sat::SolveWrapper *)
new operations_research::sat::SolveWrapper();
4539 PyObject *resultobj = 0;
4540 operations_research::sat::SolveWrapper *arg1 = (operations_research::sat::SolveWrapper *) 0 ;
4543 PyObject *swig_obj[1] ;
4549 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "delete_SolveWrapper" "', argument " "1"" of type '" "operations_research::sat::SolveWrapper *""'");
4551 arg1 =
reinterpret_cast< operations_research::sat::SolveWrapper *
>(argp1);
4576 PyObject *resultobj = 0;
4578 PyObject *swig_obj[1] ;
4585 PyObject*
const pyresult = PyObject_CallMethod(
4586 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4587 if (pyresult !=
nullptr) {
4588 char* buffer =
nullptr;
4589 Py_ssize_t length = 0;
4590 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4591 if (buffer !=
nullptr) {
4592 arg1->ParseFromArray(buffer, length);
4594 Py_DECREF(pyresult);
4616 PyObject *resultobj = 0;
4618 PyObject *swig_obj[1] ;
4625 PyObject*
const pyresult = PyObject_CallMethod(
4626 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4627 if (pyresult !=
nullptr) {
4628 char* buffer =
nullptr;
4629 Py_ssize_t length = 0;
4630 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4631 if (buffer !=
nullptr) {
4632 arg1->ParseFromArray(buffer, length);
4634 Py_DECREF(pyresult);
4656 PyObject *resultobj = 0;
4658 PyObject *swig_obj[1] ;
4665 PyObject*
const pyresult = PyObject_CallMethod(
4666 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4667 if (pyresult !=
nullptr) {
4668 char* buffer =
nullptr;
4669 Py_ssize_t length = 0;
4670 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4671 if (buffer !=
nullptr) {
4672 arg1->ParseFromArray(buffer, length);
4674 Py_DECREF(pyresult);
4696 PyObject *resultobj = 0;
4700 PyObject *swig_obj[1] ;
4707 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "CpSatHelper_VariableDomain" "', argument " "1"" of type '" "operations_research::sat::IntegerVariableProto const &""'");
4710 SWIG_exception_fail(
SWIG_ValueError,
"invalid null reference " "in method '" "CpSatHelper_VariableDomain" "', argument " "1"" of type '" "operations_research::sat::IntegerVariableProto const &""'");
4726 PyObject *resultobj = 0;
4728 std::string *arg2 = 0 ;
4730 PyObject *swig_obj[2] ;
4736 PyObject*
const pyresult = PyObject_CallMethod(
4737 swig_obj[0],
const_cast<char*
>(
"SerializeToString"),
nullptr);
4738 if (pyresult !=
nullptr) {
4739 char* buffer =
nullptr;
4740 Py_ssize_t length = 0;
4741 int result = PyString_AsStringAndSize(pyresult, &buffer, &length);
4742 if (buffer !=
nullptr) {
4743 arg1->ParseFromArray(buffer, length);
4745 Py_DECREF(pyresult);
4749 std::string *ptr = (std::string *)0;
4755 SWIG_exception_fail(
SWIG_ValueError,
"invalid null reference " "in method '" "CpSatHelper_WriteModelToFile" "', argument " "2"" of type '" "std::string const &""'");
4780 PyObject *resultobj = 0;
4781 operations_research::sat::CpSatHelper *result = 0 ;
4786 result = (operations_research::sat::CpSatHelper *)
new operations_research::sat::CpSatHelper();
4797 PyObject *resultobj = 0;
4798 operations_research::sat::CpSatHelper *arg1 = (operations_research::sat::CpSatHelper *) 0 ;
4801 PyObject *swig_obj[1] ;
4809 arg1 =
reinterpret_cast< operations_research::sat::CpSatHelper *
>(argp1);
4874 { NULL, NULL, 0, NULL }
4878 { NULL, NULL, 0, NULL }
4952{0, 0, 0, 0.0, 0, 0}};
5006#define SWIGRUNTIME_DEBUG
5042 }
while (iter!= module_head);
5053 if (init == 0)
return;
5056#ifdef SWIGRUNTIME_DEBUG
5057 printf(
"SWIG_InitializeModule: size %lu\n", (
unsigned long)
swig_module.
size);
5064#ifdef SWIGRUNTIME_DEBUG
5074#ifdef SWIGRUNTIME_DEBUG
5075 printf(
"SWIG_InitializeModule: found type %s\n", type->
name);
5079#ifdef SWIGRUNTIME_DEBUG
5080 printf(
"SWIG_InitializeModule: found and overwrite type %s \n", type->
name);
5089 while (cast->
type) {
5092#ifdef SWIGRUNTIME_DEBUG
5093 printf(
"SWIG_InitializeModule: look cast %s\n", cast->
type->
name);
5097#ifdef SWIGRUNTIME_DEBUG
5098 if (ret) printf(
"SWIG_InitializeModule: found cast %s\n", ret->
name);
5103#ifdef SWIGRUNTIME_DEBUG
5104 printf(
"SWIG_InitializeModule: skip old type %s\n", ret->
name);
5111#ifdef SWIGRUNTIME_DEBUG
5112 if (ocast) printf(
"SWIG_InitializeModule: skip old cast %s\n", ret->
name);
5114 if (!ocast) ret = 0;
5119#ifdef SWIGRUNTIME_DEBUG
5120 printf(
"SWIG_InitializeModule: adding cast %s\n", cast->
type->
name);
5135#ifdef SWIGRUNTIME_DEBUG
5136 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
5141 while (cast->
type) {
5142 printf(
"SWIG_InitializeModule: cast type %s\n", cast->
type->
name);
5146 printf(
"---- Total casts: %d\n",j);
5148 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
5161 static int init_run = 0;
5163 if (init_run)
return;
5174 equiv = equiv->
next;
5195#define SWIG_newvarlink() SWIG_Python_newvarlink()
5196#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
5197#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
5205 PyObject *(*get_attr)(void);
5217#if PY_VERSION_HEX >= 0x03000000
5218 return PyUnicode_InternFromString(
"<Swig global variables>");
5220 return PyString_FromString(
"<Swig global variables>");
5226#if PY_VERSION_HEX >= 0x03000000
5227 PyObject *str = PyUnicode_InternFromString(
"(");
5232 tail = PyUnicode_FromString(
var->name);
5233 joined = PyUnicode_Concat(str,
tail);
5238 tail = PyUnicode_InternFromString(
", ");
5239 joined = PyUnicode_Concat(str,
tail);
5245 tail = PyUnicode_InternFromString(
")");
5246 joined = PyUnicode_Concat(str,
tail);
5251 PyObject *str = PyString_FromString(
"(");
5254 PyString_ConcatAndDel(&str,PyString_FromString(
var->name));
5255 if (
var->next) PyString_ConcatAndDel(&str,PyString_FromString(
", "));
5257 PyString_ConcatAndDel(&str,PyString_FromString(
")"));
5275 PyObject *res = NULL;
5278 if (strcmp(
var->name,n) == 0) {
5279 res = (*
var->get_attr)();
5284 if (res == NULL && !PyErr_Occurred()) {
5285 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
5295 if (strcmp(
var->name,n) == 0) {
5296 res = (*
var->set_attr)(p);
5301 if (res == 1 && !PyErr_Occurred()) {
5302 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
5309 static char varlink__doc__[] =
"Swig var link object";
5310 static PyTypeObject varlink_type;
5311 static int type_init = 0;
5313 const PyTypeObject tmp = {
5314#if PY_VERSION_HEX >= 0x03000000
5315 PyVarObject_HEAD_INIT(NULL, 0)
5317 PyObject_HEAD_INIT(NULL)
5344 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5347#if PY_VERSION_HEX >= 0x03040000
5350#if PY_VERSION_HEX >= 0x03080000
5353#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
5366 if (PyType_Ready(&varlink_type) < 0)
5369 return &varlink_type;
5379 return ((PyObject*) result);
5387 size_t size = strlen(
name)+1;
5401 static PyObject *globals = 0;
5417 for (i = 0; constants[i].
type; ++i) {
5418 switch(constants[i].type) {
5423 obj =
SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
5430 PyDict_SetItemString(d, constants[i].
name, obj);
5446 for (i = 0; methods[i].ml_name; ++i) {
5447 const char *c = methods[i].ml_doc;
5449 c = strstr(c,
"swig_ptr: ");
5453 const char *
name = c + 10;
5454 for (j = 0; const_table[j].
type; ++j) {
5455 if (strncmp(const_table[j].
name,
name,
5456 strlen(const_table[j].
name)) == 0) {
5457 ci = &(const_table[j]);
5464 size_t shift = (ci->
ptype) - types;
5466 size_t ldoc = (c - methods[i].ml_doc);
5467 size_t lptr = strlen(ty->
name)+2*
sizeof(
void*)+2;
5468 char *ndoc = (
char*)
malloc(ldoc + lptr + 10);
5471 memcpy(buff, methods[i].ml_doc, ldoc);
5473 memcpy(buff,
"swig_ptr: ", 10);
5476 methods[i].ml_doc = ndoc;
5514 if (PyCFunction_Check(func)) {
5515 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5518 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5520#if PY_VERSION_HEX >= 0x03000000
5521 return PyInstanceMethod_New(func);
5523 return PyMethod_New(func, NULL, NULL);
5533 if (PyCFunction_Check(func)) {
5534 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5537 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5539 return PyStaticMethod_New(func);
5555#if PY_VERSION_HEX >= 0x03000000
5561 PyObject *m, *d, *md, *globals;
5563#if PY_VERSION_HEX >= 0x03000000
5564 static struct PyModuleDef SWIG_module = {
5565 PyModuleDef_HEAD_INIT,
5577#if defined(SWIGPYTHON_BUILTIN)
5581 static PyGetSetDef this_getset_def = {
5582 (
char *)
"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
5584 static SwigPyGetSet thisown_getset_closure = {
5588 static PyGetSetDef thisown_getset_def = {
5589 (
char *)
"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
5591 PyTypeObject *builtin_pytype;
5592 int builtin_base_count;
5595 PyGetSetDescrObject *static_getset;
5596 PyTypeObject *metatype;
5597 PyTypeObject *swigpyobject;
5599 PyObject *public_interface, *public_symbol;
5600 PyObject *this_descr;
5601 PyObject *thisown_descr;
5605 (void)builtin_pytype;
5606 (void)builtin_base_count;
5607 (void)builtin_basetype;
5609 (void)static_getset;
5613 metatype = SwigPyObjectType();
5623#ifndef SWIGPYTHON_BUILTIN
5630#if PY_VERSION_HEX >= 0x03000000
5631 m = PyModule_Create(&SWIG_module);
5636 md = d = PyModule_GetDict(m);
5641#ifdef SWIGPYTHON_BUILTIN
5645 assert(SwigPyObject_stype);
5648 SwigPyObject_stype->
clientdata = &SwigPyObject_clientdata;
5649 SwigPyObject_clientdata.
pytype = swigpyobject;
5650 }
else if (swigpyobject->tp_basicsize != cd->
pytype->tp_basicsize) {
5651 PyErr_SetString(PyExc_RuntimeError,
"Import error: attempted to load two incompatible swig-generated modules.");
5652# if PY_VERSION_HEX >= 0x03000000
5665 (void)thisown_descr;
5667 public_interface = PyList_New(0);
5669 (void)public_symbol;
5671 PyDict_SetItemString(md,
"__all__", public_interface);
5672 Py_DECREF(public_interface);
5674 SwigPyBuiltin_AddPublicSymbol(public_interface,
SwigMethods[i].ml_name);
5684#if PY_VERSION_HEX >= 0x03000000
SharedPyPtr(const SharedPyPtr &other)
SharedPyPtr(PyObject *obj)
static void raise(PyObject *error, const char *msg)
static void raise(JNIEnv *jenv, jthrowable throwable)
static void raise(const char *msg)
DirectorException(const char *msg)
const char * what() const
DirectorException(PyObject *error, const char *hdr="", const char *msg="")
const char * getMessage() const
virtual ~DirectorException()
PyObject * swig_get_self() const
int swig_release_ownership(void *vptr) const
static PyObject * swig_pyobj_disown(PyObject *pyobj, PyObject *SWIGUNUSEDPARM(args))
jobject swig_get_self(JNIEnv *jenv) const
virtual void swig_set_inner(const char *, bool) const
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="")
static void raise(PyObject *error, const char *msg)
DirectorTypeMismatchException(PyObject *error, const char *msg="")
DirectorTypeMismatchException(const char *msg="")
static void raise(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].
PyObject * operator->() const
SwigPtr_PyObject(PyObject *obj, bool initial_ref=true)
SwigPtr_PyObject & operator=(const SwigPtr_PyObject &item)
SwigPtr_PyObject(const SwigPtr_PyObject &item)
absl::StatusOr< SolveResult > Solve(const Model &model, const SolverType solver_type, const SolveArguments &solve_args, const SolverInitArguments &init_args)
absl::Status ValidateModel(const ModelProto &model, const bool check_names)
Collection of objects used to extend the Constraint Solver library.
static int input(yyscan_t yyscanner)
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
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 * _wrap_SolutionCallback_NumIntegerPropagations(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_disown_SolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_CpSatHelper_VariableDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
#define SWIG_MangledTypeQuery(name)
SWIGINTERN PyObject * _wrap_SolutionCallback_SolutionIntegerValue(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)
static swig_type_info _swigt__p_long_long
SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
SWIGINTERN PyObject * _wrap_SolutionCallback_SolutionBooleanValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_operations_research__Domain
#define SWIG_TypeQuery(name)
#define SWIG_CheckState(r)
SWIGINTERN PyObject * _wrap_SolutionCallback_StopSearch(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_int[]
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront)
SWIGRUNTIME PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[])
SWIGINTERN PyObject * _wrap_delete_SolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
#define SWIG_POINTER_IMPLICIT_CONV
static ReturnT HandleResult(PyObject *pyresult)
SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
struct swig_cast_info swig_cast_info
SWIGINTERN PyObject * _wrap_SolutionCallback_OnSolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SolutionCallback_UserTime(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)
SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v)
SWIGINTERN PyObject * _wrap_SolveWrapper_AddSolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v)
SWIGRUNTIME PyTypeObject * SwigPyPacked_TypeOnce(void)
#define SWIG_PYTHON_THREAD_END_BLOCK
SWIGINTERN PyObject * _wrap_SolveWrapper_AddLogCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_RuntimeError
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
SWIGRUNTIME PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n)
SWIGINTERN PyObject * SWIG_Python_newvarlink(void)
struct swig_varlinkobject swig_varlinkobject
#define SWIG_NewClientData(obj)
static swig_type_info _swigt__p_operations_research__sat__SolutionCallback
static swig_cast_info _swigc__p_long_long[]
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
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)
SWIGINTERN PyObject * _wrap_SolutionCallback_Response(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_new_CpSatHelper(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_unsigned_long_long
#define SWIG_RUNTIME_VERSION
SWIGINTERN char * SWIG_Python_str_AsChar(PyObject *str)
SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self)
SWIGINTERN PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
#define SWIG_POINTER_NOSHADOW
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
static swig_type_info _swigt__p_short
SWIGINTERN PyObject * _wrap_CpSatHelper_WriteModelToFile(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
static PyMethodDef swigobject_methods[]
SWIGINTERN PyObject * _wrap_delete_SolveWrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
SWIGINTERN PyObject * _wrap_new_SolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
#define SWIG_InternalNewPointerObj(ptr, type, flags)
SWIGINTERN PyObject * _wrap_SolutionCallback_NumBranches(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
#define SWIG_exception_fail(code, msg)
#define SWIG_DIRECTOR_CAST(ARG)
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
SWIGINTERN PyObject * _wrap_CpSatHelper_ValidateModel(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
SWIGINTERN PyObject * _wrap_delete_CpSatHelper(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_AttributeError
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
static swig_module_info swig_module
static swig_cast_info _swigc__p_unsigned_char[]
SWIGINTERN PyObject * _wrap_SolutionCallback_WallTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_short[]
SWIGRUNTIME int SWIG_Python_TypeErrorOccurred(PyObject *obj)
SWIGRUNTIME void SWIG_Python_DestroyModule(PyObject *obj)
#define SWIG_SetModule(clientdata, pointer)
SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject *obj)
SWIGINTERN PyTypeObject * swig_varlink_type(void)
#define SWIGUNUSEDPARM(p)
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
#define SWIG_as_voidptr(a)
SWIGINTERN swig_type_info * SWIG_pchar_descriptor(void)
static swig_const_info swig_const_table[]
SWIGINTERN PyObject * SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op)
#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)
#define SWIG_ConvertPtr(obj, pptr, type, flags)
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
struct swig_const_info swig_const_info
void HandleResult< void >(PyObject *pyresult)
SWIGINTERN int SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name)
SWIGINTERN PyObject * _wrap_SolutionCallback_BestObjectiveBound(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
void *(* swig_converter_func)(void *, int *)
SWIGINTERN PyObject * _wrap_SolutionCallback_NumConflicts(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SolveWrapper_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERNINLINE PyObject * SWIG_From_std_string(const std::string &s)
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v)
#define SWIG_newvarlink()
SWIGRUNTIME void SWIG_Python_RaiseOrModifyTypeError(const char *message)
SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type)
#define SWIG_Python_str_DelForPy3(x)
static swig_cast_info _swigc__p_char[]
static swig_type_info _swigt__p_operations_research__sat__CpSatHelper
SWIGINTERN PyObject * SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
static swig_cast_info _swigc__p_unsigned_short[]
struct swig_globalvar swig_globalvar
#define SWIGPY_CAPSULE_NAME
SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags)
SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg)
SWIGINTERN PyObject * _wrap_SolveWrapper_SetParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERNINLINE PyObject * SWIG_FromCharPtrAndSize(const char *carray, size_t size)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
#define SWIG_NewPointerObj(ptr, type, flags)
SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module)
#define SWIG_GUARD(mutex)
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
SWIGINTERN PyObject * _wrap_SolveWrapper_ClearSolutionCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_POINTER_NO_NULL
#define SWIG_Python_str_FromFormat
#define SWIG_InstallConstants(d, constants)
struct swig_type_info *(* swig_dycast_func)(void **)
static PyMethodDef SwigMethods[]
#define SWIGTYPE_p_operations_research__sat__SolutionCallback
#define SWIG_NullReferenceError
SWIGINTERN PyObject * _wrap_SolutionCallback_HasResponse(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
static swig_cast_info _swigc__p_operations_research__sat__SolveWrapper[]
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
#define SWIG_POINTER_DISOWN
#define SWIG_STATIC_POINTER(var)
struct swig_type_info swig_type_info
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
SWIGINTERN PyObject * _wrap_CpSatHelper_ModelStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
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)
SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
SWIGINTERNINLINE PyObject * SWIG_From_bool(bool value)
SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
#define SWIG_NewPackedObj(ptr, sz, type)
SWIGINTERN PyObject * CpSatHelper_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_GetModule(clientdata)
static swig_cast_info _swigc__p_unsigned_int[]
static swig_type_info _swigt__p_int
SWIGINTERN PyObject * _wrap_SolutionCallback_NumBinaryPropagations(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SWIG_PropagateClientData(void)
SWIGINTERN PyObject * _wrap_SolveWrapper_StopSearch(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
SWIGINTERN PyObject * _wrap_SolutionCallback_NumBooleans(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
#define SWIGTYPE_p_operations_research__Domain
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
static PyMethodDef SwigMethods_proxydocs[]
SWIGRUNTIME PyObject * SWIG_This(void)
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
SWIGINTERN PyObject * SolutionCallback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN int SWIG_AsVal_int(PyObject *obj, int *val)
SWIGINTERN PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
#define SWIG_TYPE_TABLE_NAME
#define SWIG_BUILTIN_TP_INIT
static swig_type_info _swigt__p_unsigned_int
#define SWIG_CAST_NEW_MEMORY
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v)
SWIGINTERN int SWIG_AsVal_long(PyObject *obj, long *val)
SWIGINTERN PyObject * _wrap_new_SolveWrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_PYTHON_THREAD_END_ALLOW
struct swig_module_info swig_module_info
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
SWIGINTERN PyObject * SolveWrapper_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
static swig_cast_info _swigc__p_operations_research__sat__SolutionCallback[]
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
#define SWIGTYPE_p_operations_research__sat__CpSatHelper
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v))
static swig_type_info * swig_type_initial[]
static ReturnT InvokePythonCallableReturning(PyObject *pyfunc, const char *format, Args... args)
SWIGINTERN PyObject * SolveWrapper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
static swig_cast_info _swigc__p_operations_research__sat__CpSatHelper[]
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
SWIGINTERN PyObject * _wrap_SolutionCallback_ObjectiveValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
SWIGINTERN PyObject * _wrap_CpSatHelper_SolverResponseStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_operations_research__sat__IntegerVariableProto
#define SWIG_DivisionByZero
static swig_type_info _swigt__p_char
static swig_cast_info _swigc__p_operations_research__Domain[]
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
#define SWIG_OverflowError
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
SWIGINTERN PyObject * SolutionCallback_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGTYPE_p_operations_research__sat__SolveWrapper
SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc)
static swig_cast_info _swigc__p_unsigned_long_long[]
static swig_type_info _swigt__p_operations_research__sat__SolveWrapper
#define SWIGTYPE_p_operations_research__sat__IntegerVariableProto
SWIGINTERN PyObject * CpSatHelper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
static swig_type_info * swig_types[15]
SWIGRUNTIME PyObject * SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
#define SWIG_PYTHON_INITIALIZE_THREADS
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
#define SWIG_AddNewMask(r)
SWIGINTERN PyObject * SWIG_globals(void)
SWIGINTERN PyMethodDef * SWIG_PythonGetProxyDoc(const char *name)
#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)
#define SWIGRUNTIMEINLINE
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
std::optional< int64_t > end
GCItem * operator->() const
GCItem_var(GCItem *item=0)
GCItem_var & operator=(GCItem *item)
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