16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE 21 template<
typename T>
class SwigValueWrapper {
22 struct SwigMovePointer {
24 SwigMovePointer(T *p) : ptr(p) { }
25 ~SwigMovePointer() {
delete ptr; }
26 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0;
delete oldptr; ptr = rhs.ptr; rhs.ptr = 0;
return *
this; }
28 SwigValueWrapper& operator=(
const SwigValueWrapper<T>& rhs);
29 SwigValueWrapper(
const SwigValueWrapper<T>& rhs);
31 SwigValueWrapper() : pointer(0) { }
32 SwigValueWrapper& operator=(
const T& t) { SwigMovePointer tmp(
new T(t)); pointer = tmp;
return *
this; }
33 operator T&()
const {
return *pointer.ptr; }
34 T *operator&() {
return pointer.ptr; }
37 template <
typename T> T SwigValueInit() {
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR 49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) 50 # define SWIGTEMPLATEDISAMBIGUATOR template 51 # elif defined(__HP_aCC) 54 # define SWIGTEMPLATEDISAMBIGUATOR template 56 # define SWIGTEMPLATEDISAMBIGUATOR 62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) 63 # define SWIGINLINE inline 71 # if defined(__GNUC__) 72 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) 73 # define SWIGUNUSED __attribute__ ((__unused__)) 78 # define SWIGUNUSED __attribute__ ((__unused__)) 84 #ifndef SWIG_MSC_UNSUPPRESS_4505 85 # if defined(_MSC_VER) 86 # pragma warning(disable : 4505) 90 #ifndef SWIGUNUSEDPARM 92 # define SWIGUNUSEDPARM(p) 94 # define SWIGUNUSEDPARM(p) p SWIGUNUSED 100 # define SWIGINTERN static SWIGUNUSED 104 #ifndef SWIGINTERNINLINE 105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE 109 #if defined(__GNUC__) 110 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) 111 # ifndef GCC_HASCLASSVISIBILITY 112 # define GCC_HASCLASSVISIBILITY 118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 119 # if defined(STATIC_LINKED) 122 # define SWIGEXPORT __declspec(dllexport) 125 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) 126 # define SWIGEXPORT __attribute__ ((visibility("default"))) 135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) 136 # define SWIGSTDCALL __stdcall 143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) 144 # define _CRT_SECURE_NO_DEPRECATE 148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) 149 # define _SCL_SECURE_NO_DEPRECATE 153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) 154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 162 #ifdef __INTEL_COMPILER 163 # pragma warning disable 592 167 #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND) 172 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) 190 #define SWIG_RUNTIME_VERSION "4" 193 #ifdef SWIG_TYPE_TABLE 194 # define SWIG_QUOTE_STRING(x) #x 195 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) 196 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) 198 # define SWIG_TYPE_TABLE_NAME 211 # define SWIGRUNTIME SWIGINTERN 214 #ifndef SWIGRUNTIMEINLINE 215 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE 219 #ifndef SWIG_BUFFER_SIZE 220 # define SWIG_BUFFER_SIZE 1024 224 #define SWIG_POINTER_DISOWN 0x1 225 #define SWIG_CAST_NEW_MEMORY 0x2 226 #define SWIG_POINTER_NO_NULL 0x4 229 #define SWIG_POINTER_OWN 0x1 312 #define SWIG_ERROR (-1) 313 #define SWIG_IsOK(r) (r >= 0) 314 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) 317 #define SWIG_CASTRANKLIMIT (1 << 8) 319 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) 321 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) 323 #define SWIG_BADOBJ (SWIG_ERROR) 324 #define SWIG_OLDOBJ (SWIG_OK) 325 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) 326 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) 328 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) 329 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) 330 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) 331 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) 332 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) 333 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) 336 #if defined(SWIG_CASTRANK_MODE) 337 # ifndef SWIG_TypeRank 338 # define SWIG_TypeRank unsigned long 340 # ifndef SWIG_MAXCASTRANK 341 # define SWIG_MAXCASTRANK (2) 343 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) 344 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) 349 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
352 # define SWIG_AddCast(r) (r) 353 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) 363 typedef void *(*swig_converter_func)(
void *,
int *);
405 const char *f2,
const char *l2) {
406 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
407 while ((*f1 ==
' ') && (f1 != l1)) ++f1;
408 while ((*f2 ==
' ') && (f2 != l2)) ++f2;
409 if (*f1 != *f2)
return (*f1 > *f2) ? 1 : -1;
411 return (
int)((l1 - f1) - (l2 - f2));
421 const char* te = tb + strlen(tb);
423 while (equiv != 0 && *ne) {
424 for (nb = ne; *ne; ++ne) {
425 if (*ne ==
'|')
break;
450 if (strcmp(iter->
type->
name, c) == 0) {
451 if (iter == ty->
cast)
477 if (iter->
type == from) {
478 if (iter == ty->
cast)
510 if (!ty || !ty->
dcast)
return ty;
511 while (ty && (ty->
dcast)) {
512 ty = (*ty->
dcast)(ptr);
536 if (!type)
return NULL;
537 if (type->
str != NULL) {
538 const char *last_name = type->
str;
540 for (s = type->
str; *s; s++)
541 if (*s ==
'|') last_name = s+1;
589 size_t r = iter->
size - 1;
592 size_t i = (l + r) >> 1;
593 const char *iname = iter->
types[i]->
name;
595 int compare = strcmp(
name, iname);
597 return iter->
types[i];
598 }
else if (compare < 0) {
604 }
else if (compare > 0) {
613 }
while (iter != end);
640 for (; i < iter->
size; ++i) {
642 return iter->
types[i];
645 }
while (iter != end);
657 static const char hex[17] =
"0123456789abcdef";
658 const unsigned char *u = (
unsigned char *) ptr;
659 const unsigned char *eu = u + sz;
660 for (; u != eu; ++u) {
661 unsigned char uu = *u;
662 *(c++) = hex[(uu & 0xf0) >> 4];
663 *(c++) = hex[uu & 0xf];
673 unsigned char *u = (
unsigned char *) ptr;
674 const unsigned char *eu = u + sz;
675 for (; u != eu; ++u) {
678 if ((d >=
'0') && (d <=
'9'))
679 uu = (
unsigned char)((d -
'0') << 4);
680 else if ((d >=
'a') && (d <=
'f'))
681 uu = (
unsigned char)((d - (
'a'-10)) << 4);
685 if ((d >=
'0') && (d <=
'9'))
686 uu |= (
unsigned char)(d -
'0');
687 else if ((d >=
'a') && (d <=
'f'))
688 uu |= (
unsigned char)(d - (
'a'-10));
702 if ((2*
sizeof(
void *) + 2) > bsz)
return 0;
705 if (strlen(
name) + 1 > (bsz - (r - buff)))
return 0;
713 if (strcmp(c,
"NULL") == 0) {
726 size_t lname = (
name ? strlen(
name) : 0);
727 if ((2*sz + 2 + lname) > bsz)
return 0;
731 strncpy(r,
name,lname+1);
741 if (strcmp(c,
"NULL") == 0) {
756 #define SWIG_UnknownError -1 757 #define SWIG_IOError -2 758 #define SWIG_RuntimeError -3 759 #define SWIG_IndexError -4 760 #define SWIG_TypeError -5 761 #define SWIG_DivisionByZero -6 762 #define SWIG_OverflowError -7 763 #define SWIG_SyntaxError -8 764 #define SWIG_ValueError -9 765 #define SWIG_SystemError -10 766 #define SWIG_AttributeError -11 767 #define SWIG_MemoryError -12 768 #define SWIG_NullReferenceError -13 773 #if PY_VERSION_HEX >= 0x03000000 775 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) 776 #define PyInt_Check(x) PyLong_Check(x) 777 #define PyInt_AsLong(x) PyLong_AsLong(x) 778 #define PyInt_FromLong(x) PyLong_FromLong(x) 779 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x) 780 #define PyString_Check(name) PyBytes_Check(name) 781 #define PyString_FromString(x) PyUnicode_FromString(x) 782 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) 783 #define PyString_AsString(str) PyBytes_AsString(str) 784 #define PyString_Size(str) PyBytes_Size(str) 785 #define PyString_InternFromString(key) PyUnicode_InternFromString(key) 786 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE 787 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) 788 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) 793 # define Py_TYPE(op) ((op)->ob_type) 798 #if PY_VERSION_HEX >= 0x03000000 799 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat 801 # define SWIG_Python_str_FromFormat PyString_FromFormat 811 #if PY_VERSION_HEX >= 0x03000000 813 str = PyUnicode_AsUTF8String(str);
817 PyBytes_AsStringAndSize(str, &cstr, &len);
818 newstr = (
char *)
malloc(len+1);
819 memcpy(newstr, cstr, len+1);
824 return PyString_AsString(str);
828 #if PY_VERSION_HEX >= 0x03000000 829 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) 831 # define SWIG_Python_str_DelForPy3(x) 838 #if PY_VERSION_HEX >= 0x03000000 839 return PyUnicode_FromString(c);
841 return PyString_FromString(c);
846 # define PyObject_DEL PyObject_Del 851 # define SWIGPY_USE_CAPSULE 852 # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) 854 #if PY_VERSION_HEX < 0x03020000 855 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) 856 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) 857 #define Py_hash_t long 869 type = PyExc_MemoryError;
872 type = PyExc_IOError;
875 type = PyExc_RuntimeError;
878 type = PyExc_IndexError;
881 type = PyExc_TypeError;
884 type = PyExc_ZeroDivisionError;
887 type = PyExc_OverflowError;
890 type = PyExc_SyntaxError;
893 type = PyExc_ValueError;
896 type = PyExc_SystemError;
899 type = PyExc_AttributeError;
902 type = PyExc_RuntimeError;
913 PyObject *traceback = 0;
915 if (PyErr_Occurred())
916 PyErr_Fetch(&type, &
value, &traceback);
918 PyObject *old_str = PyObject_Str(
value);
923 PyErr_Format(type,
"%s %s", tmp, mesg);
925 PyErr_Format(type,
"%s", mesg);
930 PyErr_SetString(PyExc_RuntimeError, mesg);
940 error = PyErr_Occurred();
941 return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
950 PyObject *type = NULL, *
value = NULL, *traceback = NULL;
951 PyErr_Fetch(&type, &
value, &traceback);
952 #if PY_VERSION_HEX >= 0x03000000 953 newvalue = PyUnicode_FromFormat(
"%S\nAdditional information:\n%s",
value,
message);
955 newvalue = PyString_FromFormat(
"%s\nAdditional information:\n%s", PyString_AsString(
value),
message);
958 PyErr_Restore(type, newvalue, traceback);
961 PyErr_SetString(PyExc_TypeError,
message);
965 #if defined(SWIG_PYTHON_NO_THREADS) 966 # if defined(SWIG_PYTHON_THREADS) 967 # undef SWIG_PYTHON_THREADS 970 #if defined(SWIG_PYTHON_THREADS) 971 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) 972 # define SWIG_PYTHON_USE_GIL 974 # if defined(SWIG_PYTHON_USE_GIL) 975 # ifndef SWIG_PYTHON_INITIALIZE_THREADS 976 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() 979 class SWIG_Python_Thread_Block {
981 PyGILState_STATE state;
983 void end() {
if (status) { PyGILState_Release(state); status =
false;} }
984 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
985 ~SWIG_Python_Thread_Block() { end(); }
987 class SWIG_Python_Thread_Allow {
991 void end() {
if (status) { PyEval_RestoreThread(save); status =
false; }}
992 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
993 ~SWIG_Python_Thread_Allow() { end(); }
995 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block 996 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() 997 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow 998 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() 1000 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() 1001 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) 1002 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() 1003 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) 1006 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) 1007 # define SWIG_PYTHON_INITIALIZE_THREADS 1009 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) 1010 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK 1012 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK) 1013 # define SWIG_PYTHON_THREAD_END_BLOCK 1015 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) 1016 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW 1018 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW) 1019 # define SWIG_PYTHON_THREAD_END_ALLOW 1023 # define SWIG_PYTHON_INITIALIZE_THREADS 1024 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK 1025 # define SWIG_PYTHON_THREAD_END_BLOCK 1026 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW 1027 # define SWIG_PYTHON_THREAD_END_ALLOW 1043 #define SWIG_PY_POINTER 4 1044 #define SWIG_PY_BINARY 5 1070 #if PY_VERSION_HEX < 0x02070000 1071 # error "This version of SWIG only supports Python >= 2.7" 1074 #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000 1075 # error "This version of SWIG only supports Python 3 >= 3.2" 1081 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) 1082 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) 1083 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) 1085 #ifdef SWIGPYTHON_BUILTIN 1086 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) 1088 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) 1091 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) 1093 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) 1094 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) 1095 #define swig_owntype int 1098 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) 1099 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) 1102 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) 1103 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) 1106 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) 1107 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) 1110 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) 1111 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) 1116 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) 1117 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) 1118 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj) 1120 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj 1121 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg 1122 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) 1123 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 1124 #define SWIG_fail goto fail 1134 PyErr_SetObject(errtype, obj);
1142 PyErr_SetString(errtype, msg);
1146 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) 1150 #if defined(SWIGPYTHON_BUILTIN) 1153 SwigPyBuiltin_AddPublicSymbol(PyObject *seq,
const char *key) {
1154 PyObject *s = PyString_InternFromString(key);
1155 PyList_Append(seq, s);
1161 PyDict_SetItemString(d,
name, obj);
1163 if (public_interface)
1164 SwigPyBuiltin_AddPublicSymbol(public_interface,
name);
1171 PyDict_SetItemString(d,
name, obj);
1183 }
else if (result == Py_None) {
1187 if (!PyList_Check(result)) {
1188 PyObject *o2 = result;
1189 result = PyList_New(1);
1190 PyList_SetItem(result, 0, o2);
1192 PyList_Append(result,obj);
1207 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got none",
1212 if (!PyTuple_Check(args)) {
1213 if (min <= 1 && max >= 1) {
1216 for (i = 1; i <
max; ++i) {
1221 PyErr_SetString(PyExc_SystemError,
"UnpackTuple() argument list is not a tuple");
1224 Py_ssize_t l = PyTuple_GET_SIZE(args);
1226 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1229 }
else if (l >
max) {
1230 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1235 for (i = 0; i < l; ++i) {
1236 objs[i] = PyTuple_GET_ITEM(args, i);
1238 for (; l <
max; ++l) {
1247 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); 1254 #define SWIG_STATIC_POINTER(var) var 1256 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var 1264 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) 1265 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) 1267 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) 1269 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) 1270 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) 1281 PyObject *none = Py_None;
1295 PyTypeObject *pytype;
1304 PyErr_SetString(PyExc_TypeError,
"Implicit conversion is prohibited for explicit constructors.");
1311 PyObject *klass = data ? data->
klass : 0;
1312 return (klass ? klass : PyExc_RuntimeError);
1325 Py_INCREF(data->
klass);
1327 if (PyClass_Check(obj)) {
1332 data->
newraw = PyObject_GetAttrString(data->
klass,
"__new__");
1335 data->
newargs = PyTuple_New(1);
1336 PyTuple_SetItem(data->
newargs, 0, obj);
1343 data->
destroy = PyObject_GetAttrString(data->
klass,
"__swig_destroy__");
1344 if (PyErr_Occurred()) {
1351 flags = PyCFunction_GET_FLAGS(data->
destroy);
1352 data->
delargs = !(flags & (METH_O));
1364 Py_XDECREF(data->
newraw);
1377 #ifdef SWIGPYTHON_BUILTIN 1383 #ifdef SWIGPYTHON_BUILTIN 1386 SwigPyObject_get___dict__(PyObject *v, PyObject *
SWIGUNUSEDPARM(args))
1391 sobj->dict = PyDict_New();
1393 Py_INCREF(sobj->dict);
1402 return PyLong_FromVoidPtr(v->
ptr);
1408 PyObject *res = NULL;
1409 PyObject *args = PyTuple_New(1);
1414 #if PY_VERSION_HEX >= 0x03000000 1415 res = PyUnicode_Format(ofmt,args);
1417 res = PyString_Format(ofmt,args);
1446 # if PY_VERSION_HEX >= 0x03000000 1447 PyObject *joined = PyUnicode_Concat(repr, nrep);
1452 PyString_ConcatAndDel(&repr,nrep);
1471 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1479 if( op != Py_EQ && op != Py_NE ) {
1480 Py_INCREF(Py_NotImplemented);
1481 return Py_NotImplemented;
1490 #ifdef SWIGPYTHON_BUILTIN 1495 assert(SwigPyObject_stype);
1511 #ifdef SWIGPYTHON_BUILTIN 1513 if (PyType_IsSubtype(op->ob_type, target_tp))
1515 return (strcmp(op->ob_type->tp_name,
"SwigPyObject") == 0);
1518 || (strcmp(
Py_TYPE(op)->tp_name,
"SwigPyObject") == 0);
1533 PyObject *destroy = data ? data->
destroy : 0;
1545 PyObject *type = NULL, *
value = NULL, *traceback = NULL;
1546 PyErr_Fetch(&type, &
value, &traceback);
1554 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1555 PyObject *mself = PyCFunction_GET_SELF(destroy);
1556 res = ((*meth)(mself, v));
1559 PyErr_WriteUnraisable(destroy);
1561 PyErr_Restore(type,
value, traceback);
1565 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) 1568 printf(
"swig/python detected a memory leak of type '%s', no destructor found.\n", (
name ?
name :
"unknown"));
1581 PyErr_SetString(PyExc_TypeError,
"Attempt to append a non SwigPyObject");
1594 Py_INCREF(sobj->
next);
1621 if (!PyArg_UnpackTuple(args,
"own", 0, 1, &val)) {
1625 PyObject *obj = PyBool_FromLong(sobj->
own);
1627 if (PyObject_IsTrue(val)) {
1641 {
"own",
SwigPyObject_own, METH_VARARGS,
"returns/sets ownership of the pointer"},
1650 static char swigobject_doc[] =
"Swig object carries a C/C++ instance pointer";
1652 static PyNumberMethods SwigPyObject_as_number = {
1657 #
if PY_VERSION_HEX < 0x03000000
1673 #
if PY_VERSION_HEX < 0x03000000
1677 #if PY_VERSION_HEX < 0x03000000 1683 #if PY_VERSION_HEX < 0x03000000 1687 #if PY_VERSION_HEX >= 0x03050000 1688 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1689 #elif PY_VERSION_HEX >= 0x03000000 1690 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1692 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1696 static PyTypeObject swigpyobject_type;
1697 static int type_init = 0;
1699 const PyTypeObject tmp = {
1700 #if PY_VERSION_HEX >= 0x03000000 1701 PyVarObject_HEAD_INIT(NULL, 0)
1703 PyObject_HEAD_INIT(NULL)
1713 #if PY_VERSION_HEX >= 0x03000000 1719 &SwigPyObject_as_number,
1725 PyObject_GenericGetAttr,
1756 #
if PY_VERSION_HEX >= 0x03040000
1767 swigpyobject_type = tmp;
1769 if (PyType_Ready(&swigpyobject_type) < 0)
1772 return &swigpyobject_type;
1785 return (PyObject *)sobj;
1826 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1827 return s ? s : strncmp((
const char *)v->
pack, (
const char *)w->
pack, 2*v->
size);
1841 || (strcmp((op)->ob_type->tp_name,
"SwigPyPacked") == 0);
1856 static char swigpacked_doc[] =
"Swig object carries a C/C++ instance pointer";
1857 static PyTypeObject swigpypacked_type;
1858 static int type_init = 0;
1860 const PyTypeObject tmp = {
1861 #if PY_VERSION_HEX>=0x03000000 1862 PyVarObject_HEAD_INIT(NULL, 0)
1864 PyObject_HEAD_INIT(NULL)
1874 #if PY_VERSION_HEX>=0x03000000 1886 PyObject_GenericGetAttr,
1917 #
if PY_VERSION_HEX >= 0x03040000
1928 swigpypacked_type = tmp;
1930 if (PyType_Ready(&swigpypacked_type) < 0)
1933 return &swigpypacked_type;
1941 void *pack =
malloc(size);
1943 memcpy(pack, ptr, size);
1952 return (PyObject *) sobj;
1960 if (sobj->
size != size)
return 0;
1961 memcpy(ptr, sobj->
pack, size);
1985 #if PY_VERSION_HEX>=0x03000000 1986 #define SWIG_PYTHON_SLOW_GETSET_THIS 1997 #ifdef SWIGPYTHON_BUILTIN 1999 # ifdef PyWeakref_CheckProxy 2000 if (PyWeakref_CheckProxy(pyobj)) {
2001 pyobj = PyWeakref_GET_OBJECT(pyobj);
2011 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) 2012 if (PyInstance_Check(pyobj)) {
2013 obj = _PyInstance_Lookup(pyobj,
SWIG_This());
2015 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2016 if (dictptr != NULL) {
2017 PyObject *dict = *dictptr;
2018 obj = dict ? PyDict_GetItem(dict,
SWIG_This()) : 0;
2020 #ifdef PyWeakref_CheckProxy 2021 if (PyWeakref_CheckProxy(pyobj)) {
2022 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2026 obj = PyObject_GetAttr(pyobj,
SWIG_This());
2030 if (PyErr_Occurred()) PyErr_Clear();
2036 obj = PyObject_GetAttr(pyobj,
SWIG_This());
2040 if (PyErr_Occurred()) PyErr_Clear();
2060 int oldown = sobj->
own;
2078 if (obj == Py_None && !implicit_conv) {
2090 void *vptr = sobj->
ptr;
2095 if (ptr) *ptr = vptr;
2115 if (ptr) *ptr = vptr;
2121 *own = *own | sobj->
own;
2127 if (implicit_conv) {
2130 PyObject *klass = data->
klass;
2136 if (PyErr_Occurred()) {
2161 if (!
SWIG_IsOK(res) && obj == Py_None) {
2164 if (PyErr_Occurred())
2177 if (!PyCFunction_Check(obj)) {
2184 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2185 const char *desc = doc ? strstr(doc,
"swig_ptr: ") : 0;
2231 PyObject *newraw = data->
newraw;
2233 inst = PyObject_Call(newraw, data->
newargs, NULL);
2235 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) 2236 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2237 if (dictptr != NULL) {
2238 PyObject *dict = *dictptr;
2240 dict = PyDict_New();
2242 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2247 PyObject_SetAttr(inst, key, swig_this);
2251 #if PY_VERSION_HEX >= 0x03000000 2252 PyObject *empty_args = PyTuple_New(0);
2254 PyObject *empty_kwargs = PyDict_New();
2256 inst = ((PyTypeObject *)data->
newargs)->tp_new((PyTypeObject *)data->
newargs, empty_args, empty_kwargs);
2257 Py_DECREF(empty_kwargs);
2259 PyObject_SetAttr(inst,
SWIG_This(), swig_this);
2260 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2263 Py_DECREF(empty_args);
2266 PyObject *dict = PyDict_New();
2268 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2269 inst = PyInstance_NewRaw(data->
newargs, dict);
2281 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) 2282 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2283 if (dictptr != NULL) {
2286 dict = PyDict_New();
2289 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2293 dict = PyObject_GetAttrString(inst,
"__dict__");
2294 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2328 if (clientdata && clientdata->
pytype) {
2333 PyObject *next_self = clientdata->
pytype->tp_alloc(clientdata->
pytype, 0);
2334 while (newobj->
next)
2336 newobj->
next = next_self;
2338 #ifdef SWIGPYTHON_BUILTIN 2344 #ifdef SWIGPYTHON_BUILTIN 2353 return (PyObject*) newobj;
2380 #ifdef SWIG_LINK_RUNTIME 2381 void *SWIG_ReturnGlobalTypeList(
void *);
2386 static void *type_pointer = (
void *)0;
2388 if (!type_pointer) {
2389 #ifdef SWIG_LINK_RUNTIME 2390 type_pointer = SWIG_ReturnGlobalTypeList((
void *)0);
2393 if (PyErr_Occurred()) {
2395 type_pointer = (
void *)0;
2421 #if PY_VERSION_HEX >= 0x03000000 2425 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };
2426 PyObject *module = Py_InitModule(
"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2429 if (pointer && module) {
2432 Py_XDECREF(pointer);
2448 PyObject *obj = PyDict_GetItem(cache, key);
2456 obj = PyCapsule_New((
void*) descriptor, NULL, NULL);
2457 PyDict_SetItem(cache, key, obj);
2468 #define SWIG_POINTER_EXCEPTION 0 2469 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) 2470 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) 2475 if (PyErr_Occurred()) {
2477 PyObject *
value = 0;
2478 PyObject *traceback = 0;
2479 PyErr_Fetch(&type, &
value, &traceback);
2481 PyObject *old_str = PyObject_Str(
value);
2483 const char *errmesg = tmp ? tmp :
"Invalid error message";
2487 PyErr_Format(type,
"%s %s", mesg, errmesg);
2489 PyErr_Format(type,
"%s %s", errmesg, mesg);
2503 if (PyErr_Occurred()) {
2506 PyOS_snprintf(mesg,
sizeof(mesg),
"argument number %d:", argnum);
2518 return ty ? ty->
str :
"";
2525 #if defined(SWIG_COBJECT_TYPES) 2529 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, 'SwigPyObject(%s)' is received",
2536 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2538 PyObject *str = PyObject_Str(obj);
2541 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s(%s)' is received",
2545 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s' is received",
2552 PyErr_Format(PyExc_TypeError,
"a '%s' is expected", type);
2554 PyErr_Format(PyExc_TypeError,
"unexpected type is received");
2565 #if SWIG_POINTER_EXCEPTION 2575 #ifdef SWIGPYTHON_BUILTIN 2577 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *
name, PyObject *
value) {
2578 PyTypeObject *tp = obj->ob_type;
2580 PyObject *encoded_name;
2584 # ifdef Py_USING_UNICODE 2585 if (PyString_Check(
name)) {
2586 name = PyUnicode_Decode(PyString_AsString(
name), PyString_Size(
name), NULL, NULL);
2589 }
else if (!PyUnicode_Check(
name))
2591 if (!PyString_Check(
name))
2594 PyErr_Format(PyExc_TypeError,
"attribute name must be string, not '%.200s'",
name->ob_type->tp_name);
2601 if (PyType_Ready(tp) < 0)
2605 descr = _PyType_Lookup(tp,
name);
2608 f = descr->ob_type->tp_descr_set;
2610 if (PyString_Check(
name)) {
2611 encoded_name =
name;
2614 encoded_name = PyUnicode_AsUTF8String(
name);
2618 PyErr_Format(PyExc_AttributeError,
"'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2619 Py_DECREF(encoded_name);
2621 res = f(descr, obj,
value);
2637 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 2639 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 2658 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 2663 #define SWIGTYPE_p_ZVectorT_int_t swig_types[0] 2664 #define SWIGTYPE_p_ZVectorT_long_t swig_types[1] 2665 #define SWIGTYPE_p_char swig_types[2] 2666 #define SWIGTYPE_p_int swig_types[3] 2667 #define SWIGTYPE_p_long swig_types[4] 2668 #define SWIGTYPE_p_operations_research__EbertGraphT_int_int_t swig_types[5] 2669 #define SWIGTYPE_p_operations_research__ForwardEbertGraphT_int_int_t swig_types[6] 2670 #define SWIGTYPE_p_operations_research__ForwardStaticGraphT_int_int_t swig_types[7] 2671 #define SWIGTYPE_p_operations_research__MinCostFlowBase swig_types[8] 2672 #define SWIGTYPE_p_operations_research__SimpleLinearSumAssignment swig_types[9] 2673 #define SWIGTYPE_p_operations_research__SimpleMaxFlow swig_types[10] 2674 #define SWIGTYPE_p_operations_research__SimpleMinCostFlow swig_types[11] 2675 #define SWIGTYPE_p_short swig_types[12] 2676 #define SWIGTYPE_p_signed_char swig_types[13] 2677 #define SWIGTYPE_p_std__vectorT_int_t swig_types[14] 2678 #define SWIGTYPE_p_unsigned_char swig_types[15] 2679 #define SWIGTYPE_p_unsigned_int swig_types[16] 2680 #define SWIGTYPE_p_unsigned_long swig_types[17] 2681 #define SWIGTYPE_p_unsigned_short swig_types[18] 2684 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) 2685 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) 2689 #ifdef SWIG_TypeQuery 2690 # undef SWIG_TypeQuery 2692 #define SWIG_TypeQuery SWIG_Python_TypeQuery 2697 #if PY_VERSION_HEX >= 0x03000000 2698 # define SWIG_init PyInit__pywrapgraph 2701 # define SWIG_init init_pywrapgraph 2704 #define SWIG_name "_pywrapgraph" 2706 #define SWIGVERSION 0x040001 2707 #define SWIG_VERSION SWIGVERSION 2710 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 2711 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 2714 #include <stdexcept> 2718 class SwigPtr_PyObject {
2746 Py_XINCREF(item._obj);
2760 operator PyObject *()
const 2774 struct SwigVar_PyObject : SwigPtr_PyObject {
2797 #define SWIGWORDSIZE64 2801 #if (__WORDSIZE == 32) || (LONG_MAX == INT_MAX) 2802 # error "SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32" 2809 #include "ortools/base/python-swig.h" 2812 #include <functional> 2824 PyObject*
get()
const {
return obj_; }
2830 PyObject*
const obj_;
2833 template <
typename ReturnT>
2836 ReturnT result = ReturnT();
2838 if (!PyErr_Occurred()) {
2839 PyErr_SetString(PyExc_RuntimeError,
2840 "SWIG std::function invocation failed.");
2844 if (!PyObjAs<ReturnT>(pyresult, &result)) {
2845 if (!PyErr_Occurred()) {
2846 PyErr_SetString(PyExc_RuntimeError,
2847 "SWIG std::function invocation failed.");
2850 Py_DECREF(pyresult);
2858 if (!PyErr_Occurred()) {
2859 PyErr_SetString(PyExc_RuntimeError,
2860 "SWIG std::function invocation failed.");
2863 Py_DECREF(pyresult);
2867 template <
typename ReturnT,
typename... Args>
2869 const char* format, Args... args) {
2872 return HandleResult<ReturnT>(
2873 PyObject_CallFunction(pyfunc, const_cast<char*>(format), args...));
2876 template <
typename ReturnT>
2878 return HandleResult<ReturnT>(PyObject_CallFunctionObjArgs(pyfunc,
nullptr));
2890 #if !defined(SWIG_NO_LLONG_MAX) 2891 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) 2892 # define LLONG_MAX __LONG_LONG_MAX__ 2893 # define LLONG_MIN (-LLONG_MAX - 1LL) 2894 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) 2903 if (PyFloat_Check(obj)) {
2904 if (val) *val = PyFloat_AsDouble(obj);
2906 #if PY_VERSION_HEX < 0x03000000 2907 }
else if (PyInt_Check(obj)) {
2908 if (val) *val = (double) PyInt_AsLong(obj);
2911 }
else if (PyLong_Check(obj)) {
2912 double v = PyLong_AsDouble(obj);
2913 if (!PyErr_Occurred()) {
2920 #ifdef SWIG_PYTHON_CAST_MODE 2923 double d = PyFloat_AsDouble(obj);
2924 if (!PyErr_Occurred()) {
2931 long v = PyLong_AsLong(obj);
2932 if (!PyErr_Occurred()) {
2954 if ((
min <= x && x <=
max)) {
2955 double fx = floor(x);
2956 double cx = ceil(x);
2957 double rd = ((x - fx) < 0.5) ? fx : cx;
2958 if ((errno == EDOM) || (errno == ERANGE)) {
2961 double summ, reps, diff;
2964 }
else if (rd > x) {
2971 if (reps < 8*DBL_EPSILON) {
2984 #if PY_VERSION_HEX < 0x03000000 2985 if (PyInt_Check(obj)) {
2986 if (val) *val = PyInt_AsLong(obj);
2990 if (PyLong_Check(obj)) {
2991 long v = PyLong_AsLong(obj);
2992 if (!PyErr_Occurred()) {
3000 #ifdef SWIG_PYTHON_CAST_MODE 3003 long v = PyInt_AsLong(obj);
3004 if (!PyErr_Occurred()) {
3014 if (val) *val = (long)(d);
3030 if ((v < INT_MIN || v > INT_MAX)) {
3033 if (val) *val = static_cast< int >(v);
3043 return PyInt_FromLong((
long)
value);
3047 #define SWIG_From_long PyInt_FromLong 3053 return PyBool_FromLong(
value ? 1 : 0);
3060 PyObject *resultobj = 0;
3073 PyObject *resultobj = 0;
3086 PyObject *swig_obj[4] ;
3092 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3094 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3097 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3099 arg2 = static_cast< operations_research::NodeIndex >(val2);
3102 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
3104 arg3 = static_cast< operations_research::NodeIndex >(val3);
3107 SWIG_exception_fail(
SWIG_ArgError(ecode4),
"in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "4"" of type '" "operations_research::FlowQuantity""'");
3109 arg4 = static_cast< operations_research::FlowQuantity >(val4);
3119 PyObject *resultobj = 0;
3123 PyObject *swig_obj[1] ;
3130 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_NumNodes" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3132 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3142 PyObject *resultobj = 0;
3146 PyObject *swig_obj[1] ;
3153 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_NumArcs" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3155 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3165 PyObject *resultobj = 0;
3172 PyObject *swig_obj[2] ;
3178 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_Tail" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3180 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3185 arg2 = static_cast< operations_research::ArcIndex >(val2);
3195 PyObject *resultobj = 0;
3202 PyObject *swig_obj[2] ;
3208 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_Head" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3210 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3215 arg2 = static_cast< operations_research::ArcIndex >(val2);
3225 PyObject *resultobj = 0;
3232 PyObject *swig_obj[2] ;
3238 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_Capacity" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3240 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3245 arg2 = static_cast< operations_research::ArcIndex >(val2);
3255 PyObject *resultobj = 0;
3265 PyObject *swig_obj[3] ;
3273 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3278 arg2 = static_cast< operations_research::NodeIndex >(val2);
3283 arg3 = static_cast< operations_research::NodeIndex >(val3);
3293 PyObject *resultobj = 0;
3297 PyObject *swig_obj[1] ;
3304 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_OptimalFlow" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3306 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3316 PyObject *resultobj = 0;
3323 PyObject *swig_obj[2] ;
3329 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_Flow" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3331 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3336 arg2 = static_cast< operations_research::ArcIndex >(val2);
3346 PyObject *resultobj = 0;
3348 std::vector< operations_research::NodeIndex > *arg2 = (std::vector< operations_research::NodeIndex > *) 0 ;
3351 std::vector< int > temp2 ;
3352 PyObject *swig_obj[1] ;
3361 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_GetSourceSideMinCut" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3363 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3364 (arg1)->GetSourceSideMinCut(arg2);
3376 PyObject *resultobj = 0;
3378 std::vector< operations_research::NodeIndex > *arg2 = (std::vector< operations_research::NodeIndex > *) 0 ;
3381 std::vector< int > temp2 ;
3382 PyObject *swig_obj[1] ;
3391 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_GetSinkSideMinCut" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3393 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3394 (arg1)->GetSinkSideMinCut(arg2);
3406 PyObject *resultobj = 0;
3416 PyObject *swig_obj[3] ;
3421 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_SetArcCapacity" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3423 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3426 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "SimpleMaxFlow_SetArcCapacity" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3428 arg2 = static_cast< operations_research::ArcIndex >(val2);
3431 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "SimpleMaxFlow_SetArcCapacity" "', argument " "3"" of type '" "operations_research::FlowQuantity""'");
3433 arg3 = static_cast< operations_research::FlowQuantity >(val3);
3434 (arg1)->SetArcCapacity(arg2,arg3);
3443 PyObject *resultobj = 0;
3447 PyObject *swig_obj[1] ;
3455 arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3476 PyObject *resultobj = 0;
3489 PyObject *resultobj = 0;
3493 PyObject *swig_obj[1] ;
3499 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "delete_MinCostFlowBase" "', argument " "1"" of type '" "operations_research::MinCostFlowBase *""'");
3501 arg1 = reinterpret_cast< operations_research::MinCostFlowBase * >(argp1);
3522 PyObject *resultobj = 0;
3531 if ((nobjs < 2) || (nobjs > 2))
SWIG_fail;
3536 arg1 = static_cast< operations_research::NodeIndex >(val1);
3541 arg2 = static_cast< operations_research::ArcIndex >(val2);
3551 PyObject *resultobj = 0;
3557 if ((nobjs < 1) || (nobjs > 1))
SWIG_fail;
3562 arg1 = static_cast< operations_research::NodeIndex >(val1);
3572 PyObject *resultobj = 0;
3575 if ((nobjs < 0) || (nobjs > 0))
SWIG_fail;
3586 PyObject *argv[3] = {
3624 " Possible C/C++ prototypes are:\n" 3625 " operations_research::SimpleMinCostFlow::SimpleMinCostFlow(operations_research::NodeIndex,operations_research::ArcIndex)\n" 3626 " operations_research::SimpleMinCostFlow::SimpleMinCostFlow(operations_research::NodeIndex)\n" 3627 " operations_research::SimpleMinCostFlow::SimpleMinCostFlow()\n");
3633 PyObject *resultobj = 0;
3649 PyObject *swig_obj[5] ;
3655 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3657 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3660 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3662 arg2 = static_cast< operations_research::NodeIndex >(val2);
3665 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
3667 arg3 = static_cast< operations_research::NodeIndex >(val3);
3670 SWIG_exception_fail(
SWIG_ArgError(ecode4),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "4"" of type '" "operations_research::FlowQuantity""'");
3672 arg4 = static_cast< operations_research::FlowQuantity >(val4);
3675 SWIG_exception_fail(
SWIG_ArgError(ecode5),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "5"" of type '" "operations_research::CostValue""'");
3677 arg5 = static_cast< operations_research::CostValue >(val5);
3687 PyObject *resultobj = 0;
3697 PyObject *swig_obj[3] ;
3702 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_SetNodeSupply" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3704 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3707 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "SimpleMinCostFlow_SetNodeSupply" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3709 arg2 = static_cast< operations_research::NodeIndex >(val2);
3712 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "SimpleMinCostFlow_SetNodeSupply" "', argument " "3"" of type '" "operations_research::FlowQuantity""'");
3714 arg3 = static_cast< operations_research::FlowQuantity >(val3);
3715 (arg1)->SetNodeSupply(arg2,arg3);
3724 PyObject *resultobj = 0;
3728 PyObject *swig_obj[1] ;
3735 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Solve" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3737 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3747 PyObject *resultobj = 0;
3751 PyObject *swig_obj[1] ;
3758 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_SolveMaxFlowWithMinCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3760 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3770 PyObject *resultobj = 0;
3774 PyObject *swig_obj[1] ;
3781 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_OptimalCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3783 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3793 PyObject *resultobj = 0;
3797 PyObject *swig_obj[1] ;
3804 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_MaximumFlow" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3806 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3816 PyObject *resultobj = 0;
3823 PyObject *swig_obj[2] ;
3829 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Flow" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3831 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3836 arg2 = static_cast< operations_research::ArcIndex >(val2);
3846 PyObject *resultobj = 0;
3850 PyObject *swig_obj[1] ;
3857 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_NumNodes" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3859 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3869 PyObject *resultobj = 0;
3873 PyObject *swig_obj[1] ;
3880 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_NumArcs" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3882 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3892 PyObject *resultobj = 0;
3899 PyObject *swig_obj[2] ;
3905 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Tail" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3907 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3912 arg2 = static_cast< operations_research::ArcIndex >(val2);
3922 PyObject *resultobj = 0;
3929 PyObject *swig_obj[2] ;
3935 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Head" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3937 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3942 arg2 = static_cast< operations_research::ArcIndex >(val2);
3952 PyObject *resultobj = 0;
3959 PyObject *swig_obj[2] ;
3965 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Capacity" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3967 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3972 arg2 = static_cast< operations_research::ArcIndex >(val2);
3982 PyObject *resultobj = 0;
3989 PyObject *swig_obj[2] ;
3995 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Supply" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3997 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
4002 arg2 = static_cast< operations_research::NodeIndex >(val2);
4012 PyObject *resultobj = 0;
4019 PyObject *swig_obj[2] ;
4025 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_UnitCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
4027 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
4032 arg2 = static_cast< operations_research::ArcIndex >(val2);
4042 PyObject *resultobj = 0;
4046 PyObject *swig_obj[1] ;
4052 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "delete_SimpleMinCostFlow" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
4054 arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
4075 PyObject *resultobj = 0;
4088 PyObject *resultobj = 0;
4101 PyObject *swig_obj[4] ;
4107 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment *""'");
4109 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4112 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4114 arg2 = static_cast< operations_research::NodeIndex >(val2);
4117 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
4119 arg3 = static_cast< operations_research::NodeIndex >(val3);
4122 SWIG_exception_fail(
SWIG_ArgError(ecode4),
"in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "4"" of type '" "operations_research::CostValue""'");
4124 arg4 = static_cast< operations_research::CostValue >(val4);
4134 PyObject *resultobj = 0;
4138 PyObject *swig_obj[1] ;
4145 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_NumNodes" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4147 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4157 PyObject *resultobj = 0;
4161 PyObject *swig_obj[1] ;
4168 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_NumArcs" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4170 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4180 PyObject *resultobj = 0;
4187 PyObject *swig_obj[2] ;
4193 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_LeftNode" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4195 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4198 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_LeftNode" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
4200 arg2 = static_cast< operations_research::ArcIndex >(val2);
4210 PyObject *resultobj = 0;
4217 PyObject *swig_obj[2] ;
4223 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_RightNode" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4225 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4228 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_RightNode" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
4230 arg2 = static_cast< operations_research::ArcIndex >(val2);
4240 PyObject *resultobj = 0;
4247 PyObject *swig_obj[2] ;
4253 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_Cost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4255 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4260 arg2 = static_cast< operations_research::ArcIndex >(val2);
4270 PyObject *resultobj = 0;
4274 PyObject *swig_obj[1] ;
4281 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_Solve" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment *""'");
4283 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4293 PyObject *resultobj = 0;
4297 PyObject *swig_obj[1] ;
4304 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_OptimalCost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4306 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4316 PyObject *resultobj = 0;
4323 PyObject *swig_obj[2] ;
4329 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_RightMate" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4331 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4334 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_RightMate" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4336 arg2 = static_cast< operations_research::NodeIndex >(val2);
4346 PyObject *resultobj = 0;
4353 PyObject *swig_obj[2] ;
4359 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_AssignmentCost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4361 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4364 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_AssignmentCost" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4366 arg2 = static_cast< operations_research::NodeIndex >(val2);
4376 PyObject *resultobj = 0;
4380 PyObject *swig_obj[1] ;
4386 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "delete_LinearSumAssignment" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment *""'");
4388 arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4409 PyObject *resultobj = 0;
4413 std::function< int64_t (
int,
int) > arg4 ;
4415 std::vector< int > *arg6 = (std::vector< int > *) 0 ;
4424 std::vector< int > temp6 ;
4425 PyObject *swig_obj[5] ;
4436 arg1 = static_cast< int >(val1);
4441 arg2 = static_cast< int >(val2);
4446 arg3 = static_cast< int >(val3);
4449 arg4 = [
input](
int i,
int j) {
4450 return InvokePythonCallableReturning<int64_t>(
input.get(),
"ii", i, j);
4457 arg5 = static_cast< int64_t >(val5);
4470 PyObject *resultobj = 0;
4474 std::function< int64_t (
int,
int) > arg4 ;
4476 std::vector< int > *arg6 = (std::vector< int > *) 0 ;
4485 std::vector< int > temp6 ;
4486 PyObject *swig_obj[5] ;
4497 arg1 = static_cast< int >(val1);
4502 arg2 = static_cast< int >(val2);
4507 arg3 = static_cast< int >(val3);
4510 arg4 = [
input](
int i,
int j) {
4511 return InvokePythonCallableReturning<int64_t>(
input.get(),
"ii", i, j);
4518 arg5 = static_cast< int64_t >(val5);
4531 PyObject *resultobj = 0;
4535 std::function< int64_t (
int,
int) > arg4 ;
4536 std::function< int64_t (
int) > arg5 ;
4538 std::vector< int > *arg7 = (std::vector< int > *) 0 ;
4547 std::vector< int > temp7 ;
4548 PyObject *swig_obj[6] ;
4559 arg1 = static_cast< int >(val1);
4564 arg2 = static_cast< int >(val2);
4569 arg3 = static_cast< int >(val3);
4572 arg4 = [
input](
int i,
int j) {
4573 return InvokePythonCallableReturning<int64_t>(
input.get(),
"ii", i, j);
4579 return InvokePythonCallableReturning<int64_t>(
input.get(),
"(i)",
index);
4586 arg6 = static_cast< int64_t >(val6);
4655 { NULL, NULL, 0, NULL }
4659 { NULL, NULL, 0, NULL }
4671 static swig_type_info _swigt__p_int = {
"_p_int",
"int *|int_least32_t *|operations_research::NodeIndex *|int32_t *|operations_research::ArcIndex *", 0, 0, (
void*)0, 0};
4672 static swig_type_info _swigt__p_long = {
"_p_long",
"intptr_t *|operations_research::CostValue *|int_least64_t *|int_fast32_t *|int_fast64_t *|int64_t *|operations_research::FlowQuantity *|long *|int_fast16_t *|intmax_t *", 0, 0, (
void*)0, 0};
4685 static swig_type_info _swigt__p_unsigned_long = {
"_p_unsigned_long",
"uintptr_t *|uint_least64_t *|uint_fast32_t *|uint_fast64_t *|uint64_t *|unsigned long *|uint_fast16_t *|uintmax_t *", 0, 0, (
void*)0, 0};
4718 static swig_cast_info _swigc__p_operations_research__MinCostFlowBase[] = { {&
_swigt__p_operations_research__SimpleMinCostFlow,
_p_operations_research__SimpleMinCostFlowTo_p_operations_research__MinCostFlowBase, 0, 0}, {&
_swigt__p_operations_research__MinCostFlowBase, 0, 0, 0},{0, 0, 0, 0}};
4756 {0, 0, 0, 0.0, 0, 0}};
4810 #define SWIGRUNTIME_DEBUG 4846 }
while (iter!= module_head);
4857 if (init == 0)
return;
4860 #ifdef SWIGRUNTIME_DEBUG 4861 printf(
"SWIG_InitializeModule: size %lu\n", (
unsigned long)
swig_module.
size);
4868 #ifdef SWIGRUNTIME_DEBUG 4878 #ifdef SWIGRUNTIME_DEBUG 4879 printf(
"SWIG_InitializeModule: found type %s\n", type->
name);
4883 #ifdef SWIGRUNTIME_DEBUG 4884 printf(
"SWIG_InitializeModule: found and overwrite type %s \n", type->
name);
4893 while (cast->
type) {
4896 #ifdef SWIGRUNTIME_DEBUG 4897 printf(
"SWIG_InitializeModule: look cast %s\n", cast->
type->
name);
4901 #ifdef SWIGRUNTIME_DEBUG 4902 if (ret) printf(
"SWIG_InitializeModule: found cast %s\n", ret->
name);
4907 #ifdef SWIGRUNTIME_DEBUG 4908 printf(
"SWIG_InitializeModule: skip old type %s\n", ret->
name);
4915 #ifdef SWIGRUNTIME_DEBUG 4916 if (ocast) printf(
"SWIG_InitializeModule: skip old cast %s\n", ret->
name);
4918 if (!ocast) ret = 0;
4923 #ifdef SWIGRUNTIME_DEBUG 4924 printf(
"SWIG_InitializeModule: adding cast %s\n", cast->
type->
name);
4939 #ifdef SWIGRUNTIME_DEBUG 4940 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
4945 while (cast->
type) {
4946 printf(
"SWIG_InitializeModule: cast type %s\n", cast->
type->
name);
4950 printf(
"---- Total casts: %d\n",j);
4952 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
4965 static int init_run = 0;
4967 if (init_run)
return;
4978 equiv = equiv->
next;
4999 #define SWIG_newvarlink() SWIG_Python_newvarlink() 5000 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) 5001 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) 5009 PyObject *(*get_attr)(void);
5021 #if PY_VERSION_HEX >= 0x03000000 5022 return PyUnicode_InternFromString(
"<Swig global variables>");
5024 return PyString_FromString(
"<Swig global variables>");
5030 #if PY_VERSION_HEX >= 0x03000000 5031 PyObject *str = PyUnicode_InternFromString(
"(");
5036 tail = PyUnicode_FromString(
var->name);
5037 joined = PyUnicode_Concat(str,
tail);
5042 tail = PyUnicode_InternFromString(
", ");
5043 joined = PyUnicode_Concat(str,
tail);
5049 tail = PyUnicode_InternFromString(
")");
5050 joined = PyUnicode_Concat(str,
tail);
5055 PyObject *str = PyString_FromString(
"(");
5058 PyString_ConcatAndDel(&str,PyString_FromString(
var->name));
5059 if (
var->next) PyString_ConcatAndDel(&str,PyString_FromString(
", "));
5061 PyString_ConcatAndDel(&str,PyString_FromString(
")"));
5079 PyObject *res = NULL;
5082 if (strcmp(
var->name,n) == 0) {
5083 res = (*
var->get_attr)();
5088 if (res == NULL && !PyErr_Occurred()) {
5089 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
5099 if (strcmp(
var->name,n) == 0) {
5100 res = (*
var->set_attr)(p);
5105 if (res == 1 && !PyErr_Occurred()) {
5106 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
5113 static char varlink__doc__[] =
"Swig var link object";
5114 static PyTypeObject varlink_type;
5115 static int type_init = 0;
5117 const PyTypeObject tmp = {
5118 #if PY_VERSION_HEX >= 0x03000000 5119 PyVarObject_HEAD_INIT(NULL, 0)
5121 PyObject_HEAD_INIT(NULL)
5148 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5151 #if PY_VERSION_HEX >= 0x03040000 5164 if (PyType_Ready(&varlink_type) < 0)
5167 return &varlink_type;
5177 return ((PyObject*) result);
5185 size_t size = strlen(
name)+1;
5199 static PyObject *globals = 0;
5215 for (i = 0; constants[i].
type; ++i) {
5216 switch(constants[i].type) {
5221 obj =
SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
5228 PyDict_SetItemString(d, constants[i].
name, obj);
5244 for (i = 0; methods[i].ml_name; ++i) {
5245 const char *c = methods[i].ml_doc;
5247 c = strstr(c,
"swig_ptr: ");
5251 const char *
name = c + 10;
5252 for (j = 0; const_table[j].
type; ++j) {
5253 if (strncmp(const_table[j].
name,
name,
5254 strlen(const_table[j].
name)) == 0) {
5255 ci = &(const_table[j]);
5262 size_t shift = (ci->
ptype) - types;
5264 size_t ldoc = (c - methods[i].ml_doc);
5265 size_t lptr = strlen(ty->
name)+2*
sizeof(
void*)+2;
5266 char *ndoc = (
char*)
malloc(ldoc + lptr + 10);
5269 memcpy(buff, methods[i].ml_doc, ldoc);
5271 memcpy(buff,
"swig_ptr: ", 10);
5274 methods[i].ml_doc = ndoc;
5312 if (PyCFunction_Check(func)) {
5313 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5316 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5318 #if PY_VERSION_HEX >= 0x03000000 5319 return PyInstanceMethod_New(func);
5321 return PyMethod_New(func, NULL, NULL);
5331 if (PyCFunction_Check(func)) {
5332 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5335 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5337 return PyStaticMethod_New(func);
5353 #if PY_VERSION_HEX >= 0x03000000 5359 PyObject *m, *d, *md, *globals;
5361 #if PY_VERSION_HEX >= 0x03000000 5362 static struct PyModuleDef SWIG_module = {
5363 PyModuleDef_HEAD_INIT,
5375 #if defined(SWIGPYTHON_BUILTIN) 5379 static PyGetSetDef this_getset_def = {
5380 (
char *)
"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
5382 static SwigPyGetSet thisown_getset_closure = {
5386 static PyGetSetDef thisown_getset_def = {
5387 (
char *)
"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
5389 PyTypeObject *builtin_pytype;
5390 int builtin_base_count;
5393 PyGetSetDescrObject *static_getset;
5394 PyTypeObject *metatype;
5395 PyTypeObject *swigpyobject;
5397 PyObject *public_interface, *public_symbol;
5398 PyObject *this_descr;
5399 PyObject *thisown_descr;
5403 (void)builtin_pytype;
5404 (void)builtin_base_count;
5405 (void)builtin_basetype;
5407 (void)static_getset;
5411 metatype = SwigPyObjectType();
5421 #ifndef SWIGPYTHON_BUILTIN 5428 #if PY_VERSION_HEX >= 0x03000000 5429 m = PyModule_Create(&SWIG_module);
5434 md = d = PyModule_GetDict(m);
5439 #ifdef SWIGPYTHON_BUILTIN 5443 assert(SwigPyObject_stype);
5446 SwigPyObject_stype->
clientdata = &SwigPyObject_clientdata;
5447 SwigPyObject_clientdata.
pytype = swigpyobject;
5448 }
else if (swigpyobject->tp_basicsize != cd->
pytype->tp_basicsize) {
5449 PyErr_SetString(PyExc_RuntimeError,
"Import error: attempted to load two incompatible swig-generated modules.");
5450 # if PY_VERSION_HEX >= 0x03000000 5463 (void)thisown_descr;
5465 public_interface = PyList_New(0);
5467 (void)public_symbol;
5469 PyDict_SetItemString(md,
"__all__", public_interface);
5470 Py_DECREF(public_interface);
5472 SwigPyBuiltin_AddPublicSymbol(public_interface,
SwigMethods[i].ml_name);
5493 #if PY_VERSION_HEX >= 0x03000000
#define SWIG_RUNTIME_VERSION
SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_OptimalCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_Python_ArgFail(int argnum)
SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v)
SWIGINTERN int SWIG_AsVal_long(PyObject *obj, long *val)
static PyMethodDef SwigMethods_proxydocs[]
struct swig_const_info swig_const_info
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_UnitCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
static swig_type_info _swigt__p_int
SWIGRUNTIME PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
#define SWIG_exception_fail(code, msg)
struct swig_cast_info * cast
SWIGINTERN PyObject * _wrap_LinearSumAssignment_LeftNode(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_operations_research__SimpleMaxFlow
struct swig_cast_info * next
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_OptimalCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_new_SimpleMaxFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_unsigned_short[]
SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n)
#define SWIG_GetModule(clientdata)
static swig_const_info swig_const_table[]
SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * LinearSumAssignment_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SimpleMinCostFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags)
SWIGINTERN PyObject * _wrap_AStarShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
#define SWIGTYPE_p_operations_research__SimpleMinCostFlow
static swig_type_info _swigt__p_char
static swig_cast_info _swigc__p_unsigned_long[]
SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Tail(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_ZVectorT_long_t[]
#define SWIG_BUILTIN_TP_INIT
SWIGINTERN PyObject * SimpleMaxFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_operations_research__EbertGraphT_int_int_t[]
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
#define SWIG_SetModule(clientdata, pointer)
SWIGINTERN PyObject * SimpleMinCostFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
static swig_type_info _swigt__p_ZVectorT_int_t
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
SWIGINTERN PyMethodDef * SWIG_PythonGetProxyDoc(const char *name)
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow(PyObject *self, PyObject *args)
PyObject * operator->() const
SwigPtr_PyObject & operator=(const SwigPtr_PyObject &item)
#define SWIG_TYPE_TABLE_NAME
swig_type_info ** type_initial
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_AddArcWithCapacityAndUnitCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_NewPointerObj(ptr, type, flags)
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
SWIGRUNTIME PyObject * SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
SWIGINTERN PyObject * MinCostFlowBase_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
static swig_type_info _swigt__p_unsigned_short
SharedPyPtr(const SharedPyPtr &other)
static swig_cast_info _swigc__p_operations_research__SimpleMaxFlow[]
static swig_cast_info _swigc__p_operations_research__ForwardEbertGraphT_int_int_t[]
SWIGINTERN PyObject * LinearSumAssignment_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_AssignmentCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_unsigned_char[]
static ReturnT InvokePythonCallableReturning(PyObject *pyfunc, const char *format, Args... args)
SWIGINTERN PyObject * SWIG_Python_newvarlink(void)
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
static swig_type_info _swigt__p_short
#define SWIG_AttributeError
SWIGINTERN PyTypeObject * swig_varlink_type(void)
SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self)
SWIGINTERN PyObject * SWIG_globals(void)
static void * _p_operations_research__SimpleMinCostFlowTo_p_operations_research__MinCostFlowBase(void *x, int *SWIGUNUSEDPARM(newmemory))
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_OptimalFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Head(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
struct swig_cast_info swig_cast_info
struct swig_type_info *(* swig_dycast_func)(void **)
void *(* swig_converter_func)(void *, int *)
static swig_type_info _swigt__p_long
SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v)
SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v))
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
#define SWIGTYPE_p_operations_research__MinCostFlowBase
static swig_cast_info _swigc__p_std__vectorT_int_t[]
static swig_type_info _swigt__p_unsigned_int
PyObject_HEAD void * pack
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
bool BellmanFordShortestPath(int node_count, int start_node, int end_node, std::function< int64_t(int, int)> graph, int64_t disconnected_distance, std::vector< int > *nodes)
PyObject *(* get_attr)(void)
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
struct swig_module_info swig_module_info
SWIGRUNTIME void SWIG_PropagateClientData(void)
PyObject_HEAD swig_globalvar * vars
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
int(* set_attr)(PyObject *)
#define SWIG_PYTHON_THREAD_END_BLOCK
SWIGINTERN PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
#define SWIGPY_CAPSULE_NAME
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
SWIGINTERN PyObject * _wrap_delete_SimpleMaxFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
static swig_cast_info _swigc__p_int[]
swig_cast_info ** cast_initial
SWIGINTERN PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_AddArcWithCapacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_STATIC_POINTER(var)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_delete_SimpleMinCostFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_Python_CallFunctor(functor, obj)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_SetNodeSupply(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
struct swig_globalvar * next
SWIGINTERN int SWIG_AsVal_double(PyObject *obj, double *val)
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
SWIGINTERN PyObject * _wrap_new_MinCostFlowBase(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Supply(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_NewPackedObj(ptr, sz, type)
SWIGINTERN char * SWIG_Python_str_AsChar(PyObject *str)
#define SWIG_InternalNewPointerObj(ptr, type, flags)
struct swig_cast_info * prev
SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op)
struct swig_type_info swig_type_info
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
SWIGRUNTIME int SWIG_Python_TypeErrorOccurred(PyObject *obj)
SWIGRUNTIME PyObject * SWIG_This(void)
#define SWIG_Python_str_FromFormat
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
static swig_type_info _swigt__p_ZVectorT_long_t
SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj))
#define SWIGTYPE_p_operations_research__SimpleMaxFlow
SWIGRUNTIME void SWIG_Python_RaiseOrModifyTypeError(const char *message)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Tail(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_RightNode(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_GetSinkSideMinCut(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
SWIGRUNTIME PyTypeObject * SwigPyPacked_TypeOnce(void)
static swig_type_info _swigt__p_operations_research__ForwardStaticGraphT_int_int_t
SWIGINTERN PyObject * _wrap_new_LinearSumAssignment(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_AddArcWithCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_signed_char[]
SWIGINTERN PyObject * _wrap_LinearSumAssignment_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info * swig_types[20]
SWIGINTERN int SWIG_AsVal_int(PyObject *obj, int *val)
static swig_module_info swig_module
#define SWIGRUNTIMEINLINE
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
static PyMethodDef SwigMethods[]
static int input(yyscan_t yyscanner)
SWIGINTERN PyObject * _wrap_DijkstraShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_DivisionByZero
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
static swig_cast_info * swig_cast_initial[]
static swig_type_info _swigt__p_operations_research__MinCostFlowBase
SWIGINTERN PyObject * _wrap_LinearSumAssignment_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
static swig_cast_info _swigc__p_operations_research__MinCostFlowBase[]
SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
SwigVar_PyObject(PyObject *obj=0)
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
bool AStarShortestPath(int node_count, int start_node, int end_node, std::function< int64_t(int, int)> graph, std::function< int64_t(int)> heuristic, int64_t disconnected_distance, std::vector< int > *nodes)
static swig_type_info _swigt__p_unsigned_long
struct swig_module_info * next
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
#define SWIG_Python_str_DelForPy3(x)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_RightMate(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_GetSourceSideMinCut(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_std__vectorT_int_t
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_POINTER_NOSHADOW
static swig_type_info * swig_type_initial[]
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
#define SWIGUNUSEDPARM(p)
struct swig_globalvar swig_globalvar
SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
#define SWIG_NullReferenceError
static ReturnT HandleResult(PyObject *pyresult)
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
SWIGINTERN PyObject * MinCostFlowBase_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v)
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
#define SWIG_newvarlink()
#define SWIGTYPE_p_operations_research__SimpleLinearSumAssignment
void HandleResult< void >(PyObject *pyresult)
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
SwigVar_PyObject & operator=(PyObject *obj)
static swig_cast_info _swigc__p_operations_research__SimpleLinearSumAssignment[]
SWIGINTERN PyObject * _wrap_BellmanFordShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_long[]
SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[])
#define SWIG_POINTER_DISOWN
#define SWIG_ConvertPtr(obj, pptr, type, flags)
static swig_type_info _swigt__p_operations_research__EbertGraphT_int_int_t
static swig_cast_info _swigc__p_operations_research__SimpleMinCostFlow[]
struct swig_varlinkobject swig_varlinkobject
SharedPyPtr(PyObject *obj)
SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own)
SWIGINTERN PyObject * _wrap_delete_LinearSumAssignment(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_MangledTypeQuery(name)
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
static swig_cast_info _swigc__p_char[]
static swig_type_info _swigt__p_operations_research__SimpleLinearSumAssignment
SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront)
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
#define SWIG_CAST_NEW_MEMORY
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
SWIGINTERN PyObject * SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
SWIGINTERN PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
#define SWIG_AddNewMask(r)
bool DijkstraShortestPath(int node_count, int start_node, int end_node, std::function< int64_t(int, int)> graph, int64_t disconnected_distance, std::vector< int > *nodes)
static PyMethodDef swigobject_methods[]
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_SolveMaxFlowWithMinCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_operations_research__ForwardStaticGraphT_int_int_t[]
static PyObject * Swig_This_global
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
#define SWIG_NewClientData(obj)
static swig_type_info _swigt__p_operations_research__ForwardEbertGraphT_int_int_t
SWIGRUNTIME void SWIG_Python_DestroyModule(PyObject *obj)
static swig_cast_info _swigc__p_ZVectorT_int_t[]
SwigPtr_PyObject(PyObject *obj, bool initial_ref=true)
#define SWIG_OverflowError
static swig_cast_info _swigc__p_short[]
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject *obj)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_SetArcCapacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERNINLINE PyObject * SWIG_From_int(int value)
#define SWIG_InstallConstants(d, constants)
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v)
#define SWIG_CheckState(r)
SWIGINTERN PyObject * SimpleMaxFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Head(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_unsigned_int[]
#define SWIG_as_voidptr(a)
swig_converter_func converter
SWIGINTERN PyObject * _wrap_delete_MinCostFlowBase(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_Cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
#define SWIG_RuntimeError
SWIGINTERNINLINE PyObject * SWIG_From_bool(bool value)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Flow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
static swig_type_info _swigt__p_unsigned_char
SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_MaximumFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Flow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_signed_char
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg)
SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
#define SWIG_POINTER_IMPLICIT_CONV
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
static swig_type_info _swigt__p_operations_research__SimpleMinCostFlow
#define SWIG_POINTER_NO_NULL
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
SwigPtr_PyObject(const SwigPtr_PyObject &item)