16#define SWIG_PYTHON_DIRECTOR_NO_VTABLE
21template<
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; }
37template <
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
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
86# pragma warning(disable : 4505)
92# define SWIGUNUSEDPARM(p)
94# define SWIGUNUSEDPARM(p) p SWIGUNUSED
100# define SWIGINTERN static SWIGUNUSED
104#ifndef SWIGINTERNINLINE
105# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
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)
363typedef 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 >= 0x03030000
812 return (
char *)PyUnicode_AsUTF8(str);
813#elif PY_VERSION_HEX >= 0x03000000
815 str = PyUnicode_AsUTF8String(str);
819 if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
820 newstr = (
char *)
malloc(len+1);
822 memcpy(newstr, cstr, len+1);
828 return PyString_AsString(str);
832#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
833# define SWIG_Python_str_DelForPy3(x)
835# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
842#if PY_VERSION_HEX >= 0x03000000
843 return PyUnicode_FromString(c);
845 return PyString_FromString(c);
850# define PyObject_DEL PyObject_Del
855# define SWIGPY_USE_CAPSULE
856# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
858#if PY_VERSION_HEX < 0x03020000
859#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
860#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
861#define Py_hash_t long
873 type = PyExc_MemoryError;
876 type = PyExc_IOError;
879 type = PyExc_RuntimeError;
882 type = PyExc_IndexError;
885 type = PyExc_TypeError;
888 type = PyExc_ZeroDivisionError;
891 type = PyExc_OverflowError;
894 type = PyExc_SyntaxError;
897 type = PyExc_ValueError;
900 type = PyExc_SystemError;
903 type = PyExc_AttributeError;
906 type = PyExc_RuntimeError;
917 PyObject *traceback = 0;
919 if (PyErr_Occurred())
920 PyErr_Fetch(&type, &
value, &traceback);
922 PyObject *old_str = PyObject_Str(
value);
927 PyErr_Format(type,
"%s %s", tmp, mesg);
929 PyErr_Format(type,
"%s", mesg);
934 PyErr_SetString(PyExc_RuntimeError, mesg);
944 error = PyErr_Occurred();
945 return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
954 PyObject *type = NULL, *
value = NULL, *traceback = NULL;
955 PyErr_Fetch(&type, &
value, &traceback);
956#if PY_VERSION_HEX >= 0x03000000
957 newvalue = PyUnicode_FromFormat(
"%S\nAdditional information:\n%s",
value,
message);
959 newvalue = PyString_FromFormat(
"%s\nAdditional information:\n%s", PyString_AsString(
value),
message);
962 PyErr_Restore(type, newvalue, traceback);
965 PyErr_SetString(PyExc_TypeError,
message);
969#if defined(SWIG_PYTHON_NO_THREADS)
970# if defined(SWIG_PYTHON_THREADS)
971# undef SWIG_PYTHON_THREADS
974#if defined(SWIG_PYTHON_THREADS)
975# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
976# define SWIG_PYTHON_USE_GIL
978# if defined(SWIG_PYTHON_USE_GIL)
979# ifndef SWIG_PYTHON_INITIALIZE_THREADS
980# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
983 class SWIG_Python_Thread_Block {
985 PyGILState_STATE state;
987 void end() {
if (
status) { PyGILState_Release(state);
status =
false;} }
988 SWIG_Python_Thread_Block() :
status(true), state(PyGILState_Ensure()) {}
989 ~SWIG_Python_Thread_Block() {
end(); }
991 class SWIG_Python_Thread_Allow {
995 void end() {
if (
status) { PyEval_RestoreThread(save);
status =
false; }}
996 SWIG_Python_Thread_Allow() :
status(true), save(PyEval_SaveThread()) {}
997 ~SWIG_Python_Thread_Allow() {
end(); }
999# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1000# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1001# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1002# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1004# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1005# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1006# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1007# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1010# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1011# define SWIG_PYTHON_INITIALIZE_THREADS
1013# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1014# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1016# if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1017# define SWIG_PYTHON_THREAD_END_BLOCK
1019# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1020# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1022# if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1023# define SWIG_PYTHON_THREAD_END_ALLOW
1027# define SWIG_PYTHON_INITIALIZE_THREADS
1028# define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1029# define SWIG_PYTHON_THREAD_END_BLOCK
1030# define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1031# define SWIG_PYTHON_THREAD_END_ALLOW
1047#define SWIG_PY_POINTER 4
1048#define SWIG_PY_BINARY 5
1074#if PY_VERSION_HEX < 0x02070000
1075# error "This version of SWIG only supports Python >= 2.7"
1078#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1079# error "This version of SWIG only supports Python 3 >= 3.2"
1085#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1086#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1087#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1089#ifdef SWIGPYTHON_BUILTIN
1090#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1092#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1095#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1097#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1098#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1099#define swig_owntype int
1102#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1103#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1106#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1107#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1110#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1111#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1114#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1115#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1120#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1121#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1122#define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1124#define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1125#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1126#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1127#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1128#define SWIG_fail goto fail
1138 PyErr_SetObject(errtype, obj);
1146 PyErr_SetString(errtype, msg);
1150#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1154#if defined(SWIGPYTHON_BUILTIN)
1157SwigPyBuiltin_AddPublicSymbol(PyObject *seq,
const char *key) {
1158 PyObject *s = PyString_InternFromString(key);
1159 PyList_Append(seq, s);
1165 PyDict_SetItemString(d,
name, obj);
1167 if (public_interface)
1168 SwigPyBuiltin_AddPublicSymbol(public_interface,
name);
1175 PyDict_SetItemString(d,
name, obj);
1187 }
else if (result == Py_None) {
1191 if (!PyList_Check(result)) {
1192 PyObject *o2 = result;
1193 result = PyList_New(1);
1194 PyList_SetItem(result, 0, o2);
1196 PyList_Append(result,obj);
1211 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got none",
1216 if (!PyTuple_Check(args)) {
1217 if (min <= 1 && max >= 1) {
1220 for (i = 1; i <
max; ++i) {
1225 PyErr_SetString(PyExc_SystemError,
"UnpackTuple() argument list is not a tuple");
1228 Py_ssize_t l = PyTuple_GET_SIZE(args);
1230 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1233 }
else if (l >
max) {
1234 PyErr_Format(PyExc_TypeError,
"%s expected %s%d arguments, got %d",
1239 for (i = 0; i < l; ++i) {
1240 objs[i] = PyTuple_GET_ITEM(args, i);
1242 for (; l <
max; ++l) {
1254 assert(PyDict_Check(kwargs));
1255 if (PyDict_Size(kwargs) > 0) {
1256 PyErr_Format(PyExc_TypeError,
"%s() does not take keyword arguments",
name);
1264#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1271#define SWIG_STATIC_POINTER(var) var
1273#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1281#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1282#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1284#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1286#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1287#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1298 PyObject *none = Py_None;
1312 PyTypeObject *pytype;
1321 PyErr_SetString(PyExc_TypeError,
"Implicit conversion is prohibited for explicit constructors.");
1328 PyObject *klass = data ? data->
klass : 0;
1329 return (klass ? klass : PyExc_RuntimeError);
1342 Py_INCREF(data->
klass);
1344 if (PyClass_Check(obj)) {
1349 data->
newraw = PyObject_GetAttrString(data->
klass,
"__new__");
1352 data->
newargs = PyTuple_New(1);
1353 PyTuple_SetItem(data->
newargs, 0, obj);
1360 data->
destroy = PyObject_GetAttrString(data->
klass,
"__swig_destroy__");
1361 if (PyErr_Occurred()) {
1368 flags = PyCFunction_GET_FLAGS(data->
destroy);
1369 data->
delargs = !(flags & (METH_O));
1381 Py_XDECREF(data->
newraw);
1394#ifdef SWIGPYTHON_BUILTIN
1400#ifdef SWIGPYTHON_BUILTIN
1403SwigPyObject_get___dict__(PyObject *v, PyObject *
SWIGUNUSEDPARM(args))
1408 sobj->dict = PyDict_New();
1410 Py_INCREF(sobj->dict);
1419 return PyLong_FromVoidPtr(v->
ptr);
1425 PyObject *res = NULL;
1426 PyObject *args = PyTuple_New(1);
1431#if PY_VERSION_HEX >= 0x03000000
1432 res = PyUnicode_Format(ofmt,args);
1434 res = PyString_Format(ofmt,args);
1463# if PY_VERSION_HEX >= 0x03000000
1464 PyObject *joined = PyUnicode_Concat(repr, nrep);
1469 PyString_ConcatAndDel(&repr,nrep);
1488 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1496 if( op != Py_EQ && op != Py_NE ) {
1497 Py_INCREF(Py_NotImplemented);
1498 return Py_NotImplemented;
1507#ifdef SWIGPYTHON_BUILTIN
1512 assert(SwigPyObject_stype);
1528#ifdef SWIGPYTHON_BUILTIN
1530 if (PyType_IsSubtype(op->ob_type, target_tp))
1532 return (strcmp(op->ob_type->tp_name,
"SwigPyObject") == 0);
1535 || (strcmp(
Py_TYPE(op)->tp_name,
"SwigPyObject") == 0);
1550 PyObject *destroy = data ? data->
destroy : 0;
1562 PyObject *type = NULL, *
value = NULL, *traceback = NULL;
1563 PyErr_Fetch(&type, &
value, &traceback);
1571 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1572 PyObject *mself = PyCFunction_GET_SELF(destroy);
1573 res = ((*meth)(mself, v));
1576 PyErr_WriteUnraisable(destroy);
1578 PyErr_Restore(type,
value, traceback);
1582#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1585 printf(
"swig/python detected a memory leak of type '%s', no destructor found.\n", (
name ?
name :
"unknown"));
1598 PyErr_SetString(PyExc_TypeError,
"Attempt to append a non SwigPyObject");
1611 Py_INCREF(sobj->
next);
1638 if (!PyArg_UnpackTuple(args,
"own", 0, 1, &val)) {
1642 PyObject *obj = PyBool_FromLong(sobj->
own);
1644 if (PyObject_IsTrue(val)) {
1658 {
"own",
SwigPyObject_own, METH_VARARGS,
"returns/sets ownership of the pointer"},
1667 static char swigobject_doc[] =
"Swig object carries a C/C++ instance pointer";
1669 static PyNumberMethods SwigPyObject_as_number = {
1674#
if PY_VERSION_HEX < 0x03000000
1690#
if PY_VERSION_HEX < 0x03000000
1694#if PY_VERSION_HEX < 0x03000000
1700#if PY_VERSION_HEX < 0x03000000
1704#if PY_VERSION_HEX >= 0x03050000
1705 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1706#elif PY_VERSION_HEX >= 0x03000000
1707 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1709 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
1713 static PyTypeObject swigpyobject_type;
1714 static int type_init = 0;
1716 const PyTypeObject tmp = {
1717#if PY_VERSION_HEX >= 0x03000000
1718 PyVarObject_HEAD_INIT(NULL, 0)
1720 PyObject_HEAD_INIT(NULL)
1730#if PY_VERSION_HEX >= 0x03000000
1736 &SwigPyObject_as_number,
1742 PyObject_GenericGetAttr,
1773#
if PY_VERSION_HEX >= 0x03040000
1776#
if PY_VERSION_HEX >= 0x03080000
1779#
if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1790 swigpyobject_type = tmp;
1792 if (PyType_Ready(&swigpyobject_type) < 0)
1795 return &swigpyobject_type;
1808 return (PyObject *)sobj;
1849 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1850 return s ? s : strncmp((
const char *)v->
pack, (
const char *)w->
pack, 2*v->
size);
1864 || (strcmp((op)->ob_type->tp_name,
"SwigPyPacked") == 0);
1879 static char swigpacked_doc[] =
"Swig object carries a C/C++ instance pointer";
1880 static PyTypeObject swigpypacked_type;
1881 static int type_init = 0;
1883 const PyTypeObject tmp = {
1884#if PY_VERSION_HEX>=0x03000000
1885 PyVarObject_HEAD_INIT(NULL, 0)
1887 PyObject_HEAD_INIT(NULL)
1897#if PY_VERSION_HEX>=0x03000000
1909 PyObject_GenericGetAttr,
1940#
if PY_VERSION_HEX >= 0x03040000
1943#
if PY_VERSION_HEX >= 0x03080000
1946#
if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1957 swigpypacked_type = tmp;
1959 if (PyType_Ready(&swigpypacked_type) < 0)
1962 return &swigpypacked_type;
1970 void *pack =
malloc(size);
1972 memcpy(pack, ptr, size);
1981 return (PyObject *) sobj;
1989 if (sobj->
size != size)
return 0;
1990 memcpy(ptr, sobj->
pack, size);
2014#if PY_VERSION_HEX>=0x03000000
2015#define SWIG_PYTHON_SLOW_GETSET_THIS
2026#ifdef SWIGPYTHON_BUILTIN
2028# ifdef PyWeakref_CheckProxy
2029 if (PyWeakref_CheckProxy(pyobj)) {
2030 pyobj = PyWeakref_GET_OBJECT(pyobj);
2040#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2041 if (PyInstance_Check(pyobj)) {
2042 obj = _PyInstance_Lookup(pyobj,
SWIG_This());
2044 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2045 if (dictptr != NULL) {
2046 PyObject *dict = *dictptr;
2047 obj = dict ? PyDict_GetItem(dict,
SWIG_This()) : 0;
2049#ifdef PyWeakref_CheckProxy
2050 if (PyWeakref_CheckProxy(pyobj)) {
2051 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2055 obj = PyObject_GetAttr(pyobj,
SWIG_This());
2059 if (PyErr_Occurred()) PyErr_Clear();
2065 obj = PyObject_GetAttr(pyobj,
SWIG_This());
2069 if (PyErr_Occurred()) PyErr_Clear();
2089 int oldown = sobj->
own;
2107 if (obj == Py_None && !implicit_conv) {
2119 void *vptr = sobj->
ptr;
2124 if (ptr) *ptr = vptr;
2144 if (ptr) *ptr = vptr;
2150 *own = *own | sobj->
own;
2156 if (implicit_conv) {
2159 PyObject *klass = data->
klass;
2165 if (PyErr_Occurred()) {
2190 if (!
SWIG_IsOK(res) && obj == Py_None) {
2193 if (PyErr_Occurred())
2206 if (!PyCFunction_Check(obj)) {
2213 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2214 const char *desc = doc ? strstr(doc,
"swig_ptr: ") : 0;
2260 PyObject *newraw = data->
newraw;
2262 inst = PyObject_Call(newraw, data->
newargs, NULL);
2264#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2265 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2266 if (dictptr != NULL) {
2267 PyObject *dict = *dictptr;
2269 dict = PyDict_New();
2271 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2275 if (PyObject_SetAttr(inst,
SWIG_This(), swig_this) == -1) {
2282#if PY_VERSION_HEX >= 0x03000000
2283 PyObject *empty_args = PyTuple_New(0);
2285 PyObject *empty_kwargs = PyDict_New();
2287 inst = ((PyTypeObject *)data->
newargs)->tp_new((PyTypeObject *)data->
newargs, empty_args, empty_kwargs);
2288 Py_DECREF(empty_kwargs);
2290 if (PyObject_SetAttr(inst,
SWIG_This(), swig_this) == -1) {
2294 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2298 Py_DECREF(empty_args);
2301 PyObject *dict = PyDict_New();
2303 PyDict_SetItem(dict,
SWIG_This(), swig_this);
2304 inst = PyInstance_NewRaw(data->
newargs, dict);
2315#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2316 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2317 if (dictptr != NULL) {
2318 PyObject *dict = *dictptr;
2320 dict = PyDict_New();
2323 return PyDict_SetItem(dict,
SWIG_This(), swig_this);
2326 return PyObject_SetAttr(inst,
SWIG_This(), swig_this);
2360 if (clientdata && clientdata->
pytype) {
2365 PyObject *next_self = clientdata->
pytype->tp_alloc(clientdata->
pytype, 0);
2366 while (newobj->
next)
2368 newobj->
next = next_self;
2370#ifdef SWIGPYTHON_BUILTIN
2376#ifdef SWIGPYTHON_BUILTIN
2385 return (PyObject*) newobj;
2412#ifdef SWIG_LINK_RUNTIME
2413void *SWIG_ReturnGlobalTypeList(
void *);
2418 static void *type_pointer = (
void *)0;
2420 if (!type_pointer) {
2421#ifdef SWIG_LINK_RUNTIME
2422 type_pointer = SWIG_ReturnGlobalTypeList((
void *)0);
2425 if (PyErr_Occurred()) {
2427 type_pointer = (
void *)0;
2453#if PY_VERSION_HEX >= 0x03000000
2457 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };
2458 PyObject *module = Py_InitModule(
"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2461 if (pointer && module) {
2464 Py_XDECREF(pointer);
2480 PyObject *obj = PyDict_GetItem(cache, key);
2488 obj = PyCapsule_New((
void*) descriptor, NULL, NULL);
2489 PyDict_SetItem(cache, key, obj);
2500#define SWIG_POINTER_EXCEPTION 0
2501#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2502#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2507 if (PyErr_Occurred()) {
2509 PyObject *
value = 0;
2510 PyObject *traceback = 0;
2511 PyErr_Fetch(&type, &
value, &traceback);
2513 PyObject *old_str = PyObject_Str(
value);
2515 const char *errmesg = tmp ? tmp :
"Invalid error message";
2519 PyErr_Format(type,
"%s %s", mesg, errmesg);
2521 PyErr_Format(type,
"%s %s", errmesg, mesg);
2535 if (PyErr_Occurred()) {
2538 PyOS_snprintf(mesg,
sizeof(mesg),
"argument number %d:", argnum);
2550 return ty ? ty->
str :
"";
2557#if defined(SWIG_COBJECT_TYPES)
2561 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, 'SwigPyObject(%s)' is received",
2568 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2570 PyObject *str = PyObject_Str(obj);
2573 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s(%s)' is received",
2577 PyErr_Format(PyExc_TypeError,
"a '%s' is expected, '%s' is received",
2584 PyErr_Format(PyExc_TypeError,
"a '%s' is expected", type);
2586 PyErr_Format(PyExc_TypeError,
"unexpected type is received");
2597#if SWIG_POINTER_EXCEPTION
2607#ifdef SWIGPYTHON_BUILTIN
2609SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *
name, PyObject *
value) {
2610 PyTypeObject *tp = obj->ob_type;
2612 PyObject *encoded_name;
2616# ifdef Py_USING_UNICODE
2617 if (PyString_Check(
name)) {
2618 name = PyUnicode_Decode(PyString_AsString(
name), PyString_Size(
name), NULL, NULL);
2621 }
else if (!PyUnicode_Check(
name))
2623 if (!PyString_Check(
name))
2626 PyErr_Format(PyExc_TypeError,
"attribute name must be string, not '%.200s'",
name->ob_type->tp_name);
2633 if (PyType_Ready(tp) < 0)
2637 descr = _PyType_Lookup(tp,
name);
2640 f = descr->ob_type->tp_descr_set;
2642 if (PyString_Check(
name)) {
2643 encoded_name =
name;
2646 encoded_name = PyUnicode_AsUTF8String(
name);
2650 PyErr_Format(PyExc_AttributeError,
"'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2651 Py_DECREF(encoded_name);
2653 res = f(descr, obj,
value);
2669#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2671#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2690 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2695#define SWIGTYPE_p_ZVectorT_int_t swig_types[0]
2696#define SWIGTYPE_p_ZVectorT_long_long_t swig_types[1]
2697#define SWIGTYPE_p_char swig_types[2]
2698#define SWIGTYPE_p_int swig_types[3]
2699#define SWIGTYPE_p_long_long swig_types[4]
2700#define SWIGTYPE_p_operations_research__EbertGraphT_int_int_t swig_types[5]
2701#define SWIGTYPE_p_operations_research__ForwardEbertGraphT_int_int_t swig_types[6]
2702#define SWIGTYPE_p_operations_research__ForwardStaticGraphT_int_int_t swig_types[7]
2703#define SWIGTYPE_p_operations_research__MinCostFlowBase swig_types[8]
2704#define SWIGTYPE_p_operations_research__SimpleLinearSumAssignment swig_types[9]
2705#define SWIGTYPE_p_operations_research__SimpleMaxFlow swig_types[10]
2706#define SWIGTYPE_p_operations_research__SimpleMinCostFlow swig_types[11]
2707#define SWIGTYPE_p_short swig_types[12]
2708#define SWIGTYPE_p_signed_char swig_types[13]
2709#define SWIGTYPE_p_std__vectorT_int_t swig_types[14]
2710#define SWIGTYPE_p_unsigned_char swig_types[15]
2711#define SWIGTYPE_p_unsigned_int swig_types[16]
2712#define SWIGTYPE_p_unsigned_long_long swig_types[17]
2713#define SWIGTYPE_p_unsigned_short swig_types[18]
2716#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2717#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2721#ifdef SWIG_TypeQuery
2722# undef SWIG_TypeQuery
2724#define SWIG_TypeQuery SWIG_Python_TypeQuery
2729#if PY_VERSION_HEX >= 0x03000000
2730# define SWIG_init PyInit__pywrapgraph
2733# define SWIG_init init_pywrapgraph
2736#define SWIG_name "_pywrapgraph"
2738#define SWIGVERSION 0x040002
2739#define SWIG_VERSION SWIGVERSION
2742#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2743#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2750 class SwigPtr_PyObject {
2778 Py_XINCREF(item._obj);
2792 operator PyObject *()
const
2806 struct SwigVar_PyObject : SwigPtr_PyObject {
2832#include "ortools/base/python-swig.h"
2835#include <functional>
2847 PyObject*
get()
const {
return obj_; }
2853 PyObject*
const obj_;
2856template <
typename ReturnT>
2859 ReturnT result = ReturnT();
2861 if (!PyErr_Occurred()) {
2862 PyErr_SetString(PyExc_RuntimeError,
2863 "SWIG std::function invocation failed.");
2867 if (!PyObjAs<ReturnT>(pyresult, &result)) {
2868 if (!PyErr_Occurred()) {
2869 PyErr_SetString(PyExc_RuntimeError,
2870 "SWIG std::function invocation failed.");
2873 Py_DECREF(pyresult);
2881 if (!PyErr_Occurred()) {
2882 PyErr_SetString(PyExc_RuntimeError,
2883 "SWIG std::function invocation failed.");
2886 Py_DECREF(pyresult);
2890template <
typename ReturnT,
typename... Args>
2892 const char* format, Args... args) {
2895 return HandleResult<ReturnT>(
2896 PyObject_CallFunction(pyfunc,
const_cast<char*
>(format), args...));
2899template <
typename ReturnT>
2901 return HandleResult<ReturnT>(PyObject_CallFunctionObjArgs(pyfunc,
nullptr));
2913#if !defined(SWIG_NO_LLONG_MAX)
2914# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
2915# define LLONG_MAX __LONG_LONG_MAX__
2916# define LLONG_MIN (-LLONG_MAX - 1LL)
2917# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
2926 if (PyFloat_Check(obj)) {
2927 if (val) *val = PyFloat_AsDouble(obj);
2929#if PY_VERSION_HEX < 0x03000000
2930 }
else if (PyInt_Check(obj)) {
2931 if (val) *val = (double) PyInt_AsLong(obj);
2934 }
else if (PyLong_Check(obj)) {
2935 double v = PyLong_AsDouble(obj);
2936 if (!PyErr_Occurred()) {
2943#ifdef SWIG_PYTHON_CAST_MODE
2946 double d = PyFloat_AsDouble(obj);
2947 if (!PyErr_Occurred()) {
2954 long v = PyLong_AsLong(obj);
2955 if (!PyErr_Occurred()) {
2977 if ((
min <= x && x <=
max)) {
2978 double fx = floor(x);
2979 double cx = ceil(x);
2980 double rd = ((x - fx) < 0.5) ? fx : cx;
2981 if ((errno == EDOM) || (errno == ERANGE)) {
2984 double summ, reps, diff;
2987 }
else if (rd > x) {
2994 if (reps < 8*DBL_EPSILON) {
3007#if PY_VERSION_HEX < 0x03000000
3008 if (PyInt_Check(obj)) {
3009 if (val) *val = PyInt_AsLong(obj);
3013 if (PyLong_Check(obj)) {
3014 long v = PyLong_AsLong(obj);
3015 if (!PyErr_Occurred()) {
3023#ifdef SWIG_PYTHON_CAST_MODE
3026 long v = PyInt_AsLong(obj);
3027 if (!PyErr_Occurred()) {
3037 if (val) *val = (long)(d);
3053 if ((v < INT_MIN || v > INT_MAX)) {
3056 if (val) *val =
static_cast< int >(v);
3063#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
3064# define SWIG_LONG_LONG_AVAILABLE
3068#ifdef SWIG_LONG_LONG_AVAILABLE
3070SWIG_AsVal_long_SS_long (PyObject *obj,
long long *val)
3073 if (PyLong_Check(obj)) {
3074 long long v = PyLong_AsLongLong(obj);
3075 if (!PyErr_Occurred()) {
3090#ifdef SWIG_PYTHON_CAST_MODE
3092 const double mant_max = 1LL << DBL_MANT_DIG;
3093 const double mant_min = -mant_max;
3099 if (val) *val = (
long long)(d);
3113 return PyInt_FromLong((
long)
value);
3117#ifdef SWIG_LONG_LONG_AVAILABLE
3119SWIG_From_long_SS_long (
long long value)
3121 return ((
value < LONG_MIN) || (
value > LONG_MAX)) ?
3122 PyLong_FromLongLong(
value) : PyInt_FromLong(static_cast< long >(
value));
3130 return PyBool_FromLong(
value ? 1 : 0);
3137 PyObject *resultobj = 0;
3150 PyObject *resultobj = 0;
3163 PyObject *swig_obj[4] ;
3169 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3174 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3179 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
3182 ecode4 = SWIG_AsVal_long_SS_long(swig_obj[3], &val4);
3184 SWIG_exception_fail(
SWIG_ArgError(ecode4),
"in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "4"" of type '" "operations_research::FlowQuantity""'");
3196 PyObject *resultobj = 0;
3200 PyObject *swig_obj[1] ;
3207 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_NumNodes" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3219 PyObject *resultobj = 0;
3223 PyObject *swig_obj[1] ;
3230 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_NumArcs" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3242 PyObject *resultobj = 0;
3249 PyObject *swig_obj[2] ;
3255 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_Tail" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3272 PyObject *resultobj = 0;
3279 PyObject *swig_obj[2] ;
3285 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_Head" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3302 PyObject *resultobj = 0;
3309 PyObject *swig_obj[2] ;
3315 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_Capacity" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3324 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3332 PyObject *resultobj = 0;
3342 PyObject *swig_obj[3] ;
3370 PyObject *resultobj = 0;
3374 PyObject *swig_obj[1] ;
3381 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_OptimalFlow" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3385 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3393 PyObject *resultobj = 0;
3400 PyObject *swig_obj[2] ;
3406 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_Flow" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3415 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3423 PyObject *resultobj = 0;
3425 std::vector< operations_research::NodeIndex > *arg2 = (std::vector< operations_research::NodeIndex > *) 0 ;
3428 std::vector< int > temp2 ;
3429 PyObject *swig_obj[1] ;
3438 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_GetSourceSideMinCut" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3441 (arg1)->GetSourceSideMinCut(arg2);
3453 PyObject *resultobj = 0;
3455 std::vector< operations_research::NodeIndex > *arg2 = (std::vector< operations_research::NodeIndex > *) 0 ;
3458 std::vector< int > temp2 ;
3459 PyObject *swig_obj[1] ;
3468 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_GetSinkSideMinCut" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3471 (arg1)->GetSinkSideMinCut(arg2);
3483 PyObject *resultobj = 0;
3493 PyObject *swig_obj[3] ;
3498 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMaxFlow_SetArcCapacity" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3503 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "SimpleMaxFlow_SetArcCapacity" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3506 ecode3 = SWIG_AsVal_long_SS_long(swig_obj[2], &val3);
3508 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "SimpleMaxFlow_SetArcCapacity" "', argument " "3"" of type '" "operations_research::FlowQuantity""'");
3511 (arg1)->SetArcCapacity(arg2,arg3);
3520 PyObject *resultobj = 0;
3524 PyObject *swig_obj[1] ;
3553 PyObject *resultobj = 0;
3566 PyObject *resultobj = 0;
3570 PyObject *swig_obj[1] ;
3576 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "delete_MinCostFlowBase" "', argument " "1"" of type '" "operations_research::MinCostFlowBase *""'");
3599 PyObject *resultobj = 0;
3608 if ((nobjs < 2) || (nobjs > 2))
SWIG_fail;
3628 PyObject *resultobj = 0;
3634 if ((nobjs < 1) || (nobjs > 1))
SWIG_fail;
3649 PyObject *resultobj = 0;
3652 if ((nobjs < 0) || (nobjs > 0))
SWIG_fail;
3663 PyObject *argv[3] = {
3701 " Possible C/C++ prototypes are:\n"
3702 " operations_research::SimpleMinCostFlow::SimpleMinCostFlow(operations_research::NodeIndex,operations_research::ArcIndex)\n"
3703 " operations_research::SimpleMinCostFlow::SimpleMinCostFlow(operations_research::NodeIndex)\n"
3704 " operations_research::SimpleMinCostFlow::SimpleMinCostFlow()\n");
3710 PyObject *resultobj = 0;
3726 PyObject *swig_obj[5] ;
3732 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3737 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3742 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
3745 ecode4 = SWIG_AsVal_long_SS_long(swig_obj[3], &val4);
3747 SWIG_exception_fail(
SWIG_ArgError(ecode4),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "4"" of type '" "operations_research::FlowQuantity""'");
3750 ecode5 = SWIG_AsVal_long_SS_long(swig_obj[4], &val5);
3752 SWIG_exception_fail(
SWIG_ArgError(ecode5),
"in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "5"" of type '" "operations_research::CostValue""'");
3764 PyObject *resultobj = 0;
3774 PyObject *swig_obj[3] ;
3779 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_SetNodeSupply" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3784 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "SimpleMinCostFlow_SetNodeSupply" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3787 ecode3 = SWIG_AsVal_long_SS_long(swig_obj[2], &val3);
3789 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "SimpleMinCostFlow_SetNodeSupply" "', argument " "3"" of type '" "operations_research::FlowQuantity""'");
3792 (arg1)->SetNodeSupply(arg2,arg3);
3801 PyObject *resultobj = 0;
3805 PyObject *swig_obj[1] ;
3812 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Solve" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3824 PyObject *resultobj = 0;
3828 PyObject *swig_obj[1] ;
3835 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_SolveMaxFlowWithMinCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3847 PyObject *resultobj = 0;
3851 PyObject *swig_obj[1] ;
3858 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_OptimalCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3862 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3870 PyObject *resultobj = 0;
3874 PyObject *swig_obj[1] ;
3881 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_MaximumFlow" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3885 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3893 PyObject *resultobj = 0;
3900 PyObject *swig_obj[2] ;
3906 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Flow" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3915 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
3923 PyObject *resultobj = 0;
3927 PyObject *swig_obj[1] ;
3934 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_NumNodes" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3946 PyObject *resultobj = 0;
3950 PyObject *swig_obj[1] ;
3957 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_NumArcs" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3969 PyObject *resultobj = 0;
3976 PyObject *swig_obj[2] ;
3982 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Tail" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3999 PyObject *resultobj = 0;
4006 PyObject *swig_obj[2] ;
4012 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Head" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
4029 PyObject *resultobj = 0;
4036 PyObject *swig_obj[2] ;
4042 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Capacity" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
4051 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
4059 PyObject *resultobj = 0;
4066 PyObject *swig_obj[2] ;
4072 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_Supply" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
4081 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
4089 PyObject *resultobj = 0;
4096 PyObject *swig_obj[2] ;
4102 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "SimpleMinCostFlow_UnitCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
4111 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
4119 PyObject *resultobj = 0;
4123 PyObject *swig_obj[1] ;
4129 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "delete_SimpleMinCostFlow" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
4152 PyObject *resultobj = 0;
4165 PyObject *resultobj = 0;
4178 PyObject *swig_obj[4] ;
4184 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment *""'");
4189 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4194 SWIG_exception_fail(
SWIG_ArgError(ecode3),
"in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
4197 ecode4 = SWIG_AsVal_long_SS_long(swig_obj[3], &val4);
4199 SWIG_exception_fail(
SWIG_ArgError(ecode4),
"in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "4"" of type '" "operations_research::CostValue""'");
4211 PyObject *resultobj = 0;
4215 PyObject *swig_obj[1] ;
4222 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_NumNodes" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4234 PyObject *resultobj = 0;
4238 PyObject *swig_obj[1] ;
4245 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_NumArcs" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4257 PyObject *resultobj = 0;
4264 PyObject *swig_obj[2] ;
4270 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_LeftNode" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4275 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_LeftNode" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
4287 PyObject *resultobj = 0;
4294 PyObject *swig_obj[2] ;
4300 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_RightNode" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4305 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_RightNode" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
4317 PyObject *resultobj = 0;
4324 PyObject *swig_obj[2] ;
4330 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_Cost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4339 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
4347 PyObject *resultobj = 0;
4351 PyObject *swig_obj[1] ;
4358 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_Solve" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment *""'");
4370 PyObject *resultobj = 0;
4374 PyObject *swig_obj[1] ;
4381 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_OptimalCost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4385 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
4393 PyObject *resultobj = 0;
4400 PyObject *swig_obj[2] ;
4406 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_RightMate" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4411 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_RightMate" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4423 PyObject *resultobj = 0;
4430 PyObject *swig_obj[2] ;
4436 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "LinearSumAssignment_AssignmentCost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4441 SWIG_exception_fail(
SWIG_ArgError(ecode2),
"in method '" "LinearSumAssignment_AssignmentCost" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4445 resultobj = SWIG_From_long_SS_long(
static_cast< long long >(result));
4453 PyObject *resultobj = 0;
4457 PyObject *swig_obj[1] ;
4463 SWIG_exception_fail(
SWIG_ArgError(res1),
"in method '" "delete_LinearSumAssignment" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment *""'");
4486 PyObject *resultobj = 0;
4490 std::function< int64_t (
int,
int) > arg4 ;
4492 std::vector< int > *arg6 = (std::vector< int > *) 0 ;
4501 std::vector< int > temp6 ;
4502 PyObject *swig_obj[5] ;
4513 arg1 =
static_cast< int >(val1);
4518 arg2 =
static_cast< int >(val2);
4523 arg3 =
static_cast< int >(val3);
4526 arg4 = [
input](
int i,
int j) {
4527 return InvokePythonCallableReturning<int64_t>(
input.get(),
"ii", i, j);
4530 ecode5 = SWIG_AsVal_long_SS_long(swig_obj[4], &val5);
4534 arg5 =
static_cast< int64_t
>(val5);
4547 PyObject *resultobj = 0;
4551 std::function< int64_t (
int,
int) > arg4 ;
4553 std::vector< int > *arg6 = (std::vector< int > *) 0 ;
4562 std::vector< int > temp6 ;
4563 PyObject *swig_obj[5] ;
4574 arg1 =
static_cast< int >(val1);
4579 arg2 =
static_cast< int >(val2);
4584 arg3 =
static_cast< int >(val3);
4587 arg4 = [
input](
int i,
int j) {
4588 return InvokePythonCallableReturning<int64_t>(
input.get(),
"ii", i, j);
4591 ecode5 = SWIG_AsVal_long_SS_long(swig_obj[4], &val5);
4595 arg5 =
static_cast< int64_t
>(val5);
4608 PyObject *resultobj = 0;
4612 std::function< int64_t (
int,
int) > arg4 ;
4613 std::function< int64_t (
int) > arg5 ;
4615 std::vector< int > *arg7 = (std::vector< int > *) 0 ;
4624 std::vector< int > temp7 ;
4625 PyObject *swig_obj[6] ;
4636 arg1 =
static_cast< int >(val1);
4641 arg2 =
static_cast< int >(val2);
4646 arg3 =
static_cast< int >(val3);
4649 arg4 = [
input](
int i,
int j) {
4650 return InvokePythonCallableReturning<int64_t>(
input.get(),
"ii", i, j);
4656 return InvokePythonCallableReturning<int64_t>(
input.get(),
"(i)",
index);
4659 ecode6 = SWIG_AsVal_long_SS_long(swig_obj[5], &val6);
4663 arg6 =
static_cast< int64_t
>(val6);
4732 { NULL, NULL, 0, NULL }
4736 { NULL, NULL, 0, NULL }
4748static swig_type_info _swigt__p_int = {
"_p_int",
"intptr_t *|int *|int_least32_t *|int_fast32_t *|operations_research::NodeIndex *|int32_t *|operations_research::ArcIndex *|int_fast16_t *", 0, 0, (
void*)0, 0};
4749static swig_type_info _swigt__p_long_long = {
"_p_long_long",
"operations_research::CostValue *|int_least64_t *|int_fast64_t *|int64_t *|operations_research::FlowQuantity *|long long *|intmax_t *", 0, 0, (
void*)0, 0};
4795static 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}};
4833{0, 0, 0, 0.0, 0, 0}};
4887#define SWIGRUNTIME_DEBUG
4923 }
while (iter!= module_head);
4934 if (init == 0)
return;
4937#ifdef SWIGRUNTIME_DEBUG
4938 printf(
"SWIG_InitializeModule: size %lu\n", (
unsigned long)
swig_module.
size);
4945#ifdef SWIGRUNTIME_DEBUG
4955#ifdef SWIGRUNTIME_DEBUG
4956 printf(
"SWIG_InitializeModule: found type %s\n", type->
name);
4960#ifdef SWIGRUNTIME_DEBUG
4961 printf(
"SWIG_InitializeModule: found and overwrite type %s \n", type->
name);
4970 while (cast->
type) {
4973#ifdef SWIGRUNTIME_DEBUG
4974 printf(
"SWIG_InitializeModule: look cast %s\n", cast->
type->
name);
4978#ifdef SWIGRUNTIME_DEBUG
4979 if (ret) printf(
"SWIG_InitializeModule: found cast %s\n", ret->
name);
4984#ifdef SWIGRUNTIME_DEBUG
4985 printf(
"SWIG_InitializeModule: skip old type %s\n", ret->
name);
4992#ifdef SWIGRUNTIME_DEBUG
4993 if (ocast) printf(
"SWIG_InitializeModule: skip old cast %s\n", ret->
name);
4995 if (!ocast) ret = 0;
5000#ifdef SWIGRUNTIME_DEBUG
5001 printf(
"SWIG_InitializeModule: adding cast %s\n", cast->
type->
name);
5016#ifdef SWIGRUNTIME_DEBUG
5017 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
5022 while (cast->
type) {
5023 printf(
"SWIG_InitializeModule: cast type %s\n", cast->
type->
name);
5027 printf(
"---- Total casts: %d\n",j);
5029 printf(
"**** SWIG_InitializeModule: Cast List ******\n");
5042 static int init_run = 0;
5044 if (init_run)
return;
5055 equiv = equiv->
next;
5076#define SWIG_newvarlink() SWIG_Python_newvarlink()
5077#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
5078#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
5086 PyObject *(*get_attr)(void);
5098#if PY_VERSION_HEX >= 0x03000000
5099 return PyUnicode_InternFromString(
"<Swig global variables>");
5101 return PyString_FromString(
"<Swig global variables>");
5107#if PY_VERSION_HEX >= 0x03000000
5108 PyObject *str = PyUnicode_InternFromString(
"(");
5113 tail = PyUnicode_FromString(
var->name);
5114 joined = PyUnicode_Concat(str,
tail);
5119 tail = PyUnicode_InternFromString(
", ");
5120 joined = PyUnicode_Concat(str,
tail);
5126 tail = PyUnicode_InternFromString(
")");
5127 joined = PyUnicode_Concat(str,
tail);
5132 PyObject *str = PyString_FromString(
"(");
5135 PyString_ConcatAndDel(&str,PyString_FromString(
var->name));
5136 if (
var->next) PyString_ConcatAndDel(&str,PyString_FromString(
", "));
5138 PyString_ConcatAndDel(&str,PyString_FromString(
")"));
5156 PyObject *res = NULL;
5159 if (strcmp(
var->name,n) == 0) {
5160 res = (*
var->get_attr)();
5165 if (res == NULL && !PyErr_Occurred()) {
5166 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
5176 if (strcmp(
var->name,n) == 0) {
5177 res = (*
var->set_attr)(p);
5182 if (res == 1 && !PyErr_Occurred()) {
5183 PyErr_Format(PyExc_AttributeError,
"Unknown C global variable '%s'", n);
5190 static char varlink__doc__[] =
"Swig var link object";
5191 static PyTypeObject varlink_type;
5192 static int type_init = 0;
5194 const PyTypeObject tmp = {
5195#if PY_VERSION_HEX >= 0x03000000
5196 PyVarObject_HEAD_INIT(NULL, 0)
5198 PyObject_HEAD_INIT(NULL)
5225 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
5228#if PY_VERSION_HEX >= 0x03040000
5231#if PY_VERSION_HEX >= 0x03080000
5234#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
5247 if (PyType_Ready(&varlink_type) < 0)
5250 return &varlink_type;
5260 return ((PyObject*) result);
5268 size_t size = strlen(
name)+1;
5282 static PyObject *globals = 0;
5298 for (i = 0; constants[i].
type; ++i) {
5299 switch(constants[i].type) {
5304 obj =
SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
5311 PyDict_SetItemString(d, constants[i].
name, obj);
5327 for (i = 0; methods[i].ml_name; ++i) {
5328 const char *c = methods[i].ml_doc;
5330 c = strstr(c,
"swig_ptr: ");
5334 const char *
name = c + 10;
5335 for (j = 0; const_table[j].
type; ++j) {
5336 if (strncmp(const_table[j].
name,
name,
5337 strlen(const_table[j].
name)) == 0) {
5338 ci = &(const_table[j]);
5345 size_t shift = (ci->
ptype) - types;
5347 size_t ldoc = (c - methods[i].ml_doc);
5348 size_t lptr = strlen(ty->
name)+2*
sizeof(
void*)+2;
5349 char *ndoc = (
char*)
malloc(ldoc + lptr + 10);
5352 memcpy(buff, methods[i].ml_doc, ldoc);
5354 memcpy(buff,
"swig_ptr: ", 10);
5357 methods[i].ml_doc = ndoc;
5395 if (PyCFunction_Check(func)) {
5396 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5399 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5401#if PY_VERSION_HEX >= 0x03000000
5402 return PyInstanceMethod_New(func);
5404 return PyMethod_New(func, NULL, NULL);
5414 if (PyCFunction_Check(func)) {
5415 PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5418 func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5420 return PyStaticMethod_New(func);
5436#if PY_VERSION_HEX >= 0x03000000
5442 PyObject *m, *d, *md, *globals;
5444#if PY_VERSION_HEX >= 0x03000000
5445 static struct PyModuleDef SWIG_module = {
5446 PyModuleDef_HEAD_INIT,
5458#if defined(SWIGPYTHON_BUILTIN)
5462 static PyGetSetDef this_getset_def = {
5463 (
char *)
"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
5465 static SwigPyGetSet thisown_getset_closure = {
5469 static PyGetSetDef thisown_getset_def = {
5470 (
char *)
"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
5472 PyTypeObject *builtin_pytype;
5473 int builtin_base_count;
5476 PyGetSetDescrObject *static_getset;
5477 PyTypeObject *metatype;
5478 PyTypeObject *swigpyobject;
5480 PyObject *public_interface, *public_symbol;
5481 PyObject *this_descr;
5482 PyObject *thisown_descr;
5486 (void)builtin_pytype;
5487 (void)builtin_base_count;
5488 (void)builtin_basetype;
5490 (void)static_getset;
5494 metatype = SwigPyObjectType();
5504#ifndef SWIGPYTHON_BUILTIN
5511#if PY_VERSION_HEX >= 0x03000000
5512 m = PyModule_Create(&SWIG_module);
5517 md = d = PyModule_GetDict(m);
5522#ifdef SWIGPYTHON_BUILTIN
5526 assert(SwigPyObject_stype);
5529 SwigPyObject_stype->
clientdata = &SwigPyObject_clientdata;
5530 SwigPyObject_clientdata.
pytype = swigpyobject;
5531 }
else if (swigpyobject->tp_basicsize != cd->
pytype->tp_basicsize) {
5532 PyErr_SetString(PyExc_RuntimeError,
"Import error: attempted to load two incompatible swig-generated modules.");
5533# if PY_VERSION_HEX >= 0x03000000
5546 (void)thisown_descr;
5548 public_interface = PyList_New(0);
5550 (void)public_symbol;
5552 PyDict_SetItemString(md,
"__all__", public_interface);
5553 Py_DECREF(public_interface);
5555 SwigPyBuiltin_AddPublicSymbol(public_interface,
SwigMethods[i].ml_name);
5576#if PY_VERSION_HEX >= 0x03000000
SharedPyPtr(const SharedPyPtr &other)
SharedPyPtr(PyObject *obj)
Status SolveMaxFlowWithMinCost()
PyObject * operator->() const
SwigPtr_PyObject(PyObject *obj, bool initial_ref=true)
SwigPtr_PyObject & operator=(const SwigPtr_PyObject &item)
SwigPtr_PyObject(const SwigPtr_PyObject &item)
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
SWIGINTERNINLINE PyObject * SWIG_From_int(int value)
SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
SWIGINTERN PyObject * SimpleMinCostFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info * swig_cast_initial[]
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_AddArcWithCapacityAndUnitCost(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_delete_SimpleMinCostFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_ZVectorT_int_t[]
static PyObject * Swig_This_global
SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
SWIGINTERN int SWIG_AsVal_double(PyObject *obj, double *val)
SWIGINTERN PyObject * _wrap_delete_SimpleMaxFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_operations_research__ForwardEbertGraphT_int_int_t[]
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_SimpleMinCostFlow_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_OptimalFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_CheckState(r)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_int[]
SWIGINTERN PyObject * _wrap_LinearSumAssignment_LeftNode(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
static swig_type_info _swigt__p_operations_research__SimpleLinearSumAssignment
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
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[])
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
#define SWIG_POINTER_IMPLICIT_CONV
#define SWIGTYPE_p_operations_research__SimpleMaxFlow
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_MaximumFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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_LinearSumAssignment_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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)
#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
#define SWIG_RuntimeError
SWIGINTERN PyObject * _wrap_LinearSumAssignment_AssignmentCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
SWIGINTERN PyObject * SimpleMaxFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_long_long[]
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_unsigned_char
static swig_cast_info _swigc__p_operations_research__MinCostFlowBase[]
SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max)
SWIGINTERN PyObject * _wrap_delete_MinCostFlowBase(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
SWIGINTERN PyObject * _wrap_LinearSumAssignment_OptimalCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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 void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
static swig_type_info _swigt__p_operations_research__SimpleMinCostFlow
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
static PyMethodDef swigobject_methods[]
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Head(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
SWIGINTERN PyObject * SimpleMaxFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_InternalNewPointerObj(ptr, type, flags)
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
#define SWIG_exception_fail(code, msg)
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
SWIGINTERN PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
#define SWIG_AttributeError
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
static swig_module_info swig_module
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_SetNodeSupply(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_unsigned_char[]
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Flow(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 PyObject * _wrap_new_SimpleMaxFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyTypeObject * swig_varlink_type(void)
#define SWIGUNUSEDPARM(p)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Head(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_type_info _swigt__p_std__vectorT_int_t
static swig_type_info _swigt__p_operations_research__ForwardStaticGraphT_int_int_t
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
#define SWIG_as_voidptr(a)
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)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_AddArcWithCapacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
struct swig_const_info swig_const_info
void HandleResult< void >(PyObject *pyresult)
SWIGINTERN int SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name)
static swig_cast_info _swigc__p_ZVectorT_long_long_t[]
static swig_type_info _swigt__p_ZVectorT_int_t
void *(* swig_converter_func)(void *, int *)
SWIGINTERN PyObject * LinearSumAssignment_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
static swig_cast_info _swigc__p_operations_research__SimpleMinCostFlow[]
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[]
SWIGINTERN PyObject * _wrap_LinearSumAssignment_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_BellmanFordShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Flow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
SWIGINTERN PyObject * MinCostFlowBase_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_Cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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)
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)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Supply(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
#define SWIG_POINTER_NO_NULL
#define SWIG_Python_str_FromFormat
static void * _p_operations_research__SimpleMinCostFlowTo_p_operations_research__MinCostFlowBase(void *x, int *SWIGUNUSEDPARM(newmemory))
#define SWIG_InstallConstants(d, constants)
struct swig_type_info *(* swig_dycast_func)(void **)
static PyMethodDef SwigMethods[]
static swig_type_info _swigt__p_ZVectorT_long_long_t
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj))
#define SWIG_NullReferenceError
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Tail(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
static swig_type_info * swig_types[20]
#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)
#define SWIGTYPE_p_operations_research__SimpleMinCostFlow
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_DijkstraShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_NumArcs(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
static swig_type_info _swigt__p_operations_research__ForwardEbertGraphT_int_int_t
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_GetSourceSideMinCut(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
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)
static swig_cast_info _swigc__p_operations_research__EbertGraphT_int_int_t[]
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 * _wrap_new_SimpleMinCostFlow(PyObject *self, PyObject *args)
#define SWIG_GetModule(clientdata)
static swig_cast_info _swigc__p_unsigned_int[]
static swig_type_info _swigt__p_int
SWIGRUNTIME void SWIG_PropagateClientData(void)
SWIGINTERN PyObject * SimpleMinCostFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_OptimalCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_delete_LinearSumAssignment(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
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[]
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_UnitCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SWIG_This(void)
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
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
SWIGINTERN PyObject * _wrap_new_LinearSumAssignment(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_CAST_NEW_MEMORY
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v)
SWIGINTERN int SWIG_AsVal_long(PyObject *obj, long *val)
struct swig_module_info swig_module_info
#define SWIGTYPE_p_operations_research__MinCostFlowBase
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
static swig_type_info _swigt__p_operations_research__EbertGraphT_int_int_t
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
static swig_cast_info _swigc__p_operations_research__SimpleLinearSumAssignment[]
static swig_cast_info _swigc__p_operations_research__SimpleMaxFlow[]
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)
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
SWIGINTERN PyObject * _wrap_AStarShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
SWIGINTERN PyObject * MinCostFlowBase_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_RightMate(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
SWIGINTERN PyObject * _wrap_LinearSumAssignment_AddArcWithCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
static swig_type_info _swigt__p_operations_research__SimpleMaxFlow
SWIGINTERN PyObject * _wrap_LinearSumAssignment_RightNode(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIG_DivisionByZero
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
static swig_type_info _swigt__p_char
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
#define SWIG_OverflowError
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_SetArcCapacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
SWIGINTERN PyObject * _wrap_new_MinCostFlowBase(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
static swig_cast_info _swigc__p_unsigned_long_long[]
#define SWIGTYPE_p_operations_research__SimpleLinearSumAssignment
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Tail(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_GetSinkSideMinCut(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
SWIGRUNTIME PyObject * SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
SWIGINTERN PyObject * LinearSumAssignment_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_SolveMaxFlowWithMinCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
static swig_cast_info _swigc__p_std__vectorT_int_t[]
#define SWIG_AddNewMask(r)
SWIGINTERN PyObject * SWIG_globals(void)
SWIGINTERN PyMethodDef * SWIG_PythonGetProxyDoc(const char *name)
static swig_type_info _swigt__p_operations_research__MinCostFlowBase
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
static swig_cast_info _swigc__p_signed_char[]
SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own)
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
#define SWIGRUNTIMEINLINE
static swig_cast_info _swigc__p_operations_research__ForwardStaticGraphT_int_int_t[]
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
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)
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)
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)
static int input(yyscan_t yyscanner)
std::optional< int64_t > end
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