OR-Tools  8.1
graph_python_wrap.cc
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.2
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 
12 #ifndef SWIGPYTHON
13 #define SWIGPYTHON
14 #endif
15 
16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
17 
18 
19 #ifdef __cplusplus
20 /* SwigValueWrapper is described in swig.swg */
21 template<typename T> class SwigValueWrapper {
22  struct SwigMovePointer {
23  T *ptr;
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; }
27  } pointer;
28  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
29  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
30 public:
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; }
35 };
36 
37 template <typename T> T SwigValueInit() {
38  return T();
39 }
40 #endif
41 
42 /* -----------------------------------------------------------------------------
43  * This section contains generic SWIG labels for method/variable
44  * declarations/attributes, and other compiler dependent labels.
45  * ----------------------------------------------------------------------------- */
46 
47 /* template workaround for compilers that cannot correctly implement the C++ standard */
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR
49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
50 # define SWIGTEMPLATEDISAMBIGUATOR template
51 # elif defined(__HP_aCC)
52 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
53 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
54 # define SWIGTEMPLATEDISAMBIGUATOR template
55 # else
56 # define SWIGTEMPLATEDISAMBIGUATOR
57 # endif
58 #endif
59 
60 /* inline attribute */
61 #ifndef SWIGINLINE
62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
63 # define SWIGINLINE inline
64 # else
65 # define SWIGINLINE
66 # endif
67 #endif
68 
69 /* attribute recognised by some compilers to avoid 'unused' warnings */
70 #ifndef SWIGUNUSED
71 # if defined(__GNUC__)
72 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
73 # define SWIGUNUSED __attribute__ ((__unused__))
74 # else
75 # define SWIGUNUSED
76 # endif
77 # elif defined(__ICC)
78 # define SWIGUNUSED __attribute__ ((__unused__))
79 # else
80 # define SWIGUNUSED
81 # endif
82 #endif
83 
84 #ifndef SWIG_MSC_UNSUPPRESS_4505
85 # if defined(_MSC_VER)
86 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
87 # endif
88 #endif
89 
90 #ifndef SWIGUNUSEDPARM
91 # ifdef __cplusplus
92 # define SWIGUNUSEDPARM(p)
93 # else
94 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
95 # endif
96 #endif
97 
98 /* internal SWIG method */
99 #ifndef SWIGINTERN
100 # define SWIGINTERN static SWIGUNUSED
101 #endif
102 
103 /* internal inline SWIG method */
104 #ifndef SWIGINTERNINLINE
105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
106 #endif
107 
108 /* exporting methods */
109 #if defined(__GNUC__)
110 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
111 # ifndef GCC_HASCLASSVISIBILITY
112 # define GCC_HASCLASSVISIBILITY
113 # endif
114 # endif
115 #endif
116 
117 #ifndef SWIGEXPORT
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 # if defined(STATIC_LINKED)
120 # define SWIGEXPORT
121 # else
122 # define SWIGEXPORT __declspec(dllexport)
123 # endif
124 # else
125 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 # define SWIGEXPORT __attribute__ ((visibility("default")))
127 # else
128 # define SWIGEXPORT
129 # endif
130 # endif
131 #endif
132 
133 /* calling conventions for Windows */
134 #ifndef SWIGSTDCALL
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 # define SWIGSTDCALL __stdcall
137 # else
138 # define SWIGSTDCALL
139 # endif
140 #endif
141 
142 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
145 #endif
146 
147 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
150 #endif
151 
152 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
155 #endif
156 
157 /* Intel's compiler complains if a variable which was never initialised is
158  * cast to void, which is a common idiom which we use to indicate that we
159  * are aware a variable isn't used. So we just silence that warning.
160  * See: https://github.com/swig/swig/issues/192 for more discussion.
161  */
162 #ifdef __INTEL_COMPILER
163 # pragma warning disable 592
164 #endif
165 
166 
167 #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
168 /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
169 # include <math.h>
170 #endif
171 
172 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
173 /* Use debug wrappers with the Python release dll */
174 # undef _DEBUG
175 # include <Python.h>
176 # define _DEBUG 1
177 #else
178 # include <Python.h>
179 #endif
180 
181 /* -----------------------------------------------------------------------------
182  * swigrun.swg
183  *
184  * This file contains generic C API SWIG runtime support for pointer
185  * type checking.
186  * ----------------------------------------------------------------------------- */
187 
188 /* This should only be incremented when either the layout of swig_type_info changes,
189  or for whatever reason, the runtime changes incompatibly */
190 #define SWIG_RUNTIME_VERSION "4"
191 
192 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
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)
197 #else
198 # define SWIG_TYPE_TABLE_NAME
199 #endif
200 
201 /*
202  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
203  creating a static or dynamic library from the SWIG runtime code.
204  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
205 
206  But only do this if strictly necessary, ie, if you have problems
207  with your compiler or suchlike.
208 */
209 
210 #ifndef SWIGRUNTIME
211 # define SWIGRUNTIME SWIGINTERN
212 #endif
213 
214 #ifndef SWIGRUNTIMEINLINE
215 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
216 #endif
217 
218 /* Generic buffer size */
219 #ifndef SWIG_BUFFER_SIZE
220 # define SWIG_BUFFER_SIZE 1024
221 #endif
222 
223 /* Flags for pointer conversions */
224 #define SWIG_POINTER_DISOWN 0x1
225 #define SWIG_CAST_NEW_MEMORY 0x2
226 #define SWIG_POINTER_NO_NULL 0x4
227 
228 /* Flags for new pointer objects */
229 #define SWIG_POINTER_OWN 0x1
230 
231 
232 /*
233  Flags/methods for returning states.
234 
235  The SWIG conversion methods, as ConvertPtr, return an integer
236  that tells if the conversion was successful or not. And if not,
237  an error code can be returned (see swigerrors.swg for the codes).
238 
239  Use the following macros/flags to set or process the returning
240  states.
241 
242  In old versions of SWIG, code such as the following was usually written:
243 
244  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
245  // success code
246  } else {
247  //fail code
248  }
249 
250  Now you can be more explicit:
251 
252  int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
253  if (SWIG_IsOK(res)) {
254  // success code
255  } else {
256  // fail code
257  }
258 
259  which is the same really, but now you can also do
260 
261  Type *ptr;
262  int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
263  if (SWIG_IsOK(res)) {
264  // success code
265  if (SWIG_IsNewObj(res) {
266  ...
267  delete *ptr;
268  } else {
269  ...
270  }
271  } else {
272  // fail code
273  }
274 
275  I.e., now SWIG_ConvertPtr can return new objects and you can
276  identify the case and take care of the deallocation. Of course that
277  also requires SWIG_ConvertPtr to return new result values, such as
278 
279  int SWIG_ConvertPtr(obj, ptr,...) {
280  if (<obj is ok>) {
281  if (<need new object>) {
282  *ptr = <ptr to new allocated object>;
283  return SWIG_NEWOBJ;
284  } else {
285  *ptr = <ptr to old object>;
286  return SWIG_OLDOBJ;
287  }
288  } else {
289  return SWIG_BADOBJ;
290  }
291  }
292 
293  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
294  more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
295  SWIG errors code.
296 
297  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
298  allows to return the 'cast rank', for example, if you have this
299 
300  int food(double)
301  int fooi(int);
302 
303  and you call
304 
305  food(1) // cast rank '1' (1 -> 1.0)
306  fooi(1) // cast rank '0'
307 
308  just use the SWIG_AddCast()/SWIG_CheckState()
309 */
310 
311 #define SWIG_OK (0)
312 #define SWIG_ERROR (-1)
313 #define SWIG_IsOK(r) (r >= 0)
314 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
315 
316 /* The CastRankLimit says how many bits are used for the cast rank */
317 #define SWIG_CASTRANKLIMIT (1 << 8)
318 /* The NewMask denotes the object was created (using new/malloc) */
319 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
320 /* The TmpMask is for in/out typemaps that use temporal objects */
321 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
322 /* Simple returning values */
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)
327 /* Check, add and del mask methods */
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))
334 
335 /* Cast-Rank Mode */
336 #if defined(SWIG_CASTRANK_MODE)
337 # ifndef SWIG_TypeRank
338 # define SWIG_TypeRank unsigned long
339 # endif
340 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
341 # define SWIG_MAXCASTRANK (2)
342 # endif
343 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
344 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
345 SWIGINTERNINLINE int SWIG_AddCast(int r) {
346  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
347 }
349  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
350 }
351 #else /* no cast-rank mode */
352 # define SWIG_AddCast(r) (r)
353 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
354 #endif
355 
356 
357 #include <string.h>
358 
359 #ifdef __cplusplus
360 extern "C" {
361 #endif
362 
363 typedef void *(*swig_converter_func)(void *, int *);
364 typedef struct swig_type_info *(*swig_dycast_func)(void **);
365 
366 /* Structure to store information on one type */
367 typedef struct swig_type_info {
368  const char *name; /* mangled name of this type */
369  const char *str; /* human readable name of this type */
370  swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
371  struct swig_cast_info *cast; /* linked list of types that can cast into this type */
372  void *clientdata; /* language specific type data */
373  int owndata; /* flag if the structure owns the clientdata */
375 
376 /* Structure to store a type and conversion function used for casting */
377 typedef struct swig_cast_info {
378  swig_type_info *type; /* pointer to type that is equivalent to this type */
379  swig_converter_func converter; /* function to cast the void pointers */
380  struct swig_cast_info *next; /* pointer to next cast in linked list */
381  struct swig_cast_info *prev; /* pointer to the previous cast */
383 
384 /* Structure used to store module information
385  * Each module generates one structure like this, and the runtime collects
386  * all of these structures and stores them in a circularly linked list.*/
387 typedef struct swig_module_info {
388  swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
389  size_t size; /* Number of types in this module */
390  struct swig_module_info *next; /* Pointer to next element in circularly linked list */
391  swig_type_info **type_initial; /* Array of initially generated type structures */
392  swig_cast_info **cast_initial; /* Array of initially generated casting structures */
393  void *clientdata; /* Language specific module data */
395 
396 /*
397  Compare two type names skipping the space characters, therefore
398  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
399 
400  Return 0 when the two name types are equivalent, as in
401  strncmp, but skipping ' '.
402 */
403 SWIGRUNTIME int
404 SWIG_TypeNameComp(const char *f1, const char *l1,
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;
410  }
411  return (int)((l1 - f1) - (l2 - f2));
412 }
413 
414 /*
415  Check type equivalence in a name list like <name1>|<name2>|...
416  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
417 */
418 SWIGRUNTIME int
419 SWIG_TypeCmp(const char *nb, const char *tb) {
420  int equiv = 1;
421  const char* te = tb + strlen(tb);
422  const char* ne = nb;
423  while (equiv != 0 && *ne) {
424  for (nb = ne; *ne; ++ne) {
425  if (*ne == '|') break;
426  }
427  equiv = SWIG_TypeNameComp(nb, ne, tb, te);
428  if (*ne) ++ne;
429  }
430  return equiv;
431 }
432 
433 /*
434  Check type equivalence in a name list like <name1>|<name2>|...
435  Return 0 if not equal, 1 if equal
436 */
437 SWIGRUNTIME int
438 SWIG_TypeEquiv(const char *nb, const char *tb) {
439  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
440 }
441 
442 /*
443  Check the typename
444 */
446 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
447  if (ty) {
448  swig_cast_info *iter = ty->cast;
449  while (iter) {
450  if (strcmp(iter->type->name, c) == 0) {
451  if (iter == ty->cast)
452  return iter;
453  /* Move iter to the top of the linked list */
454  iter->prev->next = iter->next;
455  if (iter->next)
456  iter->next->prev = iter->prev;
457  iter->next = ty->cast;
458  iter->prev = 0;
459  if (ty->cast) ty->cast->prev = iter;
460  ty->cast = iter;
461  return iter;
462  }
463  iter = iter->next;
464  }
465  }
466  return 0;
467 }
468 
469 /*
470  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
471 */
474  if (ty) {
475  swig_cast_info *iter = ty->cast;
476  while (iter) {
477  if (iter->type == from) {
478  if (iter == ty->cast)
479  return iter;
480  /* Move iter to the top of the linked list */
481  iter->prev->next = iter->next;
482  if (iter->next)
483  iter->next->prev = iter->prev;
484  iter->next = ty->cast;
485  iter->prev = 0;
486  if (ty->cast) ty->cast->prev = iter;
487  ty->cast = iter;
488  return iter;
489  }
490  iter = iter->next;
491  }
492  }
493  return 0;
494 }
495 
496 /*
497  Cast a pointer up an inheritance hierarchy
498 */
499 SWIGRUNTIMEINLINE void *
500 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
501  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
502 }
503 
504 /*
505  Dynamic pointer casting. Down an inheritance hierarchy
506 */
509  swig_type_info *lastty = ty;
510  if (!ty || !ty->dcast) return ty;
511  while (ty && (ty->dcast)) {
512  ty = (*ty->dcast)(ptr);
513  if (ty) lastty = ty;
514  }
515  return lastty;
516 }
517 
518 /*
519  Return the name associated with this type
520 */
521 SWIGRUNTIMEINLINE const char *
523  return ty->name;
524 }
525 
526 /*
527  Return the pretty name associated with this type,
528  that is an unmangled type name in a form presentable to the user.
529 */
530 SWIGRUNTIME const char *
532  /* The "str" field contains the equivalent pretty names of the
533  type, separated by vertical-bar characters. We choose
534  to print the last name, as it is often (?) the most
535  specific. */
536  if (!type) return NULL;
537  if (type->str != NULL) {
538  const char *last_name = type->str;
539  const char *s;
540  for (s = type->str; *s; s++)
541  if (*s == '|') last_name = s+1;
542  return last_name;
543  }
544  else
545  return type->name;
546 }
547 
548 /*
549  Set the clientdata field for a type
550 */
551 SWIGRUNTIME void
553  swig_cast_info *cast = ti->cast;
554  /* if (ti->clientdata == clientdata) return; */
555  ti->clientdata = clientdata;
556 
557  while (cast) {
558  if (!cast->converter) {
559  swig_type_info *tc = cast->type;
560  if (!tc->clientdata) {
562  }
563  }
564  cast = cast->next;
565  }
566 }
567 SWIGRUNTIME void
570  ti->owndata = 1;
571 }
572 
573 /*
574  Search for a swig_type_info structure only by mangled name
575  Search is a O(log #types)
576 
577  We start searching at module start, and finish searching when start == end.
578  Note: if start == end at the beginning of the function, we go all the way around
579  the circular list.
580 */
583  swig_module_info *end,
584  const char *name) {
585  swig_module_info *iter = start;
586  do {
587  if (iter->size) {
588  size_t l = 0;
589  size_t r = iter->size - 1;
590  do {
591  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
592  size_t i = (l + r) >> 1;
593  const char *iname = iter->types[i]->name;
594  if (iname) {
595  int compare = strcmp(name, iname);
596  if (compare == 0) {
597  return iter->types[i];
598  } else if (compare < 0) {
599  if (i) {
600  r = i - 1;
601  } else {
602  break;
603  }
604  } else if (compare > 0) {
605  l = i + 1;
606  }
607  } else {
608  break; /* should never happen */
609  }
610  } while (l <= r);
611  }
612  iter = iter->next;
613  } while (iter != end);
614  return 0;
615 }
616 
617 /*
618  Search for a swig_type_info structure for either a mangled name or a human readable name.
619  It first searches the mangled names of the types, which is a O(log #types)
620  If a type is not found it then searches the human readable names, which is O(#types).
621 
622  We start searching at module start, and finish searching when start == end.
623  Note: if start == end at the beginning of the function, we go all the way around
624  the circular list.
625 */
628  swig_module_info *end,
629  const char *name) {
630  /* STEP 1: Search the name field using binary search */
631  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
632  if (ret) {
633  return ret;
634  } else {
635  /* STEP 2: If the type hasn't been found, do a complete search
636  of the str field (the human readable name) */
637  swig_module_info *iter = start;
638  do {
639  size_t i = 0;
640  for (; i < iter->size; ++i) {
641  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
642  return iter->types[i];
643  }
644  iter = iter->next;
645  } while (iter != end);
646  }
647 
648  /* neither found a match */
649  return 0;
650 }
651 
652 /*
653  Pack binary data into a string
654 */
655 SWIGRUNTIME char *
656 SWIG_PackData(char *c, void *ptr, size_t sz) {
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];
664  }
665  return c;
666 }
667 
668 /*
669  Unpack binary data from a string
670 */
671 SWIGRUNTIME const char *
672 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
673  unsigned char *u = (unsigned char *) ptr;
674  const unsigned char *eu = u + sz;
675  for (; u != eu; ++u) {
676  char d = *(c++);
677  unsigned char uu;
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);
682  else
683  return (char *) 0;
684  d = *(c++);
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));
689  else
690  return (char *) 0;
691  *u = uu;
692  }
693  return c;
694 }
695 
696 /*
697  Pack 'void *' into a string buffer.
698 */
699 SWIGRUNTIME char *
700 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
701  char *r = buff;
702  if ((2*sizeof(void *) + 2) > bsz) return 0;
703  *(r++) = '_';
704  r = SWIG_PackData(r,&ptr,sizeof(void *));
705  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
706  strcpy(r,name);
707  return buff;
708 }
709 
710 SWIGRUNTIME const char *
711 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
712  if (*c != '_') {
713  if (strcmp(c,"NULL") == 0) {
714  *ptr = (void *) 0;
715  return name;
716  } else {
717  return 0;
718  }
719  }
720  return SWIG_UnpackData(++c,ptr,sizeof(void *));
721 }
722 
723 SWIGRUNTIME char *
724 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
725  char *r = buff;
726  size_t lname = (name ? strlen(name) : 0);
727  if ((2*sz + 2 + lname) > bsz) return 0;
728  *(r++) = '_';
729  r = SWIG_PackData(r,ptr,sz);
730  if (lname) {
731  strncpy(r,name,lname+1);
732  } else {
733  *r = 0;
734  }
735  return buff;
736 }
737 
738 SWIGRUNTIME const char *
739 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
740  if (*c != '_') {
741  if (strcmp(c,"NULL") == 0) {
742  memset(ptr,0,sz);
743  return name;
744  } else {
745  return 0;
746  }
747  }
748  return SWIG_UnpackData(++c,ptr,sz);
749 }
750 
751 #ifdef __cplusplus
752 }
753 #endif
754 
755 /* Errors in SWIG */
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
769 
770 
771 
772 /* Compatibility macros for Python 3 */
773 #if PY_VERSION_HEX >= 0x03000000
774 
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)
789 
790 #endif
791 
792 #ifndef Py_TYPE
793 # define Py_TYPE(op) ((op)->ob_type)
794 #endif
795 
796 /* SWIG APIs for compatibility of both Python 2 & 3 */
797 
798 #if PY_VERSION_HEX >= 0x03000000
799 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
800 #else
801 # define SWIG_Python_str_FromFormat PyString_FromFormat
802 #endif
803 
804 
805 /* Warning: This function will allocate a new string in Python 3,
806  * so please call SWIG_Python_str_DelForPy3(x) to free the space.
807  */
808 SWIGINTERN char*
810 {
811 #if PY_VERSION_HEX >= 0x03030000
812  return (char *)PyUnicode_AsUTF8(str);
813 #elif PY_VERSION_HEX >= 0x03000000
814  char *newstr = 0;
815  str = PyUnicode_AsUTF8String(str);
816  if (str) {
817  char *cstr;
818  Py_ssize_t len;
819  if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
820  newstr = (char *) malloc(len+1);
821  if (newstr)
822  memcpy(newstr, cstr, len+1);
823  }
824  Py_XDECREF(str);
825  }
826  return newstr;
827 #else
828  return PyString_AsString(str);
829 #endif
830 }
831 
832 #if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
833 # define SWIG_Python_str_DelForPy3(x)
834 #else
835 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
836 #endif
837 
838 
839 SWIGINTERN PyObject*
841 {
842 #if PY_VERSION_HEX >= 0x03000000
843  return PyUnicode_FromString(c);
844 #else
845  return PyString_FromString(c);
846 #endif
847 }
848 
849 #ifndef PyObject_DEL
850 # define PyObject_DEL PyObject_Del
851 #endif
852 
853 // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
854 // interface files check for it.
855 # define SWIGPY_USE_CAPSULE
856 # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
857 
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
862 #endif
863 
864 /* -----------------------------------------------------------------------------
865  * error manipulation
866  * ----------------------------------------------------------------------------- */
867 
868 SWIGRUNTIME PyObject*
870  PyObject* type = 0;
871  switch(code) {
872  case SWIG_MemoryError:
873  type = PyExc_MemoryError;
874  break;
875  case SWIG_IOError:
876  type = PyExc_IOError;
877  break;
878  case SWIG_RuntimeError:
879  type = PyExc_RuntimeError;
880  break;
881  case SWIG_IndexError:
882  type = PyExc_IndexError;
883  break;
884  case SWIG_TypeError:
885  type = PyExc_TypeError;
886  break;
887  case SWIG_DivisionByZero:
888  type = PyExc_ZeroDivisionError;
889  break;
890  case SWIG_OverflowError:
891  type = PyExc_OverflowError;
892  break;
893  case SWIG_SyntaxError:
894  type = PyExc_SyntaxError;
895  break;
896  case SWIG_ValueError:
897  type = PyExc_ValueError;
898  break;
899  case SWIG_SystemError:
900  type = PyExc_SystemError;
901  break;
902  case SWIG_AttributeError:
903  type = PyExc_AttributeError;
904  break;
905  default:
906  type = PyExc_RuntimeError;
907  }
908  return type;
909 }
910 
911 
912 SWIGRUNTIME void
913 SWIG_Python_AddErrorMsg(const char* mesg)
914 {
915  PyObject *type = 0;
916  PyObject *value = 0;
917  PyObject *traceback = 0;
918 
919  if (PyErr_Occurred())
920  PyErr_Fetch(&type, &value, &traceback);
921  if (value) {
922  PyObject *old_str = PyObject_Str(value);
923  const char *tmp = SWIG_Python_str_AsChar(old_str);
924  PyErr_Clear();
925  Py_XINCREF(type);
926  if (tmp)
927  PyErr_Format(type, "%s %s", tmp, mesg);
928  else
929  PyErr_Format(type, "%s", mesg);
931  Py_DECREF(old_str);
932  Py_DECREF(value);
933  } else {
934  PyErr_SetString(PyExc_RuntimeError, mesg);
935  }
936 }
937 
938 SWIGRUNTIME int
940 {
941  PyObject *error;
942  if (obj)
943  return 0;
944  error = PyErr_Occurred();
945  return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
946 }
947 
948 SWIGRUNTIME void
950 {
951  if (SWIG_Python_TypeErrorOccurred(NULL)) {
952  /* Use existing TypeError to preserve stacktrace and enhance with given message */
953  PyObject *newvalue;
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);
958 #else
959  newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
960 #endif
961  Py_XDECREF(value);
962  PyErr_Restore(type, newvalue, traceback);
963  } else {
964  /* Raise TypeError using given message */
965  PyErr_SetString(PyExc_TypeError, message);
966  }
967 }
968 
969 #if defined(SWIG_PYTHON_NO_THREADS)
970 # if defined(SWIG_PYTHON_THREADS)
971 # undef SWIG_PYTHON_THREADS
972 # endif
973 #endif
974 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
975 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
976 # define SWIG_PYTHON_USE_GIL
977 # endif
978 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
979 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
980 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
981 # endif
982 # ifdef __cplusplus /* C++ code */
983  class SWIG_Python_Thread_Block {
984  bool status;
985  PyGILState_STATE state;
986  public:
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(); }
990  };
991  class SWIG_Python_Thread_Allow {
992  bool status;
993  PyThreadState *save;
994  public:
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(); }
998  };
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()
1003 # else /* C code */
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)
1008 # endif
1009 # else /* Old thread way, not implemented, user must provide it */
1010 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1011 # define SWIG_PYTHON_INITIALIZE_THREADS
1012 # endif
1013 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1014 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1015 # endif
1016 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1017 # define SWIG_PYTHON_THREAD_END_BLOCK
1018 # endif
1019 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1020 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1021 # endif
1022 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1023 # define SWIG_PYTHON_THREAD_END_ALLOW
1024 # endif
1025 # endif
1026 #else /* No thread support */
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
1032 #endif
1033 
1034 /* -----------------------------------------------------------------------------
1035  * Python API portion that goes into the runtime
1036  * ----------------------------------------------------------------------------- */
1037 
1038 #ifdef __cplusplus
1039 extern "C" {
1040 #endif
1041 
1042 /* -----------------------------------------------------------------------------
1043  * Constant declarations
1044  * ----------------------------------------------------------------------------- */
1045 
1046 /* Constant Types */
1047 #define SWIG_PY_POINTER 4
1048 #define SWIG_PY_BINARY 5
1049 
1050 /* Constant information structure */
1051 typedef struct swig_const_info {
1052  int type;
1053  const char *name;
1054  long lvalue;
1055  double dvalue;
1056  void *pvalue;
1059 
1060 #ifdef __cplusplus
1061 }
1062 #endif
1063 
1064 
1065 /* -----------------------------------------------------------------------------
1066  * pyrun.swg
1067  *
1068  * This file contains the runtime support for Python modules
1069  * and includes code for managing global variables and pointer
1070  * type checking.
1071  *
1072  * ----------------------------------------------------------------------------- */
1073 
1074 #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1075 # error "This version of SWIG only supports Python >= 2.7"
1076 #endif
1077 
1078 #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1079 # error "This version of SWIG only supports Python 3 >= 3.2"
1080 #endif
1081 
1082 /* Common SWIG API */
1083 
1084 /* for raw pointers */
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)
1088 
1089 #ifdef SWIGPYTHON_BUILTIN
1090 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1091 #else
1092 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1093 #endif
1094 
1095 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1096 
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
1100 
1101 /* for raw packed data */
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)
1104 
1105 /* for class or struct pointers */
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)
1108 
1109 /* for C or C++ function pointers */
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)
1112 
1113 /* for C++ member pointers, ie, member methods */
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)
1116 
1117 
1118 /* Runtime API */
1119 
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)
1123 
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
1129 
1130 
1131 /* Runtime API implementation */
1132 
1133 /* Error manipulation */
1134 
1135 SWIGINTERN void
1136 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1138  PyErr_SetObject(errtype, obj);
1139  Py_DECREF(obj);
1141 }
1142 
1143 SWIGINTERN void
1144 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1146  PyErr_SetString(errtype, msg);
1148 }
1149 
1150 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1151 
1152 /* Set a constant value */
1153 
1154 #if defined(SWIGPYTHON_BUILTIN)
1155 
1156 SWIGINTERN void
1157 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1158  PyObject *s = PyString_InternFromString(key);
1159  PyList_Append(seq, s);
1160  Py_DECREF(s);
1161 }
1162 
1163 SWIGINTERN void
1164 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1165  PyDict_SetItemString(d, name, obj);
1166  Py_DECREF(obj);
1167  if (public_interface)
1168  SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1169 }
1170 
1171 #else
1172 
1173 SWIGINTERN void
1174 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1175  PyDict_SetItemString(d, name, obj);
1176  Py_DECREF(obj);
1177 }
1178 
1179 #endif
1180 
1181 /* Append a value to the result obj */
1182 
1183 SWIGINTERN PyObject*
1184 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1185  if (!result) {
1186  result = obj;
1187  } else if (result == Py_None) {
1188  Py_DECREF(result);
1189  result = obj;
1190  } else {
1191  if (!PyList_Check(result)) {
1192  PyObject *o2 = result;
1193  result = PyList_New(1);
1194  PyList_SetItem(result, 0, o2);
1195  }
1196  PyList_Append(result,obj);
1197  Py_DECREF(obj);
1198  }
1199  return result;
1200 }
1201 
1202 /* Unpack the argument tuple */
1203 
1204 SWIGINTERN Py_ssize_t
1205 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1206 {
1207  if (!args) {
1208  if (!min && !max) {
1209  return 1;
1210  } else {
1211  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1212  name, (min == max ? "" : "at least "), (int)min);
1213  return 0;
1214  }
1215  }
1216  if (!PyTuple_Check(args)) {
1217  if (min <= 1 && max >= 1) {
1218  Py_ssize_t i;
1219  objs[0] = args;
1220  for (i = 1; i < max; ++i) {
1221  objs[i] = 0;
1222  }
1223  return 2;
1224  }
1225  PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1226  return 0;
1227  } else {
1228  Py_ssize_t l = PyTuple_GET_SIZE(args);
1229  if (l < min) {
1230  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1231  name, (min == max ? "" : "at least "), (int)min, (int)l);
1232  return 0;
1233  } else if (l > max) {
1234  PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1235  name, (min == max ? "" : "at most "), (int)max, (int)l);
1236  return 0;
1237  } else {
1238  Py_ssize_t i;
1239  for (i = 0; i < l; ++i) {
1240  objs[i] = PyTuple_GET_ITEM(args, i);
1241  }
1242  for (; l < max; ++l) {
1243  objs[l] = 0;
1244  }
1245  return i + 1;
1246  }
1247  }
1248 }
1249 
1250 SWIGINTERN int
1251 SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
1252  int no_kwargs = 1;
1253  if (kwargs) {
1254  assert(PyDict_Check(kwargs));
1255  if (PyDict_Size(kwargs) > 0) {
1256  PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
1257  no_kwargs = 0;
1258  }
1259  }
1260  return no_kwargs;
1261 }
1262 
1263 /* A functor is a function object with one single object argument */
1264 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1265 
1266 /*
1267  Helper for static pointer initialization for both C and C++ code, for example
1268  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1269 */
1270 #ifdef __cplusplus
1271 #define SWIG_STATIC_POINTER(var) var
1272 #else
1273 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1274 #endif
1275 
1276 /* -----------------------------------------------------------------------------
1277  * Pointer declarations
1278  * ----------------------------------------------------------------------------- */
1279 
1280 /* Flags for new pointer objects */
1281 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1282 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1283 
1284 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1285 
1286 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1287 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1288 
1289 #ifdef __cplusplus
1290 extern "C" {
1291 #endif
1292 
1293 /* The python void return value */
1294 
1295 SWIGRUNTIMEINLINE PyObject *
1297 {
1298  PyObject *none = Py_None;
1299  Py_INCREF(none);
1300  return none;
1301 }
1302 
1303 /* SwigPyClientData */
1304 
1305 typedef struct {
1306  PyObject *klass;
1307  PyObject *newraw;
1308  PyObject *newargs;
1309  PyObject *destroy;
1310  int delargs;
1311  int implicitconv;
1312  PyTypeObject *pytype;
1314 
1315 SWIGRUNTIMEINLINE int
1317 {
1319  int fail = data ? data->implicitconv : 0;
1320  if (fail)
1321  PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1322  return fail;
1323 }
1324 
1325 SWIGRUNTIMEINLINE PyObject *
1327  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1328  PyObject *klass = data ? data->klass : 0;
1329  return (klass ? klass : PyExc_RuntimeError);
1330 }
1331 
1332 
1334 SwigPyClientData_New(PyObject* obj)
1335 {
1336  if (!obj) {
1337  return 0;
1338  } else {
1340  /* the klass element */
1341  data->klass = obj;
1342  Py_INCREF(data->klass);
1343  /* the newraw method and newargs arguments used to create a new raw instance */
1344  if (PyClass_Check(obj)) {
1345  data->newraw = 0;
1346  data->newargs = obj;
1347  Py_INCREF(obj);
1348  } else {
1349  data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1350  if (data->newraw) {
1351  Py_INCREF(data->newraw);
1352  data->newargs = PyTuple_New(1);
1353  PyTuple_SetItem(data->newargs, 0, obj);
1354  } else {
1355  data->newargs = obj;
1356  }
1357  Py_INCREF(data->newargs);
1358  }
1359  /* the destroy method, aka as the C++ delete method */
1360  data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1361  if (PyErr_Occurred()) {
1362  PyErr_Clear();
1363  data->destroy = 0;
1364  }
1365  if (data->destroy) {
1366  int flags;
1367  Py_INCREF(data->destroy);
1368  flags = PyCFunction_GET_FLAGS(data->destroy);
1369  data->delargs = !(flags & (METH_O));
1370  } else {
1371  data->delargs = 0;
1372  }
1373  data->implicitconv = 0;
1374  data->pytype = 0;
1375  return data;
1376  }
1377 }
1378 
1379 SWIGRUNTIME void
1381  Py_XDECREF(data->newraw);
1382  Py_XDECREF(data->newargs);
1383  Py_XDECREF(data->destroy);
1384 }
1385 
1386 /* =============== SwigPyObject =====================*/
1387 
1388 typedef struct {
1389  PyObject_HEAD
1390  void *ptr;
1391  swig_type_info *ty;
1392  int own;
1393  PyObject *next;
1394 #ifdef SWIGPYTHON_BUILTIN
1395  PyObject *dict;
1396 #endif
1397 } SwigPyObject;
1398 
1399 
1400 #ifdef SWIGPYTHON_BUILTIN
1401 
1402 SWIGRUNTIME PyObject *
1403 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1404 {
1405  SwigPyObject *sobj = (SwigPyObject *)v;
1406 
1407  if (!sobj->dict)
1408  sobj->dict = PyDict_New();
1409 
1410  Py_INCREF(sobj->dict);
1411  return sobj->dict;
1412 }
1413 
1414 #endif
1415 
1416 SWIGRUNTIME PyObject *
1418 {
1419  return PyLong_FromVoidPtr(v->ptr);
1420 }
1421 
1422 SWIGRUNTIME PyObject *
1423 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1424 {
1425  PyObject *res = NULL;
1426  PyObject *args = PyTuple_New(1);
1427  if (args) {
1428  if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1429  PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1430  if (ofmt) {
1431 #if PY_VERSION_HEX >= 0x03000000
1432  res = PyUnicode_Format(ofmt,args);
1433 #else
1434  res = PyString_Format(ofmt,args);
1435 #endif
1436  Py_DECREF(ofmt);
1437  }
1438  Py_DECREF(args);
1439  }
1440  }
1441  return res;
1442 }
1443 
1444 SWIGRUNTIME PyObject *
1446 {
1447  return SwigPyObject_format("%o",v);
1448 }
1449 
1450 SWIGRUNTIME PyObject *
1452 {
1453  return SwigPyObject_format("%x",v);
1454 }
1455 
1456 SWIGRUNTIME PyObject *
1458 {
1459  const char *name = SWIG_TypePrettyName(v->ty);
1460  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1461  if (v->next) {
1462  PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1463 # if PY_VERSION_HEX >= 0x03000000
1464  PyObject *joined = PyUnicode_Concat(repr, nrep);
1465  Py_DecRef(repr);
1466  Py_DecRef(nrep);
1467  repr = joined;
1468 # else
1469  PyString_ConcatAndDel(&repr,nrep);
1470 # endif
1471  }
1472  return repr;
1473 }
1474 
1475 /* We need a version taking two PyObject* parameters so it's a valid
1476  * PyCFunction to use in swigobject_methods[]. */
1477 SWIGRUNTIME PyObject *
1478 SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1479 {
1480  return SwigPyObject_repr((SwigPyObject*)v);
1481 }
1482 
1483 SWIGRUNTIME int
1485 {
1486  void *i = v->ptr;
1487  void *j = w->ptr;
1488  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1489 }
1490 
1491 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1492 SWIGRUNTIME PyObject*
1494 {
1495  PyObject* res;
1496  if( op != Py_EQ && op != Py_NE ) {
1497  Py_INCREF(Py_NotImplemented);
1498  return Py_NotImplemented;
1499  }
1500  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1501  return res;
1502 }
1503 
1504 
1505 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1506 
1507 #ifdef SWIGPYTHON_BUILTIN
1508 static swig_type_info *SwigPyObject_stype = 0;
1509 SWIGRUNTIME PyTypeObject*
1510 SwigPyObject_type(void) {
1511  SwigPyClientData *cd;
1512  assert(SwigPyObject_stype);
1513  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1514  assert(cd);
1515  assert(cd->pytype);
1516  return cd->pytype;
1517 }
1518 #else
1519 SWIGRUNTIME PyTypeObject*
1521  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1522  return type;
1523 }
1524 #endif
1525 
1527 SwigPyObject_Check(PyObject *op) {
1528 #ifdef SWIGPYTHON_BUILTIN
1529  PyTypeObject *target_tp = SwigPyObject_type();
1530  if (PyType_IsSubtype(op->ob_type, target_tp))
1531  return 1;
1532  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1533 #else
1534  return (Py_TYPE(op) == SwigPyObject_type())
1535  || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1536 #endif
1537 }
1538 
1539 SWIGRUNTIME PyObject *
1540 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1541 
1542 SWIGRUNTIME void
1544 {
1545  SwigPyObject *sobj = (SwigPyObject *) v;
1546  PyObject *next = sobj->next;
1547  if (sobj->own == SWIG_POINTER_OWN) {
1548  swig_type_info *ty = sobj->ty;
1549  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1550  PyObject *destroy = data ? data->destroy : 0;
1551  if (destroy) {
1552  /* destroy is always a VARARGS method */
1553  PyObject *res;
1554 
1555  /* PyObject_CallFunction() has the potential to silently drop
1556  the active exception. In cases of unnamed temporary
1557  variable or where we just finished iterating over a generator
1558  StopIteration will be active right now, and this needs to
1559  remain true upon return from SwigPyObject_dealloc. So save
1560  and restore. */
1561 
1562  PyObject *type = NULL, *value = NULL, *traceback = NULL;
1563  PyErr_Fetch(&type, &value, &traceback);
1564 
1565  if (data->delargs) {
1566  /* we need to create a temporary object to carry the destroy operation */
1567  PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1568  res = SWIG_Python_CallFunctor(destroy, tmp);
1569  Py_DECREF(tmp);
1570  } else {
1571  PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1572  PyObject *mself = PyCFunction_GET_SELF(destroy);
1573  res = ((*meth)(mself, v));
1574  }
1575  if (!res)
1576  PyErr_WriteUnraisable(destroy);
1577 
1578  PyErr_Restore(type, value, traceback);
1579 
1580  Py_XDECREF(res);
1581  }
1582 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1583  else {
1584  const char *name = SWIG_TypePrettyName(ty);
1585  printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1586  }
1587 #endif
1588  }
1589  Py_XDECREF(next);
1590  PyObject_DEL(v);
1591 }
1592 
1593 SWIGRUNTIME PyObject*
1594 SwigPyObject_append(PyObject* v, PyObject* next)
1595 {
1596  SwigPyObject *sobj = (SwigPyObject *) v;
1597  if (!SwigPyObject_Check(next)) {
1598  PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1599  return NULL;
1600  }
1601  sobj->next = next;
1602  Py_INCREF(next);
1603  return SWIG_Py_Void();
1604 }
1605 
1606 SWIGRUNTIME PyObject*
1607 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1608 {
1609  SwigPyObject *sobj = (SwigPyObject *) v;
1610  if (sobj->next) {
1611  Py_INCREF(sobj->next);
1612  return sobj->next;
1613  } else {
1614  return SWIG_Py_Void();
1615  }
1616 }
1617 
1618 SWIGINTERN PyObject*
1619 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1620 {
1621  SwigPyObject *sobj = (SwigPyObject *)v;
1622  sobj->own = 0;
1623  return SWIG_Py_Void();
1624 }
1625 
1626 SWIGINTERN PyObject*
1627 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1628 {
1629  SwigPyObject *sobj = (SwigPyObject *)v;
1630  sobj->own = SWIG_POINTER_OWN;
1631  return SWIG_Py_Void();
1632 }
1633 
1634 SWIGINTERN PyObject*
1635 SwigPyObject_own(PyObject *v, PyObject *args)
1636 {
1637  PyObject *val = 0;
1638  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1639  return NULL;
1640  } else {
1641  SwigPyObject *sobj = (SwigPyObject *)v;
1642  PyObject *obj = PyBool_FromLong(sobj->own);
1643  if (val) {
1644  if (PyObject_IsTrue(val)) {
1645  SwigPyObject_acquire(v,args);
1646  } else {
1647  SwigPyObject_disown(v,args);
1648  }
1649  }
1650  return obj;
1651  }
1652 }
1653 
1654 static PyMethodDef
1656  {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1657  {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1658  {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
1659  {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
1660  {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
1661  {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
1662  {0, 0, 0, 0}
1663 };
1664 
1665 SWIGRUNTIME PyTypeObject*
1667  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1668 
1669  static PyNumberMethods SwigPyObject_as_number = {
1670  (binaryfunc)0, /*nb_add*/
1671  (binaryfunc)0, /*nb_subtract*/
1672  (binaryfunc)0, /*nb_multiply*/
1673  /* nb_divide removed in Python 3 */
1674 #if PY_VERSION_HEX < 0x03000000
1675  (binaryfunc)0, /*nb_divide*/
1676 #endif
1677  (binaryfunc)0, /*nb_remainder*/
1678  (binaryfunc)0, /*nb_divmod*/
1679  (ternaryfunc)0,/*nb_power*/
1680  (unaryfunc)0, /*nb_negative*/
1681  (unaryfunc)0, /*nb_positive*/
1682  (unaryfunc)0, /*nb_absolute*/
1683  (inquiry)0, /*nb_nonzero*/
1684  0, /*nb_invert*/
1685  0, /*nb_lshift*/
1686  0, /*nb_rshift*/
1687  0, /*nb_and*/
1688  0, /*nb_xor*/
1689  0, /*nb_or*/
1690 #if PY_VERSION_HEX < 0x03000000
1691  0, /*nb_coerce*/
1692 #endif
1693  (unaryfunc)SwigPyObject_long, /*nb_int*/
1694 #if PY_VERSION_HEX < 0x03000000
1695  (unaryfunc)SwigPyObject_long, /*nb_long*/
1696 #else
1697  0, /*nb_reserved*/
1698 #endif
1699  (unaryfunc)0, /*nb_float*/
1700 #if PY_VERSION_HEX < 0x03000000
1701  (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1702  (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1703 #endif
1704 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1705  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1706 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1707  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1708 #else
1709  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1710 #endif
1711  };
1712 
1713  static PyTypeObject swigpyobject_type;
1714  static int type_init = 0;
1715  if (!type_init) {
1716  const PyTypeObject tmp = {
1717 #if PY_VERSION_HEX >= 0x03000000
1718  PyVarObject_HEAD_INIT(NULL, 0)
1719 #else
1720  PyObject_HEAD_INIT(NULL)
1721  0, /* ob_size */
1722 #endif
1723  "SwigPyObject", /* tp_name */
1724  sizeof(SwigPyObject), /* tp_basicsize */
1725  0, /* tp_itemsize */
1726  (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1727  0, /* tp_print */
1728  (getattrfunc)0, /* tp_getattr */
1729  (setattrfunc)0, /* tp_setattr */
1730 #if PY_VERSION_HEX >= 0x03000000
1731  0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1732 #else
1733  (cmpfunc)SwigPyObject_compare, /* tp_compare */
1734 #endif
1735  (reprfunc)SwigPyObject_repr, /* tp_repr */
1736  &SwigPyObject_as_number, /* tp_as_number */
1737  0, /* tp_as_sequence */
1738  0, /* tp_as_mapping */
1739  (hashfunc)0, /* tp_hash */
1740  (ternaryfunc)0, /* tp_call */
1741  0, /* tp_str */
1742  PyObject_GenericGetAttr, /* tp_getattro */
1743  0, /* tp_setattro */
1744  0, /* tp_as_buffer */
1745  Py_TPFLAGS_DEFAULT, /* tp_flags */
1746  swigobject_doc, /* tp_doc */
1747  0, /* tp_traverse */
1748  0, /* tp_clear */
1749  (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1750  0, /* tp_weaklistoffset */
1751  0, /* tp_iter */
1752  0, /* tp_iternext */
1753  swigobject_methods, /* tp_methods */
1754  0, /* tp_members */
1755  0, /* tp_getset */
1756  0, /* tp_base */
1757  0, /* tp_dict */
1758  0, /* tp_descr_get */
1759  0, /* tp_descr_set */
1760  0, /* tp_dictoffset */
1761  0, /* tp_init */
1762  0, /* tp_alloc */
1763  0, /* tp_new */
1764  0, /* tp_free */
1765  0, /* tp_is_gc */
1766  0, /* tp_bases */
1767  0, /* tp_mro */
1768  0, /* tp_cache */
1769  0, /* tp_subclasses */
1770  0, /* tp_weaklist */
1771  0, /* tp_del */
1772  0, /* tp_version_tag */
1773 #if PY_VERSION_HEX >= 0x03040000
1774  0, /* tp_finalize */
1775 #endif
1776 #if PY_VERSION_HEX >= 0x03080000
1777  0, /* tp_vectorcall */
1778 #endif
1779 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1780  0, /* tp_print */
1781 #endif
1782 #ifdef COUNT_ALLOCS
1783  0, /* tp_allocs */
1784  0, /* tp_frees */
1785  0, /* tp_maxalloc */
1786  0, /* tp_prev */
1787  0 /* tp_next */
1788 #endif
1789  };
1790  swigpyobject_type = tmp;
1791  type_init = 1;
1792  if (PyType_Ready(&swigpyobject_type) < 0)
1793  return NULL;
1794  }
1795  return &swigpyobject_type;
1796 }
1797 
1798 SWIGRUNTIME PyObject *
1799 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1800 {
1801  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1802  if (sobj) {
1803  sobj->ptr = ptr;
1804  sobj->ty = ty;
1805  sobj->own = own;
1806  sobj->next = 0;
1807  }
1808  return (PyObject *)sobj;
1809 }
1810 
1811 /* -----------------------------------------------------------------------------
1812  * Implements a simple Swig Packed type, and use it instead of string
1813  * ----------------------------------------------------------------------------- */
1814 
1815 typedef struct {
1816  PyObject_HEAD
1817  void *pack;
1818  swig_type_info *ty;
1819  size_t size;
1820 } SwigPyPacked;
1821 
1822 SWIGRUNTIME PyObject *
1824 {
1825  char result[SWIG_BUFFER_SIZE];
1826  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1827  return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1828  } else {
1829  return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1830  }
1831 }
1832 
1833 SWIGRUNTIME PyObject *
1835 {
1836  char result[SWIG_BUFFER_SIZE];
1837  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1838  return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1839  } else {
1840  return SWIG_Python_str_FromChar(v->ty->name);
1841  }
1842 }
1843 
1844 SWIGRUNTIME int
1846 {
1847  size_t i = v->size;
1848  size_t j = w->size;
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);
1851 }
1852 
1853 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1854 
1855 SWIGRUNTIME PyTypeObject*
1857  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1858  return type;
1859 }
1860 
1862 SwigPyPacked_Check(PyObject *op) {
1863  return ((op)->ob_type == SwigPyPacked_TypeOnce())
1864  || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1865 }
1866 
1867 SWIGRUNTIME void
1869 {
1870  if (SwigPyPacked_Check(v)) {
1871  SwigPyPacked *sobj = (SwigPyPacked *) v;
1872  free(sobj->pack);
1873  }
1874  PyObject_DEL(v);
1875 }
1876 
1877 SWIGRUNTIME PyTypeObject*
1879  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1880  static PyTypeObject swigpypacked_type;
1881  static int type_init = 0;
1882  if (!type_init) {
1883  const PyTypeObject tmp = {
1884 #if PY_VERSION_HEX>=0x03000000
1885  PyVarObject_HEAD_INIT(NULL, 0)
1886 #else
1887  PyObject_HEAD_INIT(NULL)
1888  0, /* ob_size */
1889 #endif
1890  "SwigPyPacked", /* tp_name */
1891  sizeof(SwigPyPacked), /* tp_basicsize */
1892  0, /* tp_itemsize */
1893  (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1894  0, /* tp_print */
1895  (getattrfunc)0, /* tp_getattr */
1896  (setattrfunc)0, /* tp_setattr */
1897 #if PY_VERSION_HEX>=0x03000000
1898  0, /* tp_reserved in 3.0.1 */
1899 #else
1900  (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1901 #endif
1902  (reprfunc)SwigPyPacked_repr, /* tp_repr */
1903  0, /* tp_as_number */
1904  0, /* tp_as_sequence */
1905  0, /* tp_as_mapping */
1906  (hashfunc)0, /* tp_hash */
1907  (ternaryfunc)0, /* tp_call */
1908  (reprfunc)SwigPyPacked_str, /* tp_str */
1909  PyObject_GenericGetAttr, /* tp_getattro */
1910  0, /* tp_setattro */
1911  0, /* tp_as_buffer */
1912  Py_TPFLAGS_DEFAULT, /* tp_flags */
1913  swigpacked_doc, /* tp_doc */
1914  0, /* tp_traverse */
1915  0, /* tp_clear */
1916  0, /* tp_richcompare */
1917  0, /* tp_weaklistoffset */
1918  0, /* tp_iter */
1919  0, /* tp_iternext */
1920  0, /* tp_methods */
1921  0, /* tp_members */
1922  0, /* tp_getset */
1923  0, /* tp_base */
1924  0, /* tp_dict */
1925  0, /* tp_descr_get */
1926  0, /* tp_descr_set */
1927  0, /* tp_dictoffset */
1928  0, /* tp_init */
1929  0, /* tp_alloc */
1930  0, /* tp_new */
1931  0, /* tp_free */
1932  0, /* tp_is_gc */
1933  0, /* tp_bases */
1934  0, /* tp_mro */
1935  0, /* tp_cache */
1936  0, /* tp_subclasses */
1937  0, /* tp_weaklist */
1938  0, /* tp_del */
1939  0, /* tp_version_tag */
1940 #if PY_VERSION_HEX >= 0x03040000
1941  0, /* tp_finalize */
1942 #endif
1943 #if PY_VERSION_HEX >= 0x03080000
1944  0, /* tp_vectorcall */
1945 #endif
1946 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
1947  0, /* tp_print */
1948 #endif
1949 #ifdef COUNT_ALLOCS
1950  0, /* tp_allocs */
1951  0, /* tp_frees */
1952  0, /* tp_maxalloc */
1953  0, /* tp_prev */
1954  0 /* tp_next */
1955 #endif
1956  };
1957  swigpypacked_type = tmp;
1958  type_init = 1;
1959  if (PyType_Ready(&swigpypacked_type) < 0)
1960  return NULL;
1961  }
1962  return &swigpypacked_type;
1963 }
1964 
1965 SWIGRUNTIME PyObject *
1966 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
1967 {
1968  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
1969  if (sobj) {
1970  void *pack = malloc(size);
1971  if (pack) {
1972  memcpy(pack, ptr, size);
1973  sobj->pack = pack;
1974  sobj->ty = ty;
1975  sobj->size = size;
1976  } else {
1977  PyObject_DEL((PyObject *) sobj);
1978  sobj = 0;
1979  }
1980  }
1981  return (PyObject *) sobj;
1982 }
1983 
1985 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1986 {
1987  if (SwigPyPacked_Check(obj)) {
1988  SwigPyPacked *sobj = (SwigPyPacked *)obj;
1989  if (sobj->size != size) return 0;
1990  memcpy(ptr, sobj->pack, size);
1991  return sobj->ty;
1992  } else {
1993  return 0;
1994  }
1995 }
1996 
1997 /* -----------------------------------------------------------------------------
1998  * pointers/data manipulation
1999  * ----------------------------------------------------------------------------- */
2000 
2001 static PyObject *Swig_This_global = NULL;
2002 
2003 SWIGRUNTIME PyObject *
2005 {
2006  if (Swig_This_global == NULL)
2008  return Swig_This_global;
2009 }
2010 
2011 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2012 
2013 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2014 #if PY_VERSION_HEX>=0x03000000
2015 #define SWIG_PYTHON_SLOW_GETSET_THIS
2016 #endif
2017 
2019 SWIG_Python_GetSwigThis(PyObject *pyobj)
2020 {
2021  PyObject *obj;
2022 
2023  if (SwigPyObject_Check(pyobj))
2024  return (SwigPyObject *) pyobj;
2025 
2026 #ifdef SWIGPYTHON_BUILTIN
2027  (void)obj;
2028 # ifdef PyWeakref_CheckProxy
2029  if (PyWeakref_CheckProxy(pyobj)) {
2030  pyobj = PyWeakref_GET_OBJECT(pyobj);
2031  if (pyobj && SwigPyObject_Check(pyobj))
2032  return (SwigPyObject*) pyobj;
2033  }
2034 # endif
2035  return NULL;
2036 #else
2037 
2038  obj = 0;
2039 
2040 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2041  if (PyInstance_Check(pyobj)) {
2042  obj = _PyInstance_Lookup(pyobj, SWIG_This());
2043  } else {
2044  PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2045  if (dictptr != NULL) {
2046  PyObject *dict = *dictptr;
2047  obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2048  } else {
2049 #ifdef PyWeakref_CheckProxy
2050  if (PyWeakref_CheckProxy(pyobj)) {
2051  PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2052  return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2053  }
2054 #endif
2055  obj = PyObject_GetAttr(pyobj,SWIG_This());
2056  if (obj) {
2057  Py_DECREF(obj);
2058  } else {
2059  if (PyErr_Occurred()) PyErr_Clear();
2060  return 0;
2061  }
2062  }
2063  }
2064 #else
2065  obj = PyObject_GetAttr(pyobj,SWIG_This());
2066  if (obj) {
2067  Py_DECREF(obj);
2068  } else {
2069  if (PyErr_Occurred()) PyErr_Clear();
2070  return 0;
2071  }
2072 #endif
2073  if (obj && !SwigPyObject_Check(obj)) {
2074  /* a PyObject is called 'this', try to get the 'real this'
2075  SwigPyObject from it */
2076  return SWIG_Python_GetSwigThis(obj);
2077  }
2078  return (SwigPyObject *)obj;
2079 #endif
2080 }
2081 
2082 /* Acquire a pointer value */
2083 
2084 SWIGRUNTIME int
2085 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2086  if (own == SWIG_POINTER_OWN) {
2088  if (sobj) {
2089  int oldown = sobj->own;
2090  sobj->own = own;
2091  return oldown;
2092  }
2093  }
2094  return 0;
2095 }
2096 
2097 /* Convert a pointer value */
2098 
2099 SWIGRUNTIME int
2100 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2101  int res;
2102  SwigPyObject *sobj;
2103  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2104 
2105  if (!obj)
2106  return SWIG_ERROR;
2107  if (obj == Py_None && !implicit_conv) {
2108  if (ptr)
2109  *ptr = 0;
2111  }
2112 
2113  res = SWIG_ERROR;
2114 
2115  sobj = SWIG_Python_GetSwigThis(obj);
2116  if (own)
2117  *own = 0;
2118  while (sobj) {
2119  void *vptr = sobj->ptr;
2120  if (ty) {
2121  swig_type_info *to = sobj->ty;
2122  if (to == ty) {
2123  /* no type cast needed */
2124  if (ptr) *ptr = vptr;
2125  break;
2126  } else {
2127  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2128  if (!tc) {
2129  sobj = (SwigPyObject *)sobj->next;
2130  } else {
2131  if (ptr) {
2132  int newmemory = 0;
2133  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2134  if (newmemory == SWIG_CAST_NEW_MEMORY) {
2135  assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2136  if (own)
2137  *own = *own | SWIG_CAST_NEW_MEMORY;
2138  }
2139  }
2140  break;
2141  }
2142  }
2143  } else {
2144  if (ptr) *ptr = vptr;
2145  break;
2146  }
2147  }
2148  if (sobj) {
2149  if (own)
2150  *own = *own | sobj->own;
2151  if (flags & SWIG_POINTER_DISOWN) {
2152  sobj->own = 0;
2153  }
2154  res = SWIG_OK;
2155  } else {
2156  if (implicit_conv) {
2157  SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2158  if (data && !data->implicitconv) {
2159  PyObject *klass = data->klass;
2160  if (klass) {
2161  PyObject *impconv;
2162  data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2163  impconv = SWIG_Python_CallFunctor(klass, obj);
2164  data->implicitconv = 0;
2165  if (PyErr_Occurred()) {
2166  PyErr_Clear();
2167  impconv = 0;
2168  }
2169  if (impconv) {
2170  SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2171  if (iobj) {
2172  void *vptr;
2173  res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2174  if (SWIG_IsOK(res)) {
2175  if (ptr) {
2176  *ptr = vptr;
2177  /* transfer the ownership to 'ptr' */
2178  iobj->own = 0;
2179  res = SWIG_AddCast(res);
2180  res = SWIG_AddNewMask(res);
2181  } else {
2182  res = SWIG_AddCast(res);
2183  }
2184  }
2185  }
2186  Py_DECREF(impconv);
2187  }
2188  }
2189  }
2190  if (!SWIG_IsOK(res) && obj == Py_None) {
2191  if (ptr)
2192  *ptr = 0;
2193  if (PyErr_Occurred())
2194  PyErr_Clear();
2195  res = SWIG_OK;
2196  }
2197  }
2198  }
2199  return res;
2200 }
2201 
2202 /* Convert a function ptr value */
2203 
2204 SWIGRUNTIME int
2205 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2206  if (!PyCFunction_Check(obj)) {
2207  return SWIG_ConvertPtr(obj, ptr, ty, 0);
2208  } else {
2209  void *vptr = 0;
2210  swig_cast_info *tc;
2211 
2212  /* here we get the method pointer for callbacks */
2213  const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2214  const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2215  if (desc)
2216  desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2217  if (!desc)
2218  return SWIG_ERROR;
2219  tc = SWIG_TypeCheck(desc,ty);
2220  if (tc) {
2221  int newmemory = 0;
2222  *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2223  assert(!newmemory); /* newmemory handling not yet implemented */
2224  } else {
2225  return SWIG_ERROR;
2226  }
2227  return SWIG_OK;
2228  }
2229 }
2230 
2231 /* Convert a packed pointer value */
2232 
2233 SWIGRUNTIME int
2234 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2235  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2236  if (!to) return SWIG_ERROR;
2237  if (ty) {
2238  if (to != ty) {
2239  /* check type cast? */
2240  swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2241  if (!tc) return SWIG_ERROR;
2242  }
2243  }
2244  return SWIG_OK;
2245 }
2246 
2247 /* -----------------------------------------------------------------------------
2248  * Create a new pointer object
2249  * ----------------------------------------------------------------------------- */
2250 
2251 /*
2252  Create a new instance object, without calling __init__, and set the
2253  'this' attribute.
2254 */
2255 
2256 SWIGRUNTIME PyObject*
2258 {
2259  PyObject *inst = 0;
2260  PyObject *newraw = data->newraw;
2261  if (newraw) {
2262  inst = PyObject_Call(newraw, data->newargs, NULL);
2263  if (inst) {
2264 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2265  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2266  if (dictptr != NULL) {
2267  PyObject *dict = *dictptr;
2268  if (dict == NULL) {
2269  dict = PyDict_New();
2270  *dictptr = dict;
2271  PyDict_SetItem(dict, SWIG_This(), swig_this);
2272  }
2273  }
2274 #else
2275  if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2276  Py_DECREF(inst);
2277  inst = 0;
2278  }
2279 #endif
2280  }
2281  } else {
2282 #if PY_VERSION_HEX >= 0x03000000
2283  PyObject *empty_args = PyTuple_New(0);
2284  if (empty_args) {
2285  PyObject *empty_kwargs = PyDict_New();
2286  if (empty_kwargs) {
2287  inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2288  Py_DECREF(empty_kwargs);
2289  if (inst) {
2290  if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
2291  Py_DECREF(inst);
2292  inst = 0;
2293  } else {
2294  Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2295  }
2296  }
2297  }
2298  Py_DECREF(empty_args);
2299  }
2300 #else
2301  PyObject *dict = PyDict_New();
2302  if (dict) {
2303  PyDict_SetItem(dict, SWIG_This(), swig_this);
2304  inst = PyInstance_NewRaw(data->newargs, dict);
2305  Py_DECREF(dict);
2306  }
2307 #endif
2308  }
2309  return inst;
2310 }
2311 
2312 SWIGRUNTIME int
2313 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2314 {
2315 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2316  PyObject **dictptr = _PyObject_GetDictPtr(inst);
2317  if (dictptr != NULL) {
2318  PyObject *dict = *dictptr;
2319  if (dict == NULL) {
2320  dict = PyDict_New();
2321  *dictptr = dict;
2322  }
2323  return PyDict_SetItem(dict, SWIG_This(), swig_this);
2324  }
2325 #endif
2326  return PyObject_SetAttr(inst, SWIG_This(), swig_this);
2327 }
2328 
2329 
2330 SWIGINTERN PyObject *
2332  PyObject *obj[2];
2333  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2334  return NULL;
2335  } else {
2336  SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2337  if (sthis) {
2338  SwigPyObject_append((PyObject*) sthis, obj[1]);
2339  } else {
2340  if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
2341  return NULL;
2342  }
2343  return SWIG_Py_Void();
2344  }
2345 }
2346 
2347 /* Create a new pointer object */
2348 
2349 SWIGRUNTIME PyObject *
2350 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2351  SwigPyClientData *clientdata;
2352  PyObject * robj;
2353  int own;
2354 
2355  if (!ptr)
2356  return SWIG_Py_Void();
2357 
2358  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2359  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2360  if (clientdata && clientdata->pytype) {
2361  SwigPyObject *newobj;
2362  if (flags & SWIG_BUILTIN_TP_INIT) {
2363  newobj = (SwigPyObject*) self;
2364  if (newobj->ptr) {
2365  PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2366  while (newobj->next)
2367  newobj = (SwigPyObject *) newobj->next;
2368  newobj->next = next_self;
2369  newobj = (SwigPyObject *)next_self;
2370 #ifdef SWIGPYTHON_BUILTIN
2371  newobj->dict = 0;
2372 #endif
2373  }
2374  } else {
2375  newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2376 #ifdef SWIGPYTHON_BUILTIN
2377  newobj->dict = 0;
2378 #endif
2379  }
2380  if (newobj) {
2381  newobj->ptr = ptr;
2382  newobj->ty = type;
2383  newobj->own = own;
2384  newobj->next = 0;
2385  return (PyObject*) newobj;
2386  }
2387  return SWIG_Py_Void();
2388  }
2389 
2390  assert(!(flags & SWIG_BUILTIN_TP_INIT));
2391 
2392  robj = SwigPyObject_New(ptr, type, own);
2393  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2394  PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2395  Py_DECREF(robj);
2396  robj = inst;
2397  }
2398  return robj;
2399 }
2400 
2401 /* Create a new packed object */
2402 
2403 SWIGRUNTIMEINLINE PyObject *
2404 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2405  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2406 }
2407 
2408 /* -----------------------------------------------------------------------------*
2409  * Get type list
2410  * -----------------------------------------------------------------------------*/
2411 
2412 #ifdef SWIG_LINK_RUNTIME
2413 void *SWIG_ReturnGlobalTypeList(void *);
2414 #endif
2415 
2418  static void *type_pointer = (void *)0;
2419  /* first check if module already created */
2420  if (!type_pointer) {
2421 #ifdef SWIG_LINK_RUNTIME
2422  type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2423 #else
2424  type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2425  if (PyErr_Occurred()) {
2426  PyErr_Clear();
2427  type_pointer = (void *)0;
2428  }
2429 #endif
2430  }
2431  return (swig_module_info *) type_pointer;
2432 }
2433 
2434 SWIGRUNTIME void
2436 {
2437  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2438  swig_type_info **types = swig_module->types;
2439  size_t i;
2440  for (i =0; i < swig_module->size; ++i) {
2441  swig_type_info *ty = types[i];
2442  if (ty->owndata) {
2444  if (data) SwigPyClientData_Del(data);
2445  }
2446  }
2447  Py_DECREF(SWIG_This());
2448  Swig_This_global = NULL;
2449 }
2450 
2451 SWIGRUNTIME void
2453 #if PY_VERSION_HEX >= 0x03000000
2454  /* Add a dummy module object into sys.modules */
2455  PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2456 #else
2457  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2458  PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2459 #endif
2460  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2461  if (pointer && module) {
2462  PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2463  } else {
2464  Py_XDECREF(pointer);
2465  }
2466 }
2467 
2468 /* The python cached type query */
2469 SWIGRUNTIME PyObject *
2471  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2472  return cache;
2473 }
2474 
2476 SWIG_Python_TypeQuery(const char *type)
2477 {
2478  PyObject *cache = SWIG_Python_TypeCache();
2479  PyObject *key = SWIG_Python_str_FromChar(type);
2480  PyObject *obj = PyDict_GetItem(cache, key);
2481  swig_type_info *descriptor;
2482  if (obj) {
2483  descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2484  } else {
2486  descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2487  if (descriptor) {
2488  obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2489  PyDict_SetItem(cache, key, obj);
2490  Py_DECREF(obj);
2491  }
2492  }
2493  Py_DECREF(key);
2494  return descriptor;
2495 }
2496 
2497 /*
2498  For backward compatibility only
2499 */
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)
2503 
2504 SWIGRUNTIME int
2505 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2506 {
2507  if (PyErr_Occurred()) {
2508  PyObject *type = 0;
2509  PyObject *value = 0;
2510  PyObject *traceback = 0;
2511  PyErr_Fetch(&type, &value, &traceback);
2512  if (value) {
2513  PyObject *old_str = PyObject_Str(value);
2514  const char *tmp = SWIG_Python_str_AsChar(old_str);
2515  const char *errmesg = tmp ? tmp : "Invalid error message";
2516  Py_XINCREF(type);
2517  PyErr_Clear();
2518  if (infront) {
2519  PyErr_Format(type, "%s %s", mesg, errmesg);
2520  } else {
2521  PyErr_Format(type, "%s %s", errmesg, mesg);
2522  }
2524  Py_DECREF(old_str);
2525  }
2526  return 1;
2527  } else {
2528  return 0;
2529  }
2530 }
2531 
2532 SWIGRUNTIME int
2534 {
2535  if (PyErr_Occurred()) {
2536  /* add information about failing argument */
2537  char mesg[256];
2538  PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2539  return SWIG_Python_AddErrMesg(mesg, 1);
2540  } else {
2541  return 0;
2542  }
2543 }
2544 
2545 SWIGRUNTIMEINLINE const char *
2546 SwigPyObject_GetDesc(PyObject *self)
2547 {
2548  SwigPyObject *v = (SwigPyObject *)self;
2549  swig_type_info *ty = v ? v->ty : 0;
2550  return ty ? ty->str : "";
2551 }
2552 
2553 SWIGRUNTIME void
2554 SWIG_Python_TypeError(const char *type, PyObject *obj)
2555 {
2556  if (type) {
2557 #if defined(SWIG_COBJECT_TYPES)
2558  if (obj && SwigPyObject_Check(obj)) {
2559  const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2560  if (otype) {
2561  PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2562  type, otype);
2563  return;
2564  }
2565  } else
2566 #endif
2567  {
2568  const char *otype = (obj ? obj->ob_type->tp_name : 0);
2569  if (otype) {
2570  PyObject *str = PyObject_Str(obj);
2571  const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2572  if (cstr) {
2573  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2574  type, otype, cstr);
2576  } else {
2577  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2578  type, otype);
2579  }
2580  Py_XDECREF(str);
2581  return;
2582  }
2583  }
2584  PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2585  } else {
2586  PyErr_Format(PyExc_TypeError, "unexpected type is received");
2587  }
2588 }
2589 
2590 
2591 /* Convert a pointer value, signal an exception on a type mismatch */
2592 SWIGRUNTIME void *
2593 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2594  void *result;
2595  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2596  PyErr_Clear();
2597 #if SWIG_POINTER_EXCEPTION
2598  if (flags) {
2600  SWIG_Python_ArgFail(argnum);
2601  }
2602 #endif
2603  }
2604  return result;
2605 }
2606 
2607 #ifdef SWIGPYTHON_BUILTIN
2608 SWIGRUNTIME int
2609 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2610  PyTypeObject *tp = obj->ob_type;
2611  PyObject *descr;
2612  PyObject *encoded_name;
2613  descrsetfunc f;
2614  int res = -1;
2615 
2616 # ifdef Py_USING_UNICODE
2617  if (PyString_Check(name)) {
2618  name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2619  if (!name)
2620  return -1;
2621  } else if (!PyUnicode_Check(name))
2622 # else
2623  if (!PyString_Check(name))
2624 # endif
2625  {
2626  PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2627  return -1;
2628  } else {
2629  Py_INCREF(name);
2630  }
2631 
2632  if (!tp->tp_dict) {
2633  if (PyType_Ready(tp) < 0)
2634  goto done;
2635  }
2636 
2637  descr = _PyType_Lookup(tp, name);
2638  f = NULL;
2639  if (descr != NULL)
2640  f = descr->ob_type->tp_descr_set;
2641  if (!f) {
2642  if (PyString_Check(name)) {
2643  encoded_name = name;
2644  Py_INCREF(name);
2645  } else {
2646  encoded_name = PyUnicode_AsUTF8String(name);
2647  if (!encoded_name)
2648  return -1;
2649  }
2650  PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2651  Py_DECREF(encoded_name);
2652  } else {
2653  res = f(descr, obj, value);
2654  }
2655 
2656  done:
2657  Py_DECREF(name);
2658  return res;
2659 }
2660 #endif
2661 
2662 
2663 #ifdef __cplusplus
2664 }
2665 #endif
2666 
2667 
2668 
2669 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2670 
2671 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2672 
2673 
2674 
2675 #ifdef __cplusplus
2676 extern "C" {
2677 #endif
2678 
2679 /* Method creation and docstring support functions */
2680 
2681 SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
2682 SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2683 SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2684 
2685 #ifdef __cplusplus
2686 }
2687 #endif
2688 
2689 
2690  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2691 
2692 
2693 /* -------- TYPES TABLE (BEGIN) -------- */
2694 
2695 #define SWIGTYPE_p_ZVectorT_int_t swig_types[0]
2696 #define SWIGTYPE_p_ZVectorT_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 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 swig_types[17]
2713 #define SWIGTYPE_p_unsigned_short swig_types[18]
2715 static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
2716 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2717 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2718 
2719 /* -------- TYPES TABLE (END) -------- */
2720 
2721 #ifdef SWIG_TypeQuery
2722 # undef SWIG_TypeQuery
2723 #endif
2724 #define SWIG_TypeQuery SWIG_Python_TypeQuery
2725 
2726 /*-----------------------------------------------
2727  @(target):= _pywrapgraph.so
2728  ------------------------------------------------*/
2729 #if PY_VERSION_HEX >= 0x03000000
2730 # define SWIG_init PyInit__pywrapgraph
2731 
2732 #else
2733 # define SWIG_init init_pywrapgraph
2734 
2735 #endif
2736 #define SWIG_name "_pywrapgraph"
2737 
2738 #define SWIGVERSION 0x040002
2739 #define SWIG_VERSION SWIGVERSION
2740 
2741 
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))
2744 
2745 
2746 #include <stdexcept>
2747 
2748 
2749 namespace swig {
2750  class SwigPtr_PyObject {
2751  protected:
2752  PyObject *_obj;
2753 
2754  public:
2756  {
2757  }
2758 
2760  {
2762  Py_XINCREF(_obj);
2764  }
2765 
2766  SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2767  {
2768  if (initial_ref) {
2770  Py_XINCREF(_obj);
2772  }
2773  }
2774 
2776  {
2778  Py_XINCREF(item._obj);
2779  Py_XDECREF(_obj);
2780  _obj = item._obj;
2782  return *this;
2783  }
2784 
2786  {
2788  Py_XDECREF(_obj);
2790  }
2791 
2792  operator PyObject *() const
2793  {
2794  return _obj;
2795  }
2796 
2797  PyObject *operator->() const
2798  {
2799  return _obj;
2800  }
2801  };
2802 }
2803 
2804 
2805 namespace swig {
2806  struct SwigVar_PyObject : SwigPtr_PyObject {
2807  SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2808 
2810  {
2811  Py_XDECREF(_obj);
2812  _obj = obj;
2813  return *this;
2814  }
2815  };
2816 }
2817 
2818 
2819 #include <stdint.h> // Use the C99 official header
2820 
2821 
2822 #define SWIGWORDSIZE64
2823 #ifndef LONG_MAX
2824 #include <limits.h>
2825 #endif
2826 #if (__WORDSIZE == 32) || (LONG_MAX == INT_MAX)
2827 # error "SWIG wrapped code invalid in 32 bit architecture, regenerate code using -DSWIGWORDSIZE32"
2828 #endif
2829 
2830 
2831 #include <cstdint>
2832 #include <string>
2833 #include <vector>
2834 
2835 #include "ortools/base/basictypes.h"
2836 
2837 
2838 #include <string>
2839 
2840 
2841 #include "ortools/base/python-swig.h"
2842 
2843 
2844 #include <functional>
2845 
2846 // A copyable, ref-counted python pointer.
2847 // TODO(user): Make it movable-only when we support generalized lambda
2848 // capture.
2849 class SharedPyPtr {
2850  public:
2851  explicit SharedPyPtr(PyObject* obj) : obj_(obj) { Py_INCREF(obj_); }
2852  SharedPyPtr(const SharedPyPtr& other) : obj_(other.obj_) { Py_INCREF(obj_); }
2853 
2854  ~SharedPyPtr() { Py_DECREF(obj_); }
2855 
2856  PyObject* get() const { return obj_; }
2857 
2858  private:
2859  // We do not follow the rule of three as we only want to copy construct.
2860  SharedPyPtr& operator=(const SharedPyPtr&);
2861 
2862  PyObject* const obj_;
2863 };
2864 
2865 template <typename ReturnT>
2866 static ReturnT HandleResult(PyObject* pyresult) {
2867  // This zero-initializes builtin types.
2868  ReturnT result = ReturnT();
2869  if (!pyresult) {
2870  if (!PyErr_Occurred()) {
2871  PyErr_SetString(PyExc_RuntimeError,
2872  "SWIG std::function invocation failed.");
2873  }
2874  return result;
2875  } else {
2876  if (!PyObjAs<ReturnT>(pyresult, &result)) {
2877  if (!PyErr_Occurred()) {
2878  PyErr_SetString(PyExc_RuntimeError,
2879  "SWIG std::function invocation failed.");
2880  }
2881  }
2882  Py_DECREF(pyresult);
2883  }
2884  return result;
2885 }
2886 
2887 template <>
2888 void HandleResult<void>(PyObject * pyresult) {
2889  if (!pyresult) {
2890  if (!PyErr_Occurred()) {
2891  PyErr_SetString(PyExc_RuntimeError,
2892  "SWIG std::function invocation failed.");
2893  }
2894  } else {
2895  Py_DECREF(pyresult);
2896  }
2897 }
2898 
2899 template <typename ReturnT, typename... Args>
2900 static ReturnT InvokePythonCallableReturning(PyObject* pyfunc,
2901  const char* format, Args... args) {
2902  // The const_cast is safe (it's here only because the python API is not
2903  // const-correct).
2904  return HandleResult<ReturnT>(
2905  PyObject_CallFunction(pyfunc, const_cast<char*>(format), args...));
2906 }
2907 
2908 template <typename ReturnT>
2909 static ReturnT InvokePythonCallableReturning(PyObject* pyfunc) {
2910  return HandleResult<ReturnT>(PyObject_CallFunctionObjArgs(pyfunc, nullptr));
2911 }
2912 
2913 
2914 
2915 #include "ortools/graph/assignment.h"
2916 #include "ortools/graph/max_flow.h"
2919 
2920 
2921 #include <limits.h>
2922 #if !defined(SWIG_NO_LLONG_MAX)
2923 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
2924 # define LLONG_MAX __LONG_LONG_MAX__
2925 # define LLONG_MIN (-LLONG_MAX - 1LL)
2926 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
2927 # endif
2928 #endif
2929 
2930 
2931 SWIGINTERN int
2932 SWIG_AsVal_double (PyObject *obj, double *val)
2933 {
2934  int res = SWIG_TypeError;
2935  if (PyFloat_Check(obj)) {
2936  if (val) *val = PyFloat_AsDouble(obj);
2937  return SWIG_OK;
2938 #if PY_VERSION_HEX < 0x03000000
2939  } else if (PyInt_Check(obj)) {
2940  if (val) *val = (double) PyInt_AsLong(obj);
2941  return SWIG_OK;
2942 #endif
2943  } else if (PyLong_Check(obj)) {
2944  double v = PyLong_AsDouble(obj);
2945  if (!PyErr_Occurred()) {
2946  if (val) *val = v;
2947  return SWIG_OK;
2948  } else {
2949  PyErr_Clear();
2950  }
2951  }
2952 #ifdef SWIG_PYTHON_CAST_MODE
2953  {
2954  int dispatch = 0;
2955  double d = PyFloat_AsDouble(obj);
2956  if (!PyErr_Occurred()) {
2957  if (val) *val = d;
2958  return SWIG_AddCast(SWIG_OK);
2959  } else {
2960  PyErr_Clear();
2961  }
2962  if (!dispatch) {
2963  long v = PyLong_AsLong(obj);
2964  if (!PyErr_Occurred()) {
2965  if (val) *val = v;
2967  } else {
2968  PyErr_Clear();
2969  }
2970  }
2971  }
2972 #endif
2973  return res;
2974 }
2975 
2976 
2977 #include <float.h>
2978 
2979 
2980 #include <math.h>
2981 
2982 
2983 SWIGINTERNINLINE int
2984 SWIG_CanCastAsInteger(double *d, double min, double max) {
2985  double x = *d;
2986  if ((min <= x && x <= max)) {
2987  double fx = floor(x);
2988  double cx = ceil(x);
2989  double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
2990  if ((errno == EDOM) || (errno == ERANGE)) {
2991  errno = 0;
2992  } else {
2993  double summ, reps, diff;
2994  if (rd < x) {
2995  diff = x - rd;
2996  } else if (rd > x) {
2997  diff = rd - x;
2998  } else {
2999  return 1;
3000  }
3001  summ = rd + x;
3002  reps = diff/summ;
3003  if (reps < 8*DBL_EPSILON) {
3004  *d = rd;
3005  return 1;
3006  }
3007  }
3008  }
3009  return 0;
3010 }
3011 
3012 
3013 SWIGINTERN int
3014 SWIG_AsVal_long (PyObject *obj, long* val)
3015 {
3016 #if PY_VERSION_HEX < 0x03000000
3017  if (PyInt_Check(obj)) {
3018  if (val) *val = PyInt_AsLong(obj);
3019  return SWIG_OK;
3020  } else
3021 #endif
3022  if (PyLong_Check(obj)) {
3023  long v = PyLong_AsLong(obj);
3024  if (!PyErr_Occurred()) {
3025  if (val) *val = v;
3026  return SWIG_OK;
3027  } else {
3028  PyErr_Clear();
3029  return SWIG_OverflowError;
3030  }
3031  }
3032 #ifdef SWIG_PYTHON_CAST_MODE
3033  {
3034  int dispatch = 0;
3035  long v = PyInt_AsLong(obj);
3036  if (!PyErr_Occurred()) {
3037  if (val) *val = v;
3038  return SWIG_AddCast(SWIG_OK);
3039  } else {
3040  PyErr_Clear();
3041  }
3042  if (!dispatch) {
3043  double d;
3044  int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3045  if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3046  if (val) *val = (long)(d);
3047  return res;
3048  }
3049  }
3050  }
3051 #endif
3052  return SWIG_TypeError;
3053 }
3054 
3055 
3056 SWIGINTERN int
3057 SWIG_AsVal_int (PyObject * obj, int *val)
3058 {
3059  long v;
3060  int res = SWIG_AsVal_long (obj, &v);
3061  if (SWIG_IsOK(res)) {
3062  if ((v < INT_MIN || v > INT_MAX)) {
3063  return SWIG_OverflowError;
3064  } else {
3065  if (val) *val = static_cast< int >(v);
3066  }
3067  }
3068  return res;
3069 }
3070 
3071 
3072 SWIGINTERNINLINE PyObject*
3074 {
3075  return PyInt_FromLong((long) value);
3076 }
3077 
3078 
3079  #define SWIG_From_long PyInt_FromLong
3080 
3081 
3082 SWIGINTERNINLINE PyObject*
3084 {
3085  return PyBool_FromLong(value ? 1 : 0);
3086 }
3087 
3088 #ifdef __cplusplus
3089 extern "C" {
3090 #endif
3091 SWIGINTERN PyObject *_wrap_new_SimpleMaxFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3092  PyObject *resultobj = 0;
3094 
3095  if (!SWIG_Python_UnpackTuple(args, "new_SimpleMaxFlow", 0, 0, 0)) SWIG_fail;
3098  return resultobj;
3099 fail:
3100  return NULL;
3101 }
3102 
3103 
3104 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_AddArcWithCapacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3105  PyObject *resultobj = 0;
3110  void *argp1 = 0 ;
3111  int res1 = 0 ;
3112  int val2 ;
3113  int ecode2 = 0 ;
3114  int val3 ;
3115  int ecode3 = 0 ;
3116  long val4 ;
3117  int ecode4 = 0 ;
3118  PyObject *swig_obj[4] ;
3120 
3121  if (!SWIG_Python_UnpackTuple(args, "SimpleMaxFlow_AddArcWithCapacity", 4, 4, swig_obj)) SWIG_fail;
3122  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3123  if (!SWIG_IsOK(res1)) {
3124  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3125  }
3126  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3127  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3128  if (!SWIG_IsOK(ecode2)) {
3129  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3130  }
3131  arg2 = static_cast< operations_research::NodeIndex >(val2);
3132  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
3133  if (!SWIG_IsOK(ecode3)) {
3134  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
3135  }
3136  arg3 = static_cast< operations_research::NodeIndex >(val3);
3137  ecode4 = SWIG_AsVal_long(swig_obj[3], &val4);
3138  if (!SWIG_IsOK(ecode4)) {
3139  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SimpleMaxFlow_AddArcWithCapacity" "', argument " "4"" of type '" "operations_research::FlowQuantity""'");
3140  }
3141  arg4 = static_cast< operations_research::FlowQuantity >(val4);
3142  result = (operations_research::ArcIndex)(arg1)->AddArcWithCapacity(arg2,arg3,arg4);
3143  resultobj = SWIG_From_int(static_cast< int >(result));
3144  return resultobj;
3145 fail:
3146  return NULL;
3147 }
3148 
3149 
3150 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3151  PyObject *resultobj = 0;
3153  void *argp1 = 0 ;
3154  int res1 = 0 ;
3155  PyObject *swig_obj[1] ;
3157 
3158  if (!args) SWIG_fail;
3159  swig_obj[0] = args;
3160  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3161  if (!SWIG_IsOK(res1)) {
3162  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_NumNodes" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3163  }
3164  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3165  result = (operations_research::NodeIndex)((operations_research::SimpleMaxFlow const *)arg1)->NumNodes();
3166  resultobj = SWIG_From_int(static_cast< int >(result));
3167  return resultobj;
3168 fail:
3169  return NULL;
3170 }
3171 
3172 
3173 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3174  PyObject *resultobj = 0;
3176  void *argp1 = 0 ;
3177  int res1 = 0 ;
3178  PyObject *swig_obj[1] ;
3180 
3181  if (!args) SWIG_fail;
3182  swig_obj[0] = args;
3183  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3184  if (!SWIG_IsOK(res1)) {
3185  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_NumArcs" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3186  }
3187  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3188  result = (operations_research::ArcIndex)((operations_research::SimpleMaxFlow const *)arg1)->NumArcs();
3189  resultobj = SWIG_From_int(static_cast< int >(result));
3190  return resultobj;
3191 fail:
3192  return NULL;
3193 }
3194 
3195 
3196 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_Tail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3197  PyObject *resultobj = 0;
3200  void *argp1 = 0 ;
3201  int res1 = 0 ;
3202  int val2 ;
3203  int ecode2 = 0 ;
3204  PyObject *swig_obj[2] ;
3206 
3207  if (!SWIG_Python_UnpackTuple(args, "SimpleMaxFlow_Tail", 2, 2, swig_obj)) SWIG_fail;
3208  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3209  if (!SWIG_IsOK(res1)) {
3210  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_Tail" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3211  }
3212  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3213  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3214  if (!SWIG_IsOK(ecode2)) {
3215  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMaxFlow_Tail" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3216  }
3217  arg2 = static_cast< operations_research::ArcIndex >(val2);
3218  result = (operations_research::NodeIndex)((operations_research::SimpleMaxFlow const *)arg1)->Tail(arg2);
3219  resultobj = SWIG_From_int(static_cast< int >(result));
3220  return resultobj;
3221 fail:
3222  return NULL;
3223 }
3224 
3225 
3226 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_Head(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3227  PyObject *resultobj = 0;
3230  void *argp1 = 0 ;
3231  int res1 = 0 ;
3232  int val2 ;
3233  int ecode2 = 0 ;
3234  PyObject *swig_obj[2] ;
3236 
3237  if (!SWIG_Python_UnpackTuple(args, "SimpleMaxFlow_Head", 2, 2, swig_obj)) SWIG_fail;
3238  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3239  if (!SWIG_IsOK(res1)) {
3240  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_Head" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3241  }
3242  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3243  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3244  if (!SWIG_IsOK(ecode2)) {
3245  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMaxFlow_Head" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3246  }
3247  arg2 = static_cast< operations_research::ArcIndex >(val2);
3248  result = (operations_research::NodeIndex)((operations_research::SimpleMaxFlow const *)arg1)->Head(arg2);
3249  resultobj = SWIG_From_int(static_cast< int >(result));
3250  return resultobj;
3251 fail:
3252  return NULL;
3253 }
3254 
3255 
3256 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_Capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3257  PyObject *resultobj = 0;
3260  void *argp1 = 0 ;
3261  int res1 = 0 ;
3262  int val2 ;
3263  int ecode2 = 0 ;
3264  PyObject *swig_obj[2] ;
3266 
3267  if (!SWIG_Python_UnpackTuple(args, "SimpleMaxFlow_Capacity", 2, 2, swig_obj)) SWIG_fail;
3268  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3269  if (!SWIG_IsOK(res1)) {
3270  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_Capacity" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3271  }
3272  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3273  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3274  if (!SWIG_IsOK(ecode2)) {
3275  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMaxFlow_Capacity" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3276  }
3277  arg2 = static_cast< operations_research::ArcIndex >(val2);
3278  result = (operations_research::FlowQuantity)((operations_research::SimpleMaxFlow const *)arg1)->Capacity(arg2);
3279  resultobj = SWIG_From_long(static_cast< long >(result));
3280  return resultobj;
3281 fail:
3282  return NULL;
3283 }
3284 
3285 
3286 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3287  PyObject *resultobj = 0;
3291  void *argp1 = 0 ;
3292  int res1 = 0 ;
3293  int val2 ;
3294  int ecode2 = 0 ;
3295  int val3 ;
3296  int ecode3 = 0 ;
3297  PyObject *swig_obj[3] ;
3299 
3300  if (!SWIG_Python_UnpackTuple(args, "SimpleMaxFlow_Solve", 3, 3, swig_obj)) SWIG_fail;
3301  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3302  if (!SWIG_IsOK(res1)) {
3303  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_Solve" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3304  }
3305  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3306  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3307  if (!SWIG_IsOK(ecode2)) {
3308  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMaxFlow_Solve" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3309  }
3310  arg2 = static_cast< operations_research::NodeIndex >(val2);
3311  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
3312  if (!SWIG_IsOK(ecode3)) {
3313  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimpleMaxFlow_Solve" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
3314  }
3315  arg3 = static_cast< operations_research::NodeIndex >(val3);
3316  result = (operations_research::SimpleMaxFlow::Status)(arg1)->Solve(arg2,arg3);
3317  resultobj = SWIG_From_int(static_cast< int >(result));
3318  return resultobj;
3319 fail:
3320  return NULL;
3321 }
3322 
3323 
3324 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_OptimalFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3325  PyObject *resultobj = 0;
3327  void *argp1 = 0 ;
3328  int res1 = 0 ;
3329  PyObject *swig_obj[1] ;
3331 
3332  if (!args) SWIG_fail;
3333  swig_obj[0] = args;
3334  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3335  if (!SWIG_IsOK(res1)) {
3336  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_OptimalFlow" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3337  }
3338  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3339  result = (operations_research::FlowQuantity)((operations_research::SimpleMaxFlow const *)arg1)->OptimalFlow();
3340  resultobj = SWIG_From_long(static_cast< long >(result));
3341  return resultobj;
3342 fail:
3343  return NULL;
3344 }
3345 
3346 
3347 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_Flow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3348  PyObject *resultobj = 0;
3351  void *argp1 = 0 ;
3352  int res1 = 0 ;
3353  int val2 ;
3354  int ecode2 = 0 ;
3355  PyObject *swig_obj[2] ;
3357 
3358  if (!SWIG_Python_UnpackTuple(args, "SimpleMaxFlow_Flow", 2, 2, swig_obj)) SWIG_fail;
3359  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3360  if (!SWIG_IsOK(res1)) {
3361  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_Flow" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow const *""'");
3362  }
3363  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3364  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3365  if (!SWIG_IsOK(ecode2)) {
3366  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMaxFlow_Flow" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3367  }
3368  arg2 = static_cast< operations_research::ArcIndex >(val2);
3369  result = (operations_research::FlowQuantity)((operations_research::SimpleMaxFlow const *)arg1)->Flow(arg2);
3370  resultobj = SWIG_From_long(static_cast< long >(result));
3371  return resultobj;
3372 fail:
3373  return NULL;
3374 }
3375 
3376 
3377 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_GetSourceSideMinCut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3378  PyObject *resultobj = 0;
3380  std::vector< operations_research::NodeIndex > *arg2 = (std::vector< operations_research::NodeIndex > *) 0 ;
3381  void *argp1 = 0 ;
3382  int res1 = 0 ;
3383  std::vector< int > temp2 ;
3384  PyObject *swig_obj[1] ;
3385 
3386  {
3387  arg2 = &temp2;
3388  }
3389  if (!args) SWIG_fail;
3390  swig_obj[0] = args;
3391  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3392  if (!SWIG_IsOK(res1)) {
3393  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_GetSourceSideMinCut" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3394  }
3395  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3396  (arg1)->GetSourceSideMinCut(arg2);
3397  resultobj = SWIG_Py_Void();
3398  {
3399  resultobj = SWIG_Python_AppendOutput(resultobj, list_output_helper(arg2, &PyInt_FromLong));
3400  }
3401  return resultobj;
3402 fail:
3403  return NULL;
3404 }
3405 
3406 
3407 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_GetSinkSideMinCut(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3408  PyObject *resultobj = 0;
3410  std::vector< operations_research::NodeIndex > *arg2 = (std::vector< operations_research::NodeIndex > *) 0 ;
3411  void *argp1 = 0 ;
3412  int res1 = 0 ;
3413  std::vector< int > temp2 ;
3414  PyObject *swig_obj[1] ;
3415 
3416  {
3417  arg2 = &temp2;
3418  }
3419  if (!args) SWIG_fail;
3420  swig_obj[0] = args;
3421  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3422  if (!SWIG_IsOK(res1)) {
3423  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_GetSinkSideMinCut" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3424  }
3425  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3426  (arg1)->GetSinkSideMinCut(arg2);
3427  resultobj = SWIG_Py_Void();
3428  {
3429  resultobj = SWIG_Python_AppendOutput(resultobj, list_output_helper(arg2, &PyInt_FromLong));
3430  }
3431  return resultobj;
3432 fail:
3433  return NULL;
3434 }
3435 
3436 
3437 SWIGINTERN PyObject *_wrap_SimpleMaxFlow_SetArcCapacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3438  PyObject *resultobj = 0;
3442  void *argp1 = 0 ;
3443  int res1 = 0 ;
3444  int val2 ;
3445  int ecode2 = 0 ;
3446  long val3 ;
3447  int ecode3 = 0 ;
3448  PyObject *swig_obj[3] ;
3449 
3450  if (!SWIG_Python_UnpackTuple(args, "SimpleMaxFlow_SetArcCapacity", 3, 3, swig_obj)) SWIG_fail;
3451  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMaxFlow, 0 | 0 );
3452  if (!SWIG_IsOK(res1)) {
3453  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMaxFlow_SetArcCapacity" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3454  }
3455  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3456  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3457  if (!SWIG_IsOK(ecode2)) {
3458  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMaxFlow_SetArcCapacity" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3459  }
3460  arg2 = static_cast< operations_research::ArcIndex >(val2);
3461  ecode3 = SWIG_AsVal_long(swig_obj[2], &val3);
3462  if (!SWIG_IsOK(ecode3)) {
3463  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimpleMaxFlow_SetArcCapacity" "', argument " "3"" of type '" "operations_research::FlowQuantity""'");
3464  }
3465  arg3 = static_cast< operations_research::FlowQuantity >(val3);
3466  (arg1)->SetArcCapacity(arg2,arg3);
3467  resultobj = SWIG_Py_Void();
3468  return resultobj;
3469 fail:
3470  return NULL;
3471 }
3472 
3473 
3474 SWIGINTERN PyObject *_wrap_delete_SimpleMaxFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3475  PyObject *resultobj = 0;
3477  void *argp1 = 0 ;
3478  int res1 = 0 ;
3479  PyObject *swig_obj[1] ;
3480 
3481  if (!args) SWIG_fail;
3482  swig_obj[0] = args;
3484  if (!SWIG_IsOK(res1)) {
3485  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleMaxFlow" "', argument " "1"" of type '" "operations_research::SimpleMaxFlow *""'");
3486  }
3487  arg1 = reinterpret_cast< operations_research::SimpleMaxFlow * >(argp1);
3488  delete arg1;
3489  resultobj = SWIG_Py_Void();
3490  return resultobj;
3491 fail:
3492  return NULL;
3493 }
3494 
3495 
3496 SWIGINTERN PyObject *SimpleMaxFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3497  PyObject *obj;
3498  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
3500  return SWIG_Py_Void();
3501 }
3502 
3503 SWIGINTERN PyObject *SimpleMaxFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3504  return SWIG_Python_InitShadowInstance(args);
3505 }
3506 
3507 SWIGINTERN PyObject *_wrap_new_MinCostFlowBase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3508  PyObject *resultobj = 0;
3510 
3511  if (!SWIG_Python_UnpackTuple(args, "new_MinCostFlowBase", 0, 0, 0)) SWIG_fail;
3514  return resultobj;
3515 fail:
3516  return NULL;
3517 }
3518 
3519 
3520 SWIGINTERN PyObject *_wrap_delete_MinCostFlowBase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3521  PyObject *resultobj = 0;
3523  void *argp1 = 0 ;
3524  int res1 = 0 ;
3525  PyObject *swig_obj[1] ;
3526 
3527  if (!args) SWIG_fail;
3528  swig_obj[0] = args;
3530  if (!SWIG_IsOK(res1)) {
3531  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MinCostFlowBase" "', argument " "1"" of type '" "operations_research::MinCostFlowBase *""'");
3532  }
3533  arg1 = reinterpret_cast< operations_research::MinCostFlowBase * >(argp1);
3534  delete arg1;
3535  resultobj = SWIG_Py_Void();
3536  return resultobj;
3537 fail:
3538  return NULL;
3539 }
3540 
3541 
3542 SWIGINTERN PyObject *MinCostFlowBase_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3543  PyObject *obj;
3544  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
3546  return SWIG_Py_Void();
3547 }
3548 
3549 SWIGINTERN PyObject *MinCostFlowBase_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3550  return SWIG_Python_InitShadowInstance(args);
3551 }
3552 
3553 SWIGINTERN PyObject *_wrap_new_SimpleMinCostFlow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3554  PyObject *resultobj = 0;
3557  int val1 ;
3558  int ecode1 = 0 ;
3559  int val2 ;
3560  int ecode2 = 0 ;
3562 
3563  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
3564  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
3565  if (!SWIG_IsOK(ecode1)) {
3566  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SimpleMinCostFlow" "', argument " "1"" of type '" "operations_research::NodeIndex""'");
3567  }
3568  arg1 = static_cast< operations_research::NodeIndex >(val1);
3569  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3570  if (!SWIG_IsOK(ecode2)) {
3571  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SimpleMinCostFlow" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3572  }
3573  arg2 = static_cast< operations_research::ArcIndex >(val2);
3576  return resultobj;
3577 fail:
3578  return NULL;
3579 }
3580 
3581 
3582 SWIGINTERN PyObject *_wrap_new_SimpleMinCostFlow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
3583  PyObject *resultobj = 0;
3585  int val1 ;
3586  int ecode1 = 0 ;
3588 
3589  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
3590  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
3591  if (!SWIG_IsOK(ecode1)) {
3592  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_SimpleMinCostFlow" "', argument " "1"" of type '" "operations_research::NodeIndex""'");
3593  }
3594  arg1 = static_cast< operations_research::NodeIndex >(val1);
3597  return resultobj;
3598 fail:
3599  return NULL;
3600 }
3601 
3602 
3603 SWIGINTERN PyObject *_wrap_new_SimpleMinCostFlow__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
3604  PyObject *resultobj = 0;
3606 
3607  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
3610  return resultobj;
3611 fail:
3612  return NULL;
3613 }
3614 
3615 
3616 SWIGINTERN PyObject *_wrap_new_SimpleMinCostFlow(PyObject *self, PyObject *args) {
3617  Py_ssize_t argc;
3618  PyObject *argv[3] = {
3619  0
3620  };
3621 
3622  if (!(argc = SWIG_Python_UnpackTuple(args, "new_SimpleMinCostFlow", 0, 2, argv))) SWIG_fail;
3623  --argc;
3624  if (argc == 0) {
3625  return _wrap_new_SimpleMinCostFlow__SWIG_2(self, argc, argv);
3626  }
3627  if (argc == 1) {
3628  int _v;
3629  {
3630  int res = SWIG_AsVal_int(argv[0], NULL);
3631  _v = SWIG_CheckState(res);
3632  }
3633  if (_v) {
3634  return _wrap_new_SimpleMinCostFlow__SWIG_1(self, argc, argv);
3635  }
3636  }
3637  if (argc == 2) {
3638  int _v;
3639  {
3640  int res = SWIG_AsVal_int(argv[0], NULL);
3641  _v = SWIG_CheckState(res);
3642  }
3643  if (_v) {
3644  {
3645  int res = SWIG_AsVal_int(argv[1], NULL);
3646  _v = SWIG_CheckState(res);
3647  }
3648  if (_v) {
3649  return _wrap_new_SimpleMinCostFlow__SWIG_0(self, argc, argv);
3650  }
3651  }
3652  }
3653 
3654 fail:
3655  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_SimpleMinCostFlow'.\n"
3656  " Possible C/C++ prototypes are:\n"
3657  " operations_research::SimpleMinCostFlow::SimpleMinCostFlow(operations_research::NodeIndex,operations_research::ArcIndex)\n"
3658  " operations_research::SimpleMinCostFlow::SimpleMinCostFlow(operations_research::NodeIndex)\n"
3659  " operations_research::SimpleMinCostFlow::SimpleMinCostFlow()\n");
3660  return 0;
3661 }
3662 
3663 
3665  PyObject *resultobj = 0;
3671  void *argp1 = 0 ;
3672  int res1 = 0 ;
3673  int val2 ;
3674  int ecode2 = 0 ;
3675  int val3 ;
3676  int ecode3 = 0 ;
3677  long val4 ;
3678  int ecode4 = 0 ;
3679  long val5 ;
3680  int ecode5 = 0 ;
3681  PyObject *swig_obj[5] ;
3683 
3684  if (!SWIG_Python_UnpackTuple(args, "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost", 5, 5, swig_obj)) SWIG_fail;
3685  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3686  if (!SWIG_IsOK(res1)) {
3687  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3688  }
3689  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3690  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3691  if (!SWIG_IsOK(ecode2)) {
3692  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3693  }
3694  arg2 = static_cast< operations_research::NodeIndex >(val2);
3695  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
3696  if (!SWIG_IsOK(ecode3)) {
3697  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
3698  }
3699  arg3 = static_cast< operations_research::NodeIndex >(val3);
3700  ecode4 = SWIG_AsVal_long(swig_obj[3], &val4);
3701  if (!SWIG_IsOK(ecode4)) {
3702  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "4"" of type '" "operations_research::FlowQuantity""'");
3703  }
3704  arg4 = static_cast< operations_research::FlowQuantity >(val4);
3705  ecode5 = SWIG_AsVal_long(swig_obj[4], &val5);
3706  if (!SWIG_IsOK(ecode5)) {
3707  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost" "', argument " "5"" of type '" "operations_research::CostValue""'");
3708  }
3709  arg5 = static_cast< operations_research::CostValue >(val5);
3710  result = (operations_research::ArcIndex)(arg1)->AddArcWithCapacityAndUnitCost(arg2,arg3,arg4,arg5);
3711  resultobj = SWIG_From_int(static_cast< int >(result));
3712  return resultobj;
3713 fail:
3714  return NULL;
3715 }
3716 
3717 
3718 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_SetNodeSupply(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3719  PyObject *resultobj = 0;
3723  void *argp1 = 0 ;
3724  int res1 = 0 ;
3725  int val2 ;
3726  int ecode2 = 0 ;
3727  long val3 ;
3728  int ecode3 = 0 ;
3729  PyObject *swig_obj[3] ;
3730 
3731  if (!SWIG_Python_UnpackTuple(args, "SimpleMinCostFlow_SetNodeSupply", 3, 3, swig_obj)) SWIG_fail;
3732  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3733  if (!SWIG_IsOK(res1)) {
3734  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_SetNodeSupply" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3735  }
3736  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3737  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3738  if (!SWIG_IsOK(ecode2)) {
3739  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMinCostFlow_SetNodeSupply" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
3740  }
3741  arg2 = static_cast< operations_research::NodeIndex >(val2);
3742  ecode3 = SWIG_AsVal_long(swig_obj[2], &val3);
3743  if (!SWIG_IsOK(ecode3)) {
3744  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SimpleMinCostFlow_SetNodeSupply" "', argument " "3"" of type '" "operations_research::FlowQuantity""'");
3745  }
3746  arg3 = static_cast< operations_research::FlowQuantity >(val3);
3747  (arg1)->SetNodeSupply(arg2,arg3);
3748  resultobj = SWIG_Py_Void();
3749  return resultobj;
3750 fail:
3751  return NULL;
3752 }
3753 
3754 
3755 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3756  PyObject *resultobj = 0;
3758  void *argp1 = 0 ;
3759  int res1 = 0 ;
3760  PyObject *swig_obj[1] ;
3762 
3763  if (!args) SWIG_fail;
3764  swig_obj[0] = args;
3765  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3766  if (!SWIG_IsOK(res1)) {
3767  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_Solve" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3768  }
3769  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3771  resultobj = SWIG_From_int(static_cast< int >(result));
3772  return resultobj;
3773 fail:
3774  return NULL;
3775 }
3776 
3777 
3779  PyObject *resultobj = 0;
3781  void *argp1 = 0 ;
3782  int res1 = 0 ;
3783  PyObject *swig_obj[1] ;
3785 
3786  if (!args) SWIG_fail;
3787  swig_obj[0] = args;
3788  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3789  if (!SWIG_IsOK(res1)) {
3790  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_SolveMaxFlowWithMinCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
3791  }
3792  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3794  resultobj = SWIG_From_int(static_cast< int >(result));
3795  return resultobj;
3796 fail:
3797  return NULL;
3798 }
3799 
3800 
3801 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_OptimalCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3802  PyObject *resultobj = 0;
3804  void *argp1 = 0 ;
3805  int res1 = 0 ;
3806  PyObject *swig_obj[1] ;
3808 
3809  if (!args) SWIG_fail;
3810  swig_obj[0] = args;
3811  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3812  if (!SWIG_IsOK(res1)) {
3813  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_OptimalCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3814  }
3815  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3816  result = (operations_research::CostValue)((operations_research::SimpleMinCostFlow const *)arg1)->OptimalCost();
3817  resultobj = SWIG_From_long(static_cast< long >(result));
3818  return resultobj;
3819 fail:
3820  return NULL;
3821 }
3822 
3823 
3824 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_MaximumFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3825  PyObject *resultobj = 0;
3827  void *argp1 = 0 ;
3828  int res1 = 0 ;
3829  PyObject *swig_obj[1] ;
3831 
3832  if (!args) SWIG_fail;
3833  swig_obj[0] = args;
3834  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3835  if (!SWIG_IsOK(res1)) {
3836  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_MaximumFlow" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3837  }
3838  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3839  result = (operations_research::FlowQuantity)((operations_research::SimpleMinCostFlow const *)arg1)->MaximumFlow();
3840  resultobj = SWIG_From_long(static_cast< long >(result));
3841  return resultobj;
3842 fail:
3843  return NULL;
3844 }
3845 
3846 
3847 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_Flow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3848  PyObject *resultobj = 0;
3851  void *argp1 = 0 ;
3852  int res1 = 0 ;
3853  int val2 ;
3854  int ecode2 = 0 ;
3855  PyObject *swig_obj[2] ;
3857 
3858  if (!SWIG_Python_UnpackTuple(args, "SimpleMinCostFlow_Flow", 2, 2, swig_obj)) SWIG_fail;
3859  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3860  if (!SWIG_IsOK(res1)) {
3861  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_Flow" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3862  }
3863  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3864  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3865  if (!SWIG_IsOK(ecode2)) {
3866  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMinCostFlow_Flow" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3867  }
3868  arg2 = static_cast< operations_research::ArcIndex >(val2);
3869  result = (operations_research::FlowQuantity)((operations_research::SimpleMinCostFlow const *)arg1)->Flow(arg2);
3870  resultobj = SWIG_From_long(static_cast< long >(result));
3871  return resultobj;
3872 fail:
3873  return NULL;
3874 }
3875 
3876 
3877 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3878  PyObject *resultobj = 0;
3880  void *argp1 = 0 ;
3881  int res1 = 0 ;
3882  PyObject *swig_obj[1] ;
3884 
3885  if (!args) SWIG_fail;
3886  swig_obj[0] = args;
3887  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3888  if (!SWIG_IsOK(res1)) {
3889  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_NumNodes" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3890  }
3891  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3892  result = (operations_research::NodeIndex)((operations_research::SimpleMinCostFlow const *)arg1)->NumNodes();
3893  resultobj = SWIG_From_int(static_cast< int >(result));
3894  return resultobj;
3895 fail:
3896  return NULL;
3897 }
3898 
3899 
3900 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3901  PyObject *resultobj = 0;
3903  void *argp1 = 0 ;
3904  int res1 = 0 ;
3905  PyObject *swig_obj[1] ;
3907 
3908  if (!args) SWIG_fail;
3909  swig_obj[0] = args;
3910  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3911  if (!SWIG_IsOK(res1)) {
3912  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_NumArcs" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3913  }
3914  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3915  result = (operations_research::ArcIndex)((operations_research::SimpleMinCostFlow const *)arg1)->NumArcs();
3916  resultobj = SWIG_From_int(static_cast< int >(result));
3917  return resultobj;
3918 fail:
3919  return NULL;
3920 }
3921 
3922 
3923 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_Tail(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3924  PyObject *resultobj = 0;
3927  void *argp1 = 0 ;
3928  int res1 = 0 ;
3929  int val2 ;
3930  int ecode2 = 0 ;
3931  PyObject *swig_obj[2] ;
3933 
3934  if (!SWIG_Python_UnpackTuple(args, "SimpleMinCostFlow_Tail", 2, 2, swig_obj)) SWIG_fail;
3935  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3936  if (!SWIG_IsOK(res1)) {
3937  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_Tail" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3938  }
3939  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3940  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3941  if (!SWIG_IsOK(ecode2)) {
3942  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMinCostFlow_Tail" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3943  }
3944  arg2 = static_cast< operations_research::ArcIndex >(val2);
3945  result = (operations_research::NodeIndex)((operations_research::SimpleMinCostFlow const *)arg1)->Tail(arg2);
3946  resultobj = SWIG_From_int(static_cast< int >(result));
3947  return resultobj;
3948 fail:
3949  return NULL;
3950 }
3951 
3952 
3953 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_Head(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3954  PyObject *resultobj = 0;
3957  void *argp1 = 0 ;
3958  int res1 = 0 ;
3959  int val2 ;
3960  int ecode2 = 0 ;
3961  PyObject *swig_obj[2] ;
3963 
3964  if (!SWIG_Python_UnpackTuple(args, "SimpleMinCostFlow_Head", 2, 2, swig_obj)) SWIG_fail;
3965  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3966  if (!SWIG_IsOK(res1)) {
3967  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_Head" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3968  }
3969  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
3970  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
3971  if (!SWIG_IsOK(ecode2)) {
3972  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMinCostFlow_Head" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
3973  }
3974  arg2 = static_cast< operations_research::ArcIndex >(val2);
3975  result = (operations_research::NodeIndex)((operations_research::SimpleMinCostFlow const *)arg1)->Head(arg2);
3976  resultobj = SWIG_From_int(static_cast< int >(result));
3977  return resultobj;
3978 fail:
3979  return NULL;
3980 }
3981 
3982 
3983 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_Capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3984  PyObject *resultobj = 0;
3987  void *argp1 = 0 ;
3988  int res1 = 0 ;
3989  int val2 ;
3990  int ecode2 = 0 ;
3991  PyObject *swig_obj[2] ;
3993 
3994  if (!SWIG_Python_UnpackTuple(args, "SimpleMinCostFlow_Capacity", 2, 2, swig_obj)) SWIG_fail;
3995  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
3996  if (!SWIG_IsOK(res1)) {
3997  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_Capacity" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
3998  }
3999  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
4000  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4001  if (!SWIG_IsOK(ecode2)) {
4002  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMinCostFlow_Capacity" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
4003  }
4004  arg2 = static_cast< operations_research::ArcIndex >(val2);
4005  result = (operations_research::FlowQuantity)((operations_research::SimpleMinCostFlow const *)arg1)->Capacity(arg2);
4006  resultobj = SWIG_From_long(static_cast< long >(result));
4007  return resultobj;
4008 fail:
4009  return NULL;
4010 }
4011 
4012 
4013 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_Supply(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4014  PyObject *resultobj = 0;
4017  void *argp1 = 0 ;
4018  int res1 = 0 ;
4019  int val2 ;
4020  int ecode2 = 0 ;
4021  PyObject *swig_obj[2] ;
4023 
4024  if (!SWIG_Python_UnpackTuple(args, "SimpleMinCostFlow_Supply", 2, 2, swig_obj)) SWIG_fail;
4025  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
4026  if (!SWIG_IsOK(res1)) {
4027  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_Supply" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
4028  }
4029  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
4030  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4031  if (!SWIG_IsOK(ecode2)) {
4032  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMinCostFlow_Supply" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4033  }
4034  arg2 = static_cast< operations_research::NodeIndex >(val2);
4035  result = (operations_research::FlowQuantity)((operations_research::SimpleMinCostFlow const *)arg1)->Supply(arg2);
4036  resultobj = SWIG_From_long(static_cast< long >(result));
4037  return resultobj;
4038 fail:
4039  return NULL;
4040 }
4041 
4042 
4043 SWIGINTERN PyObject *_wrap_SimpleMinCostFlow_UnitCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4044  PyObject *resultobj = 0;
4047  void *argp1 = 0 ;
4048  int res1 = 0 ;
4049  int val2 ;
4050  int ecode2 = 0 ;
4051  PyObject *swig_obj[2] ;
4053 
4054  if (!SWIG_Python_UnpackTuple(args, "SimpleMinCostFlow_UnitCost", 2, 2, swig_obj)) SWIG_fail;
4055  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_operations_research__SimpleMinCostFlow, 0 | 0 );
4056  if (!SWIG_IsOK(res1)) {
4057  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleMinCostFlow_UnitCost" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow const *""'");
4058  }
4059  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
4060  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4061  if (!SWIG_IsOK(ecode2)) {
4062  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimpleMinCostFlow_UnitCost" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
4063  }
4064  arg2 = static_cast< operations_research::ArcIndex >(val2);
4065  result = (operations_research::CostValue)((operations_research::SimpleMinCostFlow const *)arg1)->UnitCost(arg2);
4066  resultobj = SWIG_From_long(static_cast< long >(result));
4067  return resultobj;
4068 fail:
4069  return NULL;
4070 }
4071 
4072 
4073 SWIGINTERN PyObject *_wrap_delete_SimpleMinCostFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4074  PyObject *resultobj = 0;
4076  void *argp1 = 0 ;
4077  int res1 = 0 ;
4078  PyObject *swig_obj[1] ;
4079 
4080  if (!args) SWIG_fail;
4081  swig_obj[0] = args;
4083  if (!SWIG_IsOK(res1)) {
4084  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleMinCostFlow" "', argument " "1"" of type '" "operations_research::SimpleMinCostFlow *""'");
4085  }
4086  arg1 = reinterpret_cast< operations_research::SimpleMinCostFlow * >(argp1);
4087  delete arg1;
4088  resultobj = SWIG_Py_Void();
4089  return resultobj;
4090 fail:
4091  return NULL;
4092 }
4093 
4094 
4095 SWIGINTERN PyObject *SimpleMinCostFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4096  PyObject *obj;
4097  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
4099  return SWIG_Py_Void();
4100 }
4101 
4102 SWIGINTERN PyObject *SimpleMinCostFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4103  return SWIG_Python_InitShadowInstance(args);
4104 }
4105 
4106 SWIGINTERN PyObject *_wrap_new_LinearSumAssignment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4107  PyObject *resultobj = 0;
4109 
4110  if (!SWIG_Python_UnpackTuple(args, "new_LinearSumAssignment", 0, 0, 0)) SWIG_fail;
4113  return resultobj;
4114 fail:
4115  return NULL;
4116 }
4117 
4118 
4119 SWIGINTERN PyObject *_wrap_LinearSumAssignment_AddArcWithCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4120  PyObject *resultobj = 0;
4125  void *argp1 = 0 ;
4126  int res1 = 0 ;
4127  int val2 ;
4128  int ecode2 = 0 ;
4129  int val3 ;
4130  int ecode3 = 0 ;
4131  long val4 ;
4132  int ecode4 = 0 ;
4133  PyObject *swig_obj[4] ;
4135 
4136  if (!SWIG_Python_UnpackTuple(args, "LinearSumAssignment_AddArcWithCost", 4, 4, swig_obj)) SWIG_fail;
4138  if (!SWIG_IsOK(res1)) {
4139  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment *""'");
4140  }
4141  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4142  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4143  if (!SWIG_IsOK(ecode2)) {
4144  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4145  }
4146  arg2 = static_cast< operations_research::NodeIndex >(val2);
4147  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
4148  if (!SWIG_IsOK(ecode3)) {
4149  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "3"" of type '" "operations_research::NodeIndex""'");
4150  }
4151  arg3 = static_cast< operations_research::NodeIndex >(val3);
4152  ecode4 = SWIG_AsVal_long(swig_obj[3], &val4);
4153  if (!SWIG_IsOK(ecode4)) {
4154  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "LinearSumAssignment_AddArcWithCost" "', argument " "4"" of type '" "operations_research::CostValue""'");
4155  }
4156  arg4 = static_cast< operations_research::CostValue >(val4);
4157  result = (operations_research::ArcIndex)(arg1)->AddArcWithCost(arg2,arg3,arg4);
4158  resultobj = SWIG_From_int(static_cast< int >(result));
4159  return resultobj;
4160 fail:
4161  return NULL;
4162 }
4163 
4164 
4165 SWIGINTERN PyObject *_wrap_LinearSumAssignment_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4166  PyObject *resultobj = 0;
4168  void *argp1 = 0 ;
4169  int res1 = 0 ;
4170  PyObject *swig_obj[1] ;
4172 
4173  if (!args) SWIG_fail;
4174  swig_obj[0] = args;
4176  if (!SWIG_IsOK(res1)) {
4177  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_NumNodes" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4178  }
4179  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4181  resultobj = SWIG_From_int(static_cast< int >(result));
4182  return resultobj;
4183 fail:
4184  return NULL;
4185 }
4186 
4187 
4188 SWIGINTERN PyObject *_wrap_LinearSumAssignment_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4189  PyObject *resultobj = 0;
4191  void *argp1 = 0 ;
4192  int res1 = 0 ;
4193  PyObject *swig_obj[1] ;
4195 
4196  if (!args) SWIG_fail;
4197  swig_obj[0] = args;
4199  if (!SWIG_IsOK(res1)) {
4200  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_NumArcs" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4201  }
4202  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4204  resultobj = SWIG_From_int(static_cast< int >(result));
4205  return resultobj;
4206 fail:
4207  return NULL;
4208 }
4209 
4210 
4211 SWIGINTERN PyObject *_wrap_LinearSumAssignment_LeftNode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4212  PyObject *resultobj = 0;
4215  void *argp1 = 0 ;
4216  int res1 = 0 ;
4217  int val2 ;
4218  int ecode2 = 0 ;
4219  PyObject *swig_obj[2] ;
4221 
4222  if (!SWIG_Python_UnpackTuple(args, "LinearSumAssignment_LeftNode", 2, 2, swig_obj)) SWIG_fail;
4224  if (!SWIG_IsOK(res1)) {
4225  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_LeftNode" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4226  }
4227  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4228  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4229  if (!SWIG_IsOK(ecode2)) {
4230  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearSumAssignment_LeftNode" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
4231  }
4232  arg2 = static_cast< operations_research::ArcIndex >(val2);
4233  result = (operations_research::NodeIndex)((operations_research::SimpleLinearSumAssignment const *)arg1)->LeftNode(arg2);
4234  resultobj = SWIG_From_int(static_cast< int >(result));
4235  return resultobj;
4236 fail:
4237  return NULL;
4238 }
4239 
4240 
4241 SWIGINTERN PyObject *_wrap_LinearSumAssignment_RightNode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4242  PyObject *resultobj = 0;
4245  void *argp1 = 0 ;
4246  int res1 = 0 ;
4247  int val2 ;
4248  int ecode2 = 0 ;
4249  PyObject *swig_obj[2] ;
4251 
4252  if (!SWIG_Python_UnpackTuple(args, "LinearSumAssignment_RightNode", 2, 2, swig_obj)) SWIG_fail;
4254  if (!SWIG_IsOK(res1)) {
4255  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_RightNode" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4256  }
4257  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4258  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4259  if (!SWIG_IsOK(ecode2)) {
4260  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearSumAssignment_RightNode" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
4261  }
4262  arg2 = static_cast< operations_research::ArcIndex >(val2);
4263  result = (operations_research::NodeIndex)((operations_research::SimpleLinearSumAssignment const *)arg1)->RightNode(arg2);
4264  resultobj = SWIG_From_int(static_cast< int >(result));
4265  return resultobj;
4266 fail:
4267  return NULL;
4268 }
4269 
4270 
4271 SWIGINTERN PyObject *_wrap_LinearSumAssignment_Cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4272  PyObject *resultobj = 0;
4275  void *argp1 = 0 ;
4276  int res1 = 0 ;
4277  int val2 ;
4278  int ecode2 = 0 ;
4279  PyObject *swig_obj[2] ;
4281 
4282  if (!SWIG_Python_UnpackTuple(args, "LinearSumAssignment_Cost", 2, 2, swig_obj)) SWIG_fail;
4284  if (!SWIG_IsOK(res1)) {
4285  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_Cost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4286  }
4287  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4288  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4289  if (!SWIG_IsOK(ecode2)) {
4290  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearSumAssignment_Cost" "', argument " "2"" of type '" "operations_research::ArcIndex""'");
4291  }
4292  arg2 = static_cast< operations_research::ArcIndex >(val2);
4294  resultobj = SWIG_From_long(static_cast< long >(result));
4295  return resultobj;
4296 fail:
4297  return NULL;
4298 }
4299 
4300 
4301 SWIGINTERN PyObject *_wrap_LinearSumAssignment_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4302  PyObject *resultobj = 0;
4304  void *argp1 = 0 ;
4305  int res1 = 0 ;
4306  PyObject *swig_obj[1] ;
4308 
4309  if (!args) SWIG_fail;
4310  swig_obj[0] = args;
4312  if (!SWIG_IsOK(res1)) {
4313  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_Solve" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment *""'");
4314  }
4315  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4317  resultobj = SWIG_From_int(static_cast< int >(result));
4318  return resultobj;
4319 fail:
4320  return NULL;
4321 }
4322 
4323 
4324 SWIGINTERN PyObject *_wrap_LinearSumAssignment_OptimalCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4325  PyObject *resultobj = 0;
4327  void *argp1 = 0 ;
4328  int res1 = 0 ;
4329  PyObject *swig_obj[1] ;
4331 
4332  if (!args) SWIG_fail;
4333  swig_obj[0] = args;
4335  if (!SWIG_IsOK(res1)) {
4336  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_OptimalCost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4337  }
4338  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4339  result = (operations_research::CostValue)((operations_research::SimpleLinearSumAssignment const *)arg1)->OptimalCost();
4340  resultobj = SWIG_From_long(static_cast< long >(result));
4341  return resultobj;
4342 fail:
4343  return NULL;
4344 }
4345 
4346 
4347 SWIGINTERN PyObject *_wrap_LinearSumAssignment_RightMate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4348  PyObject *resultobj = 0;
4351  void *argp1 = 0 ;
4352  int res1 = 0 ;
4353  int val2 ;
4354  int ecode2 = 0 ;
4355  PyObject *swig_obj[2] ;
4357 
4358  if (!SWIG_Python_UnpackTuple(args, "LinearSumAssignment_RightMate", 2, 2, swig_obj)) SWIG_fail;
4360  if (!SWIG_IsOK(res1)) {
4361  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_RightMate" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4362  }
4363  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4364  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4365  if (!SWIG_IsOK(ecode2)) {
4366  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearSumAssignment_RightMate" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4367  }
4368  arg2 = static_cast< operations_research::NodeIndex >(val2);
4369  result = (operations_research::NodeIndex)((operations_research::SimpleLinearSumAssignment const *)arg1)->RightMate(arg2);
4370  resultobj = SWIG_From_int(static_cast< int >(result));
4371  return resultobj;
4372 fail:
4373  return NULL;
4374 }
4375 
4376 
4377 SWIGINTERN PyObject *_wrap_LinearSumAssignment_AssignmentCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4378  PyObject *resultobj = 0;
4381  void *argp1 = 0 ;
4382  int res1 = 0 ;
4383  int val2 ;
4384  int ecode2 = 0 ;
4385  PyObject *swig_obj[2] ;
4387 
4388  if (!SWIG_Python_UnpackTuple(args, "LinearSumAssignment_AssignmentCost", 2, 2, swig_obj)) SWIG_fail;
4390  if (!SWIG_IsOK(res1)) {
4391  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearSumAssignment_AssignmentCost" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment const *""'");
4392  }
4393  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4394  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4395  if (!SWIG_IsOK(ecode2)) {
4396  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearSumAssignment_AssignmentCost" "', argument " "2"" of type '" "operations_research::NodeIndex""'");
4397  }
4398  arg2 = static_cast< operations_research::NodeIndex >(val2);
4399  result = (operations_research::CostValue)((operations_research::SimpleLinearSumAssignment const *)arg1)->AssignmentCost(arg2);
4400  resultobj = SWIG_From_long(static_cast< long >(result));
4401  return resultobj;
4402 fail:
4403  return NULL;
4404 }
4405 
4406 
4407 SWIGINTERN PyObject *_wrap_delete_LinearSumAssignment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4408  PyObject *resultobj = 0;
4410  void *argp1 = 0 ;
4411  int res1 = 0 ;
4412  PyObject *swig_obj[1] ;
4413 
4414  if (!args) SWIG_fail;
4415  swig_obj[0] = args;
4417  if (!SWIG_IsOK(res1)) {
4418  SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearSumAssignment" "', argument " "1"" of type '" "operations_research::SimpleLinearSumAssignment *""'");
4419  }
4420  arg1 = reinterpret_cast< operations_research::SimpleLinearSumAssignment * >(argp1);
4421  delete arg1;
4422  resultobj = SWIG_Py_Void();
4423  return resultobj;
4424 fail:
4425  return NULL;
4426 }
4427 
4428 
4429 SWIGINTERN PyObject *LinearSumAssignment_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4430  PyObject *obj;
4431  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
4433  return SWIG_Py_Void();
4434 }
4435 
4436 SWIGINTERN PyObject *LinearSumAssignment_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4437  return SWIG_Python_InitShadowInstance(args);
4438 }
4439 
4440 SWIGINTERN PyObject *_wrap_DijkstraShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4441  PyObject *resultobj = 0;
4442  int arg1 ;
4443  int arg2 ;
4444  int arg3 ;
4445  std::function< int64 (int,int) > arg4 ;
4446  int64 arg5 ;
4447  std::vector< int > *arg6 = (std::vector< int > *) 0 ;
4448  int val1 ;
4449  int ecode1 = 0 ;
4450  int val2 ;
4451  int ecode2 = 0 ;
4452  int val3 ;
4453  int ecode3 = 0 ;
4454  long val5 ;
4455  int ecode5 = 0 ;
4456  std::vector< int > temp6 ;
4457  PyObject *swig_obj[5] ;
4458  bool result;
4459 
4460  {
4461  arg6 = &temp6;
4462  }
4463  if (!SWIG_Python_UnpackTuple(args, "DijkstraShortestPath", 5, 5, swig_obj)) SWIG_fail;
4464  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
4465  if (!SWIG_IsOK(ecode1)) {
4466  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "DijkstraShortestPath" "', argument " "1"" of type '" "int""'");
4467  }
4468  arg1 = static_cast< int >(val1);
4469  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4470  if (!SWIG_IsOK(ecode2)) {
4471  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DijkstraShortestPath" "', argument " "2"" of type '" "int""'");
4472  }
4473  arg2 = static_cast< int >(val2);
4474  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
4475  if (!SWIG_IsOK(ecode3)) {
4476  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DijkstraShortestPath" "', argument " "3"" of type '" "int""'");
4477  }
4478  arg3 = static_cast< int >(val3);
4479  {
4480  SharedPyPtr input(swig_obj[3]);
4481  arg4 = [input](int i, int j) {
4482  return InvokePythonCallableReturning<int64>(input.get(), "ii", i, j);
4483  };
4484  }
4485  ecode5 = SWIG_AsVal_long(swig_obj[4], &val5);
4486  if (!SWIG_IsOK(ecode5)) {
4487  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "DijkstraShortestPath" "', argument " "5"" of type '" "int64""'");
4488  }
4489  arg5 = static_cast< int64 >(val5);
4490  result = (bool)operations_research::DijkstraShortestPath(arg1,arg2,arg3,arg4,arg5,arg6);
4491  resultobj = SWIG_From_bool(static_cast< bool >(result));
4492  {
4493  resultobj = SWIG_Python_AppendOutput(resultobj, list_output_helper(arg6, &PyInt_FromLong));
4494  }
4495  return resultobj;
4496 fail:
4497  return NULL;
4498 }
4499 
4500 
4501 SWIGINTERN PyObject *_wrap_BellmanFordShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4502  PyObject *resultobj = 0;
4503  int arg1 ;
4504  int arg2 ;
4505  int arg3 ;
4506  std::function< int64 (int,int) > arg4 ;
4507  int64 arg5 ;
4508  std::vector< int > *arg6 = (std::vector< int > *) 0 ;
4509  int val1 ;
4510  int ecode1 = 0 ;
4511  int val2 ;
4512  int ecode2 = 0 ;
4513  int val3 ;
4514  int ecode3 = 0 ;
4515  long val5 ;
4516  int ecode5 = 0 ;
4517  std::vector< int > temp6 ;
4518  PyObject *swig_obj[5] ;
4519  bool result;
4520 
4521  {
4522  arg6 = &temp6;
4523  }
4524  if (!SWIG_Python_UnpackTuple(args, "BellmanFordShortestPath", 5, 5, swig_obj)) SWIG_fail;
4525  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
4526  if (!SWIG_IsOK(ecode1)) {
4527  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "BellmanFordShortestPath" "', argument " "1"" of type '" "int""'");
4528  }
4529  arg1 = static_cast< int >(val1);
4530  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4531  if (!SWIG_IsOK(ecode2)) {
4532  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BellmanFordShortestPath" "', argument " "2"" of type '" "int""'");
4533  }
4534  arg2 = static_cast< int >(val2);
4535  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
4536  if (!SWIG_IsOK(ecode3)) {
4537  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BellmanFordShortestPath" "', argument " "3"" of type '" "int""'");
4538  }
4539  arg3 = static_cast< int >(val3);
4540  {
4541  SharedPyPtr input(swig_obj[3]);
4542  arg4 = [input](int i, int j) {
4543  return InvokePythonCallableReturning<int64>(input.get(), "ii", i, j);
4544  };
4545  }
4546  ecode5 = SWIG_AsVal_long(swig_obj[4], &val5);
4547  if (!SWIG_IsOK(ecode5)) {
4548  SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "BellmanFordShortestPath" "', argument " "5"" of type '" "int64""'");
4549  }
4550  arg5 = static_cast< int64 >(val5);
4551  result = (bool)operations_research::BellmanFordShortestPath(arg1,arg2,arg3,arg4,arg5,arg6);
4552  resultobj = SWIG_From_bool(static_cast< bool >(result));
4553  {
4554  resultobj = SWIG_Python_AppendOutput(resultobj, list_output_helper(arg6, &PyInt_FromLong));
4555  }
4556  return resultobj;
4557 fail:
4558  return NULL;
4559 }
4560 
4561 
4562 SWIGINTERN PyObject *_wrap_AStarShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4563  PyObject *resultobj = 0;
4564  int arg1 ;
4565  int arg2 ;
4566  int arg3 ;
4567  std::function< int64 (int,int) > arg4 ;
4568  std::function< int64 (int) > arg5 ;
4569  int64 arg6 ;
4570  std::vector< int > *arg7 = (std::vector< int > *) 0 ;
4571  int val1 ;
4572  int ecode1 = 0 ;
4573  int val2 ;
4574  int ecode2 = 0 ;
4575  int val3 ;
4576  int ecode3 = 0 ;
4577  long val6 ;
4578  int ecode6 = 0 ;
4579  std::vector< int > temp7 ;
4580  PyObject *swig_obj[6] ;
4581  bool result;
4582 
4583  {
4584  arg7 = &temp7;
4585  }
4586  if (!SWIG_Python_UnpackTuple(args, "AStarShortestPath", 6, 6, swig_obj)) SWIG_fail;
4587  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
4588  if (!SWIG_IsOK(ecode1)) {
4589  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "AStarShortestPath" "', argument " "1"" of type '" "int""'");
4590  }
4591  arg1 = static_cast< int >(val1);
4592  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
4593  if (!SWIG_IsOK(ecode2)) {
4594  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AStarShortestPath" "', argument " "2"" of type '" "int""'");
4595  }
4596  arg2 = static_cast< int >(val2);
4597  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
4598  if (!SWIG_IsOK(ecode3)) {
4599  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "AStarShortestPath" "', argument " "3"" of type '" "int""'");
4600  }
4601  arg3 = static_cast< int >(val3);
4602  {
4603  SharedPyPtr input(swig_obj[3]);
4604  arg4 = [input](int i, int j) {
4605  return InvokePythonCallableReturning<int64>(input.get(), "ii", i, j);
4606  };
4607  }
4608  {
4609  SharedPyPtr input(swig_obj[4]);
4610  arg5 = [input](int index) {
4611  return InvokePythonCallableReturning<int64>(input.get(), "(i)", index);
4612  };
4613  }
4614  ecode6 = SWIG_AsVal_long(swig_obj[5], &val6);
4615  if (!SWIG_IsOK(ecode6)) {
4616  SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "AStarShortestPath" "', argument " "6"" of type '" "int64""'");
4617  }
4618  arg6 = static_cast< int64 >(val6);
4619  result = (bool)operations_research::AStarShortestPath(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4620  resultobj = SWIG_From_bool(static_cast< bool >(result));
4621  {
4622  resultobj = SWIG_Python_AppendOutput(resultobj, list_output_helper(arg7, &PyInt_FromLong));
4623  }
4624  return resultobj;
4625 fail:
4626  return NULL;
4627 }
4628 
4629 
4630 static PyMethodDef SwigMethods[] = {
4631  { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
4632  { "new_SimpleMaxFlow", _wrap_new_SimpleMaxFlow, METH_NOARGS, NULL},
4633  { "SimpleMaxFlow_AddArcWithCapacity", _wrap_SimpleMaxFlow_AddArcWithCapacity, METH_VARARGS, NULL},
4634  { "SimpleMaxFlow_NumNodes", _wrap_SimpleMaxFlow_NumNodes, METH_O, NULL},
4635  { "SimpleMaxFlow_NumArcs", _wrap_SimpleMaxFlow_NumArcs, METH_O, NULL},
4636  { "SimpleMaxFlow_Tail", _wrap_SimpleMaxFlow_Tail, METH_VARARGS, NULL},
4637  { "SimpleMaxFlow_Head", _wrap_SimpleMaxFlow_Head, METH_VARARGS, NULL},
4638  { "SimpleMaxFlow_Capacity", _wrap_SimpleMaxFlow_Capacity, METH_VARARGS, NULL},
4639  { "SimpleMaxFlow_Solve", _wrap_SimpleMaxFlow_Solve, METH_VARARGS, NULL},
4640  { "SimpleMaxFlow_OptimalFlow", _wrap_SimpleMaxFlow_OptimalFlow, METH_O, NULL},
4641  { "SimpleMaxFlow_Flow", _wrap_SimpleMaxFlow_Flow, METH_VARARGS, NULL},
4642  { "SimpleMaxFlow_GetSourceSideMinCut", _wrap_SimpleMaxFlow_GetSourceSideMinCut, METH_O, NULL},
4643  { "SimpleMaxFlow_GetSinkSideMinCut", _wrap_SimpleMaxFlow_GetSinkSideMinCut, METH_O, NULL},
4644  { "SimpleMaxFlow_SetArcCapacity", _wrap_SimpleMaxFlow_SetArcCapacity, METH_VARARGS, NULL},
4645  { "delete_SimpleMaxFlow", _wrap_delete_SimpleMaxFlow, METH_O, NULL},
4646  { "SimpleMaxFlow_swigregister", SimpleMaxFlow_swigregister, METH_O, NULL},
4647  { "SimpleMaxFlow_swiginit", SimpleMaxFlow_swiginit, METH_VARARGS, NULL},
4648  { "new_MinCostFlowBase", _wrap_new_MinCostFlowBase, METH_NOARGS, NULL},
4649  { "delete_MinCostFlowBase", _wrap_delete_MinCostFlowBase, METH_O, NULL},
4650  { "MinCostFlowBase_swigregister", MinCostFlowBase_swigregister, METH_O, NULL},
4651  { "MinCostFlowBase_swiginit", MinCostFlowBase_swiginit, METH_VARARGS, NULL},
4652  { "new_SimpleMinCostFlow", _wrap_new_SimpleMinCostFlow, METH_VARARGS, NULL},
4653  { "SimpleMinCostFlow_AddArcWithCapacityAndUnitCost", _wrap_SimpleMinCostFlow_AddArcWithCapacityAndUnitCost, METH_VARARGS, NULL},
4654  { "SimpleMinCostFlow_SetNodeSupply", _wrap_SimpleMinCostFlow_SetNodeSupply, METH_VARARGS, NULL},
4655  { "SimpleMinCostFlow_Solve", _wrap_SimpleMinCostFlow_Solve, METH_O, NULL},
4656  { "SimpleMinCostFlow_SolveMaxFlowWithMinCost", _wrap_SimpleMinCostFlow_SolveMaxFlowWithMinCost, METH_O, NULL},
4657  { "SimpleMinCostFlow_OptimalCost", _wrap_SimpleMinCostFlow_OptimalCost, METH_O, NULL},
4658  { "SimpleMinCostFlow_MaximumFlow", _wrap_SimpleMinCostFlow_MaximumFlow, METH_O, NULL},
4659  { "SimpleMinCostFlow_Flow", _wrap_SimpleMinCostFlow_Flow, METH_VARARGS, NULL},
4660  { "SimpleMinCostFlow_NumNodes", _wrap_SimpleMinCostFlow_NumNodes, METH_O, NULL},
4661  { "SimpleMinCostFlow_NumArcs", _wrap_SimpleMinCostFlow_NumArcs, METH_O, NULL},
4662  { "SimpleMinCostFlow_Tail", _wrap_SimpleMinCostFlow_Tail, METH_VARARGS, NULL},
4663  { "SimpleMinCostFlow_Head", _wrap_SimpleMinCostFlow_Head, METH_VARARGS, NULL},
4664  { "SimpleMinCostFlow_Capacity", _wrap_SimpleMinCostFlow_Capacity, METH_VARARGS, NULL},
4665  { "SimpleMinCostFlow_Supply", _wrap_SimpleMinCostFlow_Supply, METH_VARARGS, NULL},
4666  { "SimpleMinCostFlow_UnitCost", _wrap_SimpleMinCostFlow_UnitCost, METH_VARARGS, NULL},
4667  { "delete_SimpleMinCostFlow", _wrap_delete_SimpleMinCostFlow, METH_O, NULL},
4668  { "SimpleMinCostFlow_swigregister", SimpleMinCostFlow_swigregister, METH_O, NULL},
4669  { "SimpleMinCostFlow_swiginit", SimpleMinCostFlow_swiginit, METH_VARARGS, NULL},
4670  { "new_LinearSumAssignment", _wrap_new_LinearSumAssignment, METH_NOARGS, NULL},
4671  { "LinearSumAssignment_AddArcWithCost", _wrap_LinearSumAssignment_AddArcWithCost, METH_VARARGS, NULL},
4672  { "LinearSumAssignment_NumNodes", _wrap_LinearSumAssignment_NumNodes, METH_O, NULL},
4673  { "LinearSumAssignment_NumArcs", _wrap_LinearSumAssignment_NumArcs, METH_O, NULL},
4674  { "LinearSumAssignment_LeftNode", _wrap_LinearSumAssignment_LeftNode, METH_VARARGS, NULL},
4675  { "LinearSumAssignment_RightNode", _wrap_LinearSumAssignment_RightNode, METH_VARARGS, NULL},
4676  { "LinearSumAssignment_Cost", _wrap_LinearSumAssignment_Cost, METH_VARARGS, NULL},
4677  { "LinearSumAssignment_Solve", _wrap_LinearSumAssignment_Solve, METH_O, NULL},
4678  { "LinearSumAssignment_OptimalCost", _wrap_LinearSumAssignment_OptimalCost, METH_O, NULL},
4679  { "LinearSumAssignment_RightMate", _wrap_LinearSumAssignment_RightMate, METH_VARARGS, NULL},
4680  { "LinearSumAssignment_AssignmentCost", _wrap_LinearSumAssignment_AssignmentCost, METH_VARARGS, NULL},
4681  { "delete_LinearSumAssignment", _wrap_delete_LinearSumAssignment, METH_O, NULL},
4682  { "LinearSumAssignment_swigregister", LinearSumAssignment_swigregister, METH_O, NULL},
4683  { "LinearSumAssignment_swiginit", LinearSumAssignment_swiginit, METH_VARARGS, NULL},
4684  { "DijkstraShortestPath", _wrap_DijkstraShortestPath, METH_VARARGS, NULL},
4685  { "BellmanFordShortestPath", _wrap_BellmanFordShortestPath, METH_VARARGS, NULL},
4686  { "AStarShortestPath", _wrap_AStarShortestPath, METH_VARARGS, NULL},
4687  { NULL, NULL, 0, NULL }
4688 };
4689 
4690 static PyMethodDef SwigMethods_proxydocs[] = {
4691  { NULL, NULL, 0, NULL }
4692 };
4693 
4694 
4695 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4696 
4699 }
4700 static swig_type_info _swigt__p_ZVectorT_int_t = {"_p_ZVectorT_int_t", "operations_research::NodeIndexArray *|operations_research::ArcIndexArray *|ZVector< int > *", 0, 0, (void*)0, 0};
4701 static swig_type_info _swigt__p_ZVectorT_long_t = {"_p_ZVectorT_long_t", "operations_research::QuantityArray *|operations_research::CostArray *|ZVector< long > *", 0, 0, (void*)0, 0};
4702 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4703 static swig_type_info _swigt__p_int = {"_p_int", "int *|int_least32_t *|int32 *|operations_research::NodeIndex *|int32_t *|operations_research::ArcIndex *", 0, 0, (void*)0, 0};
4704 static swig_type_info _swigt__p_long = {"_p_long", "intptr_t *|operations_research::CostValue *|int_least64_t *|int_fast32_t *|int_fast64_t *|int64 *|int64_t *|operations_research::FlowQuantity *|long *|int_fast16_t *|intmax_t *", 0, 0, (void*)0, 0};
4705 static swig_type_info _swigt__p_operations_research__EbertGraphT_int_int_t = {"_p_operations_research__EbertGraphT_int_int_t", "operations_research::StarGraph *|operations_research::EbertGraph< int,int > *", 0, 0, (void*)0, 0};
4706 static swig_type_info _swigt__p_operations_research__ForwardEbertGraphT_int_int_t = {"_p_operations_research__ForwardEbertGraphT_int_int_t", "operations_research::ForwardEbertGraph< int,int > *|operations_research::ForwardStarGraph *", 0, 0, (void*)0, 0};
4707 static swig_type_info _swigt__p_operations_research__ForwardStaticGraphT_int_int_t = {"_p_operations_research__ForwardStaticGraphT_int_int_t", "operations_research::ForwardStaticGraph< int,int > *|operations_research::ForwardStarStaticGraph *", 0, 0, (void*)0, 0};
4708 static swig_type_info _swigt__p_operations_research__MinCostFlowBase = {"_p_operations_research__MinCostFlowBase", "operations_research::MinCostFlowBase *", 0, 0, (void*)0, 0};
4709 static swig_type_info _swigt__p_operations_research__SimpleLinearSumAssignment = {"_p_operations_research__SimpleLinearSumAssignment", "operations_research::SimpleLinearSumAssignment *", 0, 0, (void*)0, 0};
4710 static swig_type_info _swigt__p_operations_research__SimpleMaxFlow = {"_p_operations_research__SimpleMaxFlow", "operations_research::SimpleMaxFlow *", 0, 0, (void*)0, 0};
4711 static swig_type_info _swigt__p_operations_research__SimpleMinCostFlow = {"_p_operations_research__SimpleMinCostFlow", "operations_research::SimpleMinCostFlow *", 0, 0, (void*)0, 0};
4712 static swig_type_info _swigt__p_short = {"_p_short", "int16 *|short *|int_least16_t *|int16_t *", 0, 0, (void*)0, 0};
4713 static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "signed char *|int8 *|int_least8_t *|int_fast8_t *|int8_t *", 0, 0, (void*)0, 0};
4714 static swig_type_info _swigt__p_std__vectorT_int_t = {"_p_std__vectorT_int_t", "std::vector< operations_research::NodeIndex > *|std::vector< int > *", 0, 0, (void*)0, 0};
4715 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8 *|uint_least8_t *|uint_fast8_t *|uint8_t *", 0, 0, (void*)0, 0};
4716 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "uint_least32_t *|uint32 *|uint32_t *|unsigned int *", 0, 0, (void*)0, 0};
4717 static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "uintptr_t *|uint_least64_t *|uint_fast32_t *|uint_fast64_t *|uint64 *|uint64_t *|unsigned long *|uint_fast16_t *|uintmax_t *", 0, 0, (void*)0, 0};
4718 static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16 *|unsigned short *|uint_least16_t *|uint16_t *", 0, 0, (void*)0, 0};
4719 
4723  &_swigt__p_char,
4724  &_swigt__p_int,
4725  &_swigt__p_long,
4733  &_swigt__p_short,
4740 };
4741 
4744 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4745 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
4746 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
4754 static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
4755 static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
4757 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
4758 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
4759 static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
4761 
4766  _swigc__p_int,
4782 };
4783 
4784 
4785 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
4786 
4788 {0, 0, 0, 0.0, 0, 0}};
4789 
4790 #ifdef __cplusplus
4791 }
4792 #endif
4793 /* -----------------------------------------------------------------------------
4794  * Type initialization:
4795  * This problem is tough by the requirement that no dynamic
4796  * memory is used. Also, since swig_type_info structures store pointers to
4797  * swig_cast_info structures and swig_cast_info structures store pointers back
4798  * to swig_type_info structures, we need some lookup code at initialization.
4799  * The idea is that swig generates all the structures that are needed.
4800  * The runtime then collects these partially filled structures.
4801  * The SWIG_InitializeModule function takes these initial arrays out of
4802  * swig_module, and does all the lookup, filling in the swig_module.types
4803  * array with the correct data and linking the correct swig_cast_info
4804  * structures together.
4805  *
4806  * The generated swig_type_info structures are assigned statically to an initial
4807  * array. We just loop through that array, and handle each type individually.
4808  * First we lookup if this type has been already loaded, and if so, use the
4809  * loaded structure instead of the generated one. Then we have to fill in the
4810  * cast linked list. The cast data is initially stored in something like a
4811  * two-dimensional array. Each row corresponds to a type (there are the same
4812  * number of rows as there are in the swig_type_initial array). Each entry in
4813  * a column is one of the swig_cast_info structures for that type.
4814  * The cast_initial array is actually an array of arrays, because each row has
4815  * a variable number of columns. So to actually build the cast linked list,
4816  * we find the array of casts associated with the type, and loop through it
4817  * adding the casts to the list. The one last trick we need to do is making
4818  * sure the type pointer in the swig_cast_info struct is correct.
4819  *
4820  * First off, we lookup the cast->type name to see if it is already loaded.
4821  * There are three cases to handle:
4822  * 1) If the cast->type has already been loaded AND the type we are adding
4823  * casting info to has not been loaded (it is in this module), THEN we
4824  * replace the cast->type pointer with the type pointer that has already
4825  * been loaded.
4826  * 2) If BOTH types (the one we are adding casting info to, and the
4827  * cast->type) are loaded, THEN the cast info has already been loaded by
4828  * the previous module so we just ignore it.
4829  * 3) Finally, if cast->type has not already been loaded, then we add that
4830  * swig_cast_info to the linked list (because the cast->type) pointer will
4831  * be correct.
4832  * ----------------------------------------------------------------------------- */
4833 
4834 #ifdef __cplusplus
4835 extern "C" {
4836 #if 0
4837 } /* c-mode */
4838 #endif
4839 #endif
4840 
4841 #if 0
4842 #define SWIGRUNTIME_DEBUG
4843 #endif
4844 
4845 
4846 SWIGRUNTIME void
4847 SWIG_InitializeModule(void *clientdata) {
4848  size_t i;
4849  swig_module_info *module_head, *iter;
4850  int init;
4851 
4852  /* check to see if the circular list has been setup, if not, set it up */
4853  if (swig_module.next==0) {
4854  /* Initialize the swig_module */
4858  init = 1;
4859  } else {
4860  init = 0;
4861  }
4862 
4863  /* Try and load any already created modules */
4864  module_head = SWIG_GetModule(clientdata);
4865  if (!module_head) {
4866  /* This is the first module loaded for this interpreter */
4867  /* so set the swig module into the interpreter */
4868  SWIG_SetModule(clientdata, &swig_module);
4869  } else {
4870  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4871  iter=module_head;
4872  do {
4873  if (iter==&swig_module) {
4874  /* Our module is already in the list, so there's nothing more to do. */
4875  return;
4876  }
4877  iter=iter->next;
4878  } while (iter!= module_head);
4879 
4880  /* otherwise we must add our module into the list */
4881  swig_module.next = module_head->next;
4882  module_head->next = &swig_module;
4883  }
4884 
4885  /* When multiple interpreters are used, a module could have already been initialized in
4886  a different interpreter, but not yet have a pointer in this interpreter.
4887  In this case, we do not want to continue adding types... everything should be
4888  set up already */
4889  if (init == 0) return;
4890 
4891  /* Now work on filling in swig_module.types */
4892 #ifdef SWIGRUNTIME_DEBUG
4893  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
4894 #endif
4895  for (i = 0; i < swig_module.size; ++i) {
4896  swig_type_info *type = 0;
4897  swig_type_info *ret;
4898  swig_cast_info *cast;
4899 
4900 #ifdef SWIGRUNTIME_DEBUG
4901  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4902 #endif
4903 
4904  /* if there is another module already loaded */
4905  if (swig_module.next != &swig_module) {
4907  }
4908  if (type) {
4909  /* Overwrite clientdata field */
4910 #ifdef SWIGRUNTIME_DEBUG
4911  printf("SWIG_InitializeModule: found type %s\n", type->name);
4912 #endif
4915 #ifdef SWIGRUNTIME_DEBUG
4916  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4917 #endif
4918  }
4919  } else {
4920  type = swig_module.type_initial[i];
4921  }
4922 
4923  /* Insert casting types */
4924  cast = swig_module.cast_initial[i];
4925  while (cast->type) {
4926  /* Don't need to add information already in the list */
4927  ret = 0;
4928 #ifdef SWIGRUNTIME_DEBUG
4929  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4930 #endif
4931  if (swig_module.next != &swig_module) {
4933 #ifdef SWIGRUNTIME_DEBUG
4934  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4935 #endif
4936  }
4937  if (ret) {
4938  if (type == swig_module.type_initial[i]) {
4939 #ifdef SWIGRUNTIME_DEBUG
4940  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4941 #endif
4942  cast->type = ret;
4943  ret = 0;
4944  } else {
4945  /* Check for casting already in the list */
4946  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4947 #ifdef SWIGRUNTIME_DEBUG
4948  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4949 #endif
4950  if (!ocast) ret = 0;
4951  }
4952  }
4953 
4954  if (!ret) {
4955 #ifdef SWIGRUNTIME_DEBUG
4956  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4957 #endif
4958  if (type->cast) {
4959  type->cast->prev = cast;
4960  cast->next = type->cast;
4961  }
4962  type->cast = cast;
4963  }
4964  cast++;
4965  }
4966  /* Set entry in modules->types array equal to the type */
4967  swig_module.types[i] = type;
4968  }
4969  swig_module.types[i] = 0;
4970 
4971 #ifdef SWIGRUNTIME_DEBUG
4972  printf("**** SWIG_InitializeModule: Cast List ******\n");
4973  for (i = 0; i < swig_module.size; ++i) {
4974  int j = 0;
4976  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4977  while (cast->type) {
4978  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4979  cast++;
4980  ++j;
4981  }
4982  printf("---- Total casts: %d\n",j);
4983  }
4984  printf("**** SWIG_InitializeModule: Cast List ******\n");
4985 #endif
4986 }
4987 
4988 /* This function will propagate the clientdata field of type to
4989 * any new swig_type_info structures that have been added into the list
4990 * of equivalent types. It is like calling
4991 * SWIG_TypeClientData(type, clientdata) a second time.
4992 */
4993 SWIGRUNTIME void
4995  size_t i;
4996  swig_cast_info *equiv;
4997  static int init_run = 0;
4998 
4999  if (init_run) return;
5000  init_run = 1;
5001 
5002  for (i = 0; i < swig_module.size; i++) {
5003  if (swig_module.types[i]->clientdata) {
5004  equiv = swig_module.types[i]->cast;
5005  while (equiv) {
5006  if (!equiv->converter) {
5007  if (equiv->type && !equiv->type->clientdata)
5009  }
5010  equiv = equiv->next;
5011  }
5012  }
5013  }
5014 }
5015 
5016 #ifdef __cplusplus
5017 #if 0
5018 {
5019  /* c-mode */
5020 #endif
5021 }
5022 #endif
5023 
5024 
5025 
5026 #ifdef __cplusplus
5027 extern "C" {
5028 #endif
5029 
5030  /* Python-specific SWIG API */
5031 #define SWIG_newvarlink() SWIG_Python_newvarlink()
5032 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
5033 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
5034 
5035  /* -----------------------------------------------------------------------------
5036  * global variable support code.
5037  * ----------------------------------------------------------------------------- */
5038 
5039  typedef struct swig_globalvar {
5040  char *name; /* Name of global variable */
5041  PyObject *(*get_attr)(void); /* Return the current value */
5042  int (*set_attr)(PyObject *); /* Set the value */
5043  struct swig_globalvar *next;
5045 
5046  typedef struct swig_varlinkobject {
5047  PyObject_HEAD
5050 
5051  SWIGINTERN PyObject *
5053 #if PY_VERSION_HEX >= 0x03000000
5054  return PyUnicode_InternFromString("<Swig global variables>");
5055 #else
5056  return PyString_FromString("<Swig global variables>");
5057 #endif
5058  }
5059 
5060  SWIGINTERN PyObject *
5062 #if PY_VERSION_HEX >= 0x03000000
5063  PyObject *str = PyUnicode_InternFromString("(");
5064  PyObject *tail;
5065  PyObject *joined;
5067  for (var = v->vars; var; var=var->next) {
5068  tail = PyUnicode_FromString(var->name);
5069  joined = PyUnicode_Concat(str, tail);
5070  Py_DecRef(str);
5071  Py_DecRef(tail);
5072  str = joined;
5073  if (var->next) {
5074  tail = PyUnicode_InternFromString(", ");
5075  joined = PyUnicode_Concat(str, tail);
5076  Py_DecRef(str);
5077  Py_DecRef(tail);
5078  str = joined;
5079  }
5080  }
5081  tail = PyUnicode_InternFromString(")");
5082  joined = PyUnicode_Concat(str, tail);
5083  Py_DecRef(str);
5084  Py_DecRef(tail);
5085  str = joined;
5086 #else
5087  PyObject *str = PyString_FromString("(");
5089  for (var = v->vars; var; var=var->next) {
5090  PyString_ConcatAndDel(&str,PyString_FromString(var->name));
5091  if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
5092  }
5093  PyString_ConcatAndDel(&str,PyString_FromString(")"));
5094 #endif
5095  return str;
5096  }
5097 
5098  SWIGINTERN void
5100  swig_globalvar *var = v->vars;
5101  while (var) {
5102  swig_globalvar *n = var->next;
5103  free(var->name);
5104  free(var);
5105  var = n;
5106  }
5107  }
5108 
5109  SWIGINTERN PyObject *
5111  PyObject *res = NULL;
5112  swig_globalvar *var = v->vars;
5113  while (var) {
5114  if (strcmp(var->name,n) == 0) {
5115  res = (*var->get_attr)();
5116  break;
5117  }
5118  var = var->next;
5119  }
5120  if (res == NULL && !PyErr_Occurred()) {
5121  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
5122  }
5123  return res;
5124  }
5125 
5126  SWIGINTERN int
5127  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
5128  int res = 1;
5129  swig_globalvar *var = v->vars;
5130  while (var) {
5131  if (strcmp(var->name,n) == 0) {
5132  res = (*var->set_attr)(p);
5133  break;
5134  }
5135  var = var->next;
5136  }
5137  if (res == 1 && !PyErr_Occurred()) {
5138  PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
5139  }
5140  return res;
5141  }
5142 
5143  SWIGINTERN PyTypeObject*
5145  static char varlink__doc__[] = "Swig var link object";
5146  static PyTypeObject varlink_type;
5147  static int type_init = 0;
5148  if (!type_init) {
5149  const PyTypeObject tmp = {
5150 #if PY_VERSION_HEX >= 0x03000000
5151  PyVarObject_HEAD_INIT(NULL, 0)
5152 #else
5153  PyObject_HEAD_INIT(NULL)
5154  0, /* ob_size */
5155 #endif
5156  "swigvarlink", /* tp_name */
5157  sizeof(swig_varlinkobject), /* tp_basicsize */
5158  0, /* tp_itemsize */
5159  (destructor) swig_varlink_dealloc, /* tp_dealloc */
5160  0, /* tp_print */
5161  (getattrfunc) swig_varlink_getattr, /* tp_getattr */
5162  (setattrfunc) swig_varlink_setattr, /* tp_setattr */
5163  0, /* tp_compare */
5164  (reprfunc) swig_varlink_repr, /* tp_repr */
5165  0, /* tp_as_number */
5166  0, /* tp_as_sequence */
5167  0, /* tp_as_mapping */
5168  0, /* tp_hash */
5169  0, /* tp_call */
5170  (reprfunc) swig_varlink_str, /* tp_str */
5171  0, /* tp_getattro */
5172  0, /* tp_setattro */
5173  0, /* tp_as_buffer */
5174  0, /* tp_flags */
5175  varlink__doc__, /* tp_doc */
5176  0, /* tp_traverse */
5177  0, /* tp_clear */
5178  0, /* tp_richcompare */
5179  0, /* tp_weaklistoffset */
5180  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
5181  0, /* tp_del */
5182  0, /* tp_version_tag */
5183 #if PY_VERSION_HEX >= 0x03040000
5184  0, /* tp_finalize */
5185 #endif
5186 #if PY_VERSION_HEX >= 0x03080000
5187  0, /* tp_vectorcall */
5188 #endif
5189 #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
5190  0, /* tp_print */
5191 #endif
5192 #ifdef COUNT_ALLOCS
5193  0, /* tp_allocs */
5194  0, /* tp_frees */
5195  0, /* tp_maxalloc */
5196  0, /* tp_prev */
5197  0 /* tp_next */
5198 #endif
5199  };
5200  varlink_type = tmp;
5201  type_init = 1;
5202  if (PyType_Ready(&varlink_type) < 0)
5203  return NULL;
5204  }
5205  return &varlink_type;
5206  }
5207 
5208  /* Create a variable linking object for use later */
5209  SWIGINTERN PyObject *
5211  swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
5212  if (result) {
5213  result->vars = 0;
5214  }
5215  return ((PyObject*) result);
5216  }
5217 
5218  SWIGINTERN void
5219  SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
5222  if (gv) {
5223  size_t size = strlen(name)+1;
5224  gv->name = (char *)malloc(size);
5225  if (gv->name) {
5226  memcpy(gv->name, name, size);
5227  gv->get_attr = get_attr;
5228  gv->set_attr = set_attr;
5229  gv->next = v->vars;
5230  }
5231  }
5232  v->vars = gv;
5233  }
5234 
5235  SWIGINTERN PyObject *
5237  static PyObject *globals = 0;
5238  if (!globals) {
5239  globals = SWIG_newvarlink();
5240  }
5241  return globals;
5242  }
5243 
5244  /* -----------------------------------------------------------------------------
5245  * constants/methods manipulation
5246  * ----------------------------------------------------------------------------- */
5247 
5248  /* Install Constants */
5249  SWIGINTERN void
5250  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
5251  PyObject *obj = 0;
5252  size_t i;
5253  for (i = 0; constants[i].type; ++i) {
5254  switch(constants[i].type) {
5255  case SWIG_PY_POINTER:
5256  obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
5257  break;
5258  case SWIG_PY_BINARY:
5259  obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
5260  break;
5261  default:
5262  obj = 0;
5263  break;
5264  }
5265  if (obj) {
5266  PyDict_SetItemString(d, constants[i].name, obj);
5267  Py_DECREF(obj);
5268  }
5269  }
5270  }
5271 
5272  /* -----------------------------------------------------------------------------*/
5273  /* Fix SwigMethods to carry the callback ptrs when needed */
5274  /* -----------------------------------------------------------------------------*/
5275 
5276  SWIGINTERN void
5277  SWIG_Python_FixMethods(PyMethodDef *methods,
5278  swig_const_info *const_table,
5279  swig_type_info **types,
5280  swig_type_info **types_initial) {
5281  size_t i;
5282  for (i = 0; methods[i].ml_name; ++i) {
5283  const char *c = methods[i].ml_doc;
5284  if (!c) continue;
5285  c = strstr(c, "swig_ptr: ");
5286  if (c) {
5287  int j;
5288  swig_const_info *ci = 0;
5289  const char *name = c + 10;
5290  for (j = 0; const_table[j].type; ++j) {
5291  if (strncmp(const_table[j].name, name,
5292  strlen(const_table[j].name)) == 0) {
5293  ci = &(const_table[j]);
5294  break;
5295  }
5296  }
5297  if (ci) {
5298  void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
5299  if (ptr) {
5300  size_t shift = (ci->ptype) - types;
5301  swig_type_info *ty = types_initial[shift];
5302  size_t ldoc = (c - methods[i].ml_doc);
5303  size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
5304  char *ndoc = (char*)malloc(ldoc + lptr + 10);
5305  if (ndoc) {
5306  char *buff = ndoc;
5307  memcpy(buff, methods[i].ml_doc, ldoc);
5308  buff += ldoc;
5309  memcpy(buff, "swig_ptr: ", 10);
5310  buff += 10;
5311  SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
5312  methods[i].ml_doc = ndoc;
5313  }
5314  }
5315  }
5316  }
5317  }
5318  }
5319 
5320  /* -----------------------------------------------------------------------------
5321  * Method creation and docstring support functions
5322  * ----------------------------------------------------------------------------- */
5323 
5324  /* -----------------------------------------------------------------------------
5325  * Function to find the method definition with the correct docstring for the
5326  * proxy module as opposed to the low-level API
5327  * ----------------------------------------------------------------------------- */
5328 
5329  SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
5330  /* Find the function in the modified method table */
5331  size_t offset = 0;
5332  int found = 0;
5333  while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
5334  if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
5335  found = 1;
5336  break;
5337  }
5338  offset++;
5339  }
5340  /* Use the copy with the modified docstring if available */
5341  return found ? &SwigMethods_proxydocs[offset] : NULL;
5342  }
5343 
5344  /* -----------------------------------------------------------------------------
5345  * Wrapper of PyInstanceMethod_New() used in Python 3
5346  * It is exported to the generated module, used for -fastproxy
5347  * ----------------------------------------------------------------------------- */
5348 
5349  SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
5350  if (PyCFunction_Check(func)) {
5351  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5352  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
5353  if (ml)
5354  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5355  }
5356 #if PY_VERSION_HEX >= 0x03000000
5357  return PyInstanceMethod_New(func);
5358 #else
5359  return PyMethod_New(func, NULL, NULL);
5360 #endif
5361  }
5362 
5363  /* -----------------------------------------------------------------------------
5364  * Wrapper of PyStaticMethod_New()
5365  * It is exported to the generated module, used for -fastproxy
5366  * ----------------------------------------------------------------------------- */
5367 
5368  SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
5369  if (PyCFunction_Check(func)) {
5370  PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
5371  PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
5372  if (ml)
5373  func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
5374  }
5375  return PyStaticMethod_New(func);
5376  }
5377 
5378 #ifdef __cplusplus
5379 }
5380 #endif
5381 
5382 /* -----------------------------------------------------------------------------*
5383  * Partial Init method
5384  * -----------------------------------------------------------------------------*/
5385 
5386 #ifdef __cplusplus
5387 extern "C"
5388 #endif
5389 
5390 SWIGEXPORT
5391 #if PY_VERSION_HEX >= 0x03000000
5392 PyObject*
5393 #else
5394 void
5395 #endif
5396 SWIG_init(void) {
5397  PyObject *m, *d, *md, *globals;
5398 
5399 #if PY_VERSION_HEX >= 0x03000000
5400  static struct PyModuleDef SWIG_module = {
5401  PyModuleDef_HEAD_INIT,
5402  SWIG_name,
5403  NULL,
5404  -1,
5405  SwigMethods,
5406  NULL,
5407  NULL,
5408  NULL,
5409  NULL
5410  };
5411 #endif
5412 
5413 #if defined(SWIGPYTHON_BUILTIN)
5414  static SwigPyClientData SwigPyObject_clientdata = {
5415  0, 0, 0, 0, 0, 0, 0
5416  };
5417  static PyGetSetDef this_getset_def = {
5418  (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
5419  };
5420  static SwigPyGetSet thisown_getset_closure = {
5423  };
5424  static PyGetSetDef thisown_getset_def = {
5425  (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
5426  };
5427  PyTypeObject *builtin_pytype;
5428  int builtin_base_count;
5429  swig_type_info *builtin_basetype;
5430  PyObject *tuple;
5431  PyGetSetDescrObject *static_getset;
5432  PyTypeObject *metatype;
5433  PyTypeObject *swigpyobject;
5434  SwigPyClientData *cd;
5435  PyObject *public_interface, *public_symbol;
5436  PyObject *this_descr;
5437  PyObject *thisown_descr;
5438  PyObject *self = 0;
5439  int i;
5440 
5441  (void)builtin_pytype;
5442  (void)builtin_base_count;
5443  (void)builtin_basetype;
5444  (void)tuple;
5445  (void)static_getset;
5446  (void)self;
5447 
5448  /* Metaclass is used to implement static member variables */
5449  metatype = SwigPyObjectType();
5450  assert(metatype);
5451 #endif
5452 
5453  (void)globals;
5454 
5455  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
5456  SWIG_This();
5459 #ifndef SWIGPYTHON_BUILTIN
5461 #endif
5462 
5463  /* Fix SwigMethods to carry the callback ptrs when needed */
5465 
5466 #if PY_VERSION_HEX >= 0x03000000
5467  m = PyModule_Create(&SWIG_module);
5468 #else
5469  m = Py_InitModule(SWIG_name, SwigMethods);
5470 #endif
5471 
5472  md = d = PyModule_GetDict(m);
5473  (void)md;
5474 
5476 
5477 #ifdef SWIGPYTHON_BUILTIN
5478  swigpyobject = SwigPyObject_TypeOnce();
5479 
5480  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
5481  assert(SwigPyObject_stype);
5482  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
5483  if (!cd) {
5484  SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
5485  SwigPyObject_clientdata.pytype = swigpyobject;
5486  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
5487  PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
5488 # if PY_VERSION_HEX >= 0x03000000
5489  return NULL;
5490 # else
5491  return;
5492 # endif
5493  }
5494 
5495  /* All objects have a 'this' attribute */
5496  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
5497  (void)this_descr;
5498 
5499  /* All objects have a 'thisown' attribute */
5500  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
5501  (void)thisown_descr;
5502 
5503  public_interface = PyList_New(0);
5504  public_symbol = 0;
5505  (void)public_symbol;
5506 
5507  PyDict_SetItemString(md, "__all__", public_interface);
5508  Py_DECREF(public_interface);
5509  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
5510  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
5511  for (i = 0; swig_const_table[i].name != 0; ++i)
5512  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
5513 #endif
5514 
5516 
5517  SWIG_Python_SetConstant(d, "SimpleMaxFlow_OPTIMAL",SWIG_From_int(static_cast< int >(operations_research::SimpleMaxFlow::OPTIMAL)));
5518  SWIG_Python_SetConstant(d, "SimpleMaxFlow_POSSIBLE_OVERFLOW",SWIG_From_int(static_cast< int >(operations_research::SimpleMaxFlow::POSSIBLE_OVERFLOW)));
5519  SWIG_Python_SetConstant(d, "SimpleMaxFlow_BAD_INPUT",SWIG_From_int(static_cast< int >(operations_research::SimpleMaxFlow::BAD_INPUT)));
5520  SWIG_Python_SetConstant(d, "SimpleMaxFlow_BAD_RESULT",SWIG_From_int(static_cast< int >(operations_research::SimpleMaxFlow::BAD_RESULT)));
5521  SWIG_Python_SetConstant(d, "MinCostFlowBase_NOT_SOLVED",SWIG_From_int(static_cast< int >(operations_research::MinCostFlowBase::NOT_SOLVED)));
5522  SWIG_Python_SetConstant(d, "MinCostFlowBase_OPTIMAL",SWIG_From_int(static_cast< int >(operations_research::MinCostFlowBase::OPTIMAL)));
5523  SWIG_Python_SetConstant(d, "MinCostFlowBase_FEASIBLE",SWIG_From_int(static_cast< int >(operations_research::MinCostFlowBase::FEASIBLE)));
5524  SWIG_Python_SetConstant(d, "MinCostFlowBase_INFEASIBLE",SWIG_From_int(static_cast< int >(operations_research::MinCostFlowBase::INFEASIBLE)));
5525  SWIG_Python_SetConstant(d, "MinCostFlowBase_UNBALANCED",SWIG_From_int(static_cast< int >(operations_research::MinCostFlowBase::UNBALANCED)));
5526  SWIG_Python_SetConstant(d, "MinCostFlowBase_BAD_RESULT",SWIG_From_int(static_cast< int >(operations_research::MinCostFlowBase::BAD_RESULT)));
5527  SWIG_Python_SetConstant(d, "MinCostFlowBase_BAD_COST_RANGE",SWIG_From_int(static_cast< int >(operations_research::MinCostFlowBase::BAD_COST_RANGE)));
5528  SWIG_Python_SetConstant(d, "LinearSumAssignment_OPTIMAL",SWIG_From_int(static_cast< int >(operations_research::SimpleLinearSumAssignment::OPTIMAL)));
5529  SWIG_Python_SetConstant(d, "LinearSumAssignment_INFEASIBLE",SWIG_From_int(static_cast< int >(operations_research::SimpleLinearSumAssignment::INFEASIBLE)));
5530  SWIG_Python_SetConstant(d, "LinearSumAssignment_POSSIBLE_OVERFLOW",SWIG_From_int(static_cast< int >(operations_research::SimpleLinearSumAssignment::POSSIBLE_OVERFLOW)));
5531 #if PY_VERSION_HEX >= 0x03000000
5532  return m;
5533 #else
5534  return;
5535 #endif
5536 }
5537 
HandleResult< void >
void HandleResult< void >(PyObject *pyresult)
Definition: graph_python_wrap.cc:2888
SWIG_TypeDynamicCast
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
Definition: graph_python_wrap.cc:508
SWIG_TypePrettyName
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
Definition: graph_python_wrap.cc:531
SWIG_UnpackVoidPtr
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
Definition: graph_python_wrap.cc:711
swig::SwigPtr_PyObject::operator->
PyObject * operator->() const
Definition: graph_python_wrap.cc:2797
SWIG_SystemError
#define SWIG_SystemError
Definition: graph_python_wrap.cc:765
SwigPyClientData::delargs
int delargs
Definition: knapsack_solver_python_wrap.cc:1310
SWIG_Python_GetSwigThis
SWIGRUNTIME SwigPyObject * SWIG_Python_GetSwigThis(PyObject *pyobj)
Definition: graph_python_wrap.cc:2019
operations_research::SimpleMaxFlow::BAD_INPUT
@ BAD_INPUT
Definition: max_flow.h:192
var
IntVar * var
Definition: expr_array.cc:1858
_swigt__p_unsigned_char
static swig_type_info _swigt__p_unsigned_char
Definition: graph_python_wrap.cc:4715
SWIG_PYTHON_THREAD_END_BLOCK
#define SWIG_PYTHON_THREAD_END_BLOCK
Definition: graph_python_wrap.cc:1029
SharedPyPtr::get
PyObject * get() const
Definition: graph_python_wrap.cc:2856
swig_varlink_getattr
SWIGINTERN PyObject * swig_varlink_getattr(swig_varlinkobject *v, char *n)
Definition: graph_python_wrap.cc:5110
_swigt__p_std__vectorT_int_t
static swig_type_info _swigt__p_std__vectorT_int_t
Definition: graph_python_wrap.cc:4714
tail
int64 tail
Definition: routing_flow.cc:127
SWIG_InitializeModule
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
Definition: graph_python_wrap.cc:4847
swig_cast_info::next
struct swig_cast_info * next
Definition: knapsack_solver_python_wrap.cc:380
swig_module_info::size
size_t size
Definition: knapsack_solver_python_wrap.cc:389
SwigPyObject_long
SWIGRUNTIME PyObject * SwigPyObject_long(SwigPyObject *v)
Definition: graph_python_wrap.cc:1417
SWIG_PackVoidPtr
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
Definition: graph_python_wrap.cc:700
_swigt__p_operations_research__MinCostFlowBase
static swig_type_info _swigt__p_operations_research__MinCostFlowBase
Definition: graph_python_wrap.cc:4708
operations_research::SimpleLinearSumAssignment::Solve
Status Solve()
Definition: graph/assignment.cc:52
SWIG_This
SWIGRUNTIME PyObject * SWIG_This(void)
Definition: graph_python_wrap.cc:2004
PyObject_DEL
#define PyObject_DEL
Definition: graph_python_wrap.cc:850
swig_module_info::next
struct swig_module_info * next
Definition: knapsack_solver_python_wrap.cc:390
SwigPyObject_hex
SWIGRUNTIME PyObject * SwigPyObject_hex(SwigPyObject *v)
Definition: graph_python_wrap.cc:1451
SwigPyPacked_New
SWIGRUNTIME PyObject * SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
Definition: graph_python_wrap.cc:1966
_wrap_SimpleMaxFlow_AddArcWithCapacity
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_AddArcWithCapacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3104
if
if(!yyg->yy_init)
Definition: parser.yy.cc:965
SwigPyClientData_Del
SWIGRUNTIME void SwigPyClientData_Del(SwigPyClientData *data)
Definition: graph_python_wrap.cc:1380
min
int64 min
Definition: alldiff_cst.cc:138
_swigt__p_unsigned_long
static swig_type_info _swigt__p_unsigned_long
Definition: graph_python_wrap.cc:4717
SWIG_TypeQueryModule
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
Definition: graph_python_wrap.cc:627
operations_research::MinCostFlowBase
Definition: min_cost_flow.h:192
SWIGRUNTIME
#define SWIGRUNTIME
Definition: graph_python_wrap.cc:211
swig_cast_info::type
swig_type_info * type
Definition: knapsack_solver_python_wrap.cc:378
operations_research::SimpleMaxFlow::OPTIMAL
@ OPTIMAL
Definition: max_flow.h:183
swig_const_info::dvalue
double dvalue
Definition: knapsack_solver_python_wrap.cc:1055
SWIG_AsVal_int
SWIGINTERN int SWIG_AsVal_int(PyObject *obj, int *val)
Definition: graph_python_wrap.cc:3057
_wrap_new_SimpleMinCostFlow
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow(PyObject *self, PyObject *args)
Definition: graph_python_wrap.cc:3616
swig_module
static swig_module_info swig_module
Definition: graph_python_wrap.cc:2715
SWIG_PackData
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
Definition: graph_python_wrap.cc:656
SWIG_Python_NewPointerObj
SWIGRUNTIME PyObject * SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags)
Definition: graph_python_wrap.cc:2350
max
int64 max
Definition: alldiff_cst.cc:139
SWIG_TYPE_TABLE_NAME
#define SWIG_TYPE_TABLE_NAME
Definition: graph_python_wrap.cc:198
_swigc__p_ZVectorT_int_t
static swig_cast_info _swigc__p_ZVectorT_int_t[]
Definition: graph_python_wrap.cc:4742
_wrap_SimpleMaxFlow_Solve
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3286
_wrap_SimpleMinCostFlow_UnitCost
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_UnitCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4043
SWIG_AddNewMask
#define SWIG_AddNewMask(r)
Definition: graph_python_wrap.cc:328
SWIG_From_int
SWIGINTERNINLINE PyObject * SWIG_From_int(int value)
Definition: graph_python_wrap.cc:3073
SwigPyPacked_compare
SWIGRUNTIME int SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
Definition: graph_python_wrap.cc:1845
SwigPyObject_acquire
SWIGINTERN PyObject * SwigPyObject_acquire(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: graph_python_wrap.cc:1627
SwigPyPacked
Definition: knapsack_solver_python_wrap.cc:1815
SWIG_TypeName
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
Definition: graph_python_wrap.cc:522
operations_research::NodeIndex
int32 NodeIndex
Definition: ebert_graph.h:192
SWIG_as_voidptr
#define SWIG_as_voidptr(a)
Definition: graph_python_wrap.cc:2742
SWIG_POINTER_NEW
#define SWIG_POINTER_NEW
Definition: graph_python_wrap.cc:1282
_swigt__p_int
static swig_type_info _swigt__p_int
Definition: graph_python_wrap.cc:4703
swig::SwigPtr_PyObject
Definition: knapsack_solver_python_wrap.cc:2741
_wrap_LinearSumAssignment_NumArcs
SWIGINTERN PyObject * _wrap_LinearSumAssignment_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4188
_wrap_SimpleMinCostFlow_Supply
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Supply(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4013
SWIG_NewPackedObj
#define SWIG_NewPackedObj(ptr, sz, type)
Definition: graph_python_wrap.cc:1103
SWIG_Python_TypeQuery
SWIGRUNTIME swig_type_info * SWIG_Python_TypeQuery(const char *type)
Definition: graph_python_wrap.cc:2476
operations_research::SimpleMinCostFlow::SolveMaxFlowWithMinCost
Status SolveMaxFlowWithMinCost()
Definition: min_cost_flow.h:252
swig_module_info
Definition: knapsack_solver_python_wrap.cc:387
SwigPyObject_GetDesc
SWIGRUNTIMEINLINE const char * SwigPyObject_GetDesc(PyObject *self)
Definition: graph_python_wrap.cc:2546
message
std::string message
Definition: trace.cc:395
_swigc__p_operations_research__ForwardEbertGraphT_int_int_t
static swig_cast_info _swigc__p_operations_research__ForwardEbertGraphT_int_int_t[]
Definition: graph_python_wrap.cc:4748
SWIGTYPE_p_operations_research__SimpleMaxFlow
#define SWIGTYPE_p_operations_research__SimpleMaxFlow
Definition: graph_python_wrap.cc:2705
SWIG_Python_ErrorType
SWIGRUNTIME PyObject * SWIG_Python_ErrorType(int code)
Definition: graph_python_wrap.cc:869
swig_const_info::lvalue
long lvalue
Definition: knapsack_solver_python_wrap.cc:1054
swig::SwigPtr_PyObject::_obj
PyObject * _obj
Definition: knapsack_solver_python_wrap.cc:2743
swig_converter_func
void *(* swig_converter_func)(void *, int *)
Definition: graph_python_wrap.cc:363
_swigt__p_operations_research__EbertGraphT_int_int_t
static swig_type_info _swigt__p_operations_research__EbertGraphT_int_int_t
Definition: graph_python_wrap.cc:4705
_wrap_LinearSumAssignment_AddArcWithCost
SWIGINTERN PyObject * _wrap_LinearSumAssignment_AddArcWithCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4119
SWIG_Python_ConvertPacked
SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty)
Definition: graph_python_wrap.cc:2234
SimpleMaxFlow_swiginit
SWIGINTERN PyObject * SimpleMaxFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3503
SWIG_TypeCast
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
Definition: graph_python_wrap.cc:500
SwigPyPacked::ty
swig_type_info * ty
Definition: knapsack_solver_python_wrap.cc:1818
SWIG_ArgError
#define SWIG_ArgError(r)
Definition: graph_python_wrap.cc:314
swig_globalvar
Definition: knapsack_solver_python_wrap.cc:3825
SWIG_OverflowError
#define SWIG_OverflowError
Definition: graph_python_wrap.cc:762
_swigt__p_operations_research__SimpleLinearSumAssignment
static swig_type_info _swigt__p_operations_research__SimpleLinearSumAssignment
Definition: graph_python_wrap.cc:4709
SimpleMinCostFlow_swigregister
SWIGINTERN PyObject * SimpleMinCostFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4095
swig_type_info::clientdata
void * clientdata
Definition: knapsack_solver_python_wrap.cc:372
SWIG_Python_ExceptionType
SWIGRUNTIMEINLINE PyObject * SWIG_Python_ExceptionType(swig_type_info *desc)
Definition: graph_python_wrap.cc:1326
SwigPyClientData_New
SWIGRUNTIME SwigPyClientData * SwigPyClientData_New(PyObject *obj)
Definition: graph_python_wrap.cc:1334
SWIG_Python_SetConstant
SWIGINTERN void SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj)
Definition: graph_python_wrap.cc:1174
SWIG_InstallConstants
#define SWIG_InstallConstants(d, constants)
Definition: graph_python_wrap.cc:5033
value
int64 value
Definition: demon_profiler.cc:43
_swigc__p_operations_research__SimpleLinearSumAssignment
static swig_cast_info _swigc__p_operations_research__SimpleLinearSumAssignment[]
Definition: graph_python_wrap.cc:4751
_wrap_SimpleMaxFlow_Tail
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Tail(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3196
SWIG_POINTER_NOSHADOW
#define SWIG_POINTER_NOSHADOW
Definition: graph_python_wrap.cc:1281
SWIG_POINTER_IMPLICIT_CONV
#define SWIG_POINTER_IMPLICIT_CONV
Definition: graph_python_wrap.cc:1284
SwigPyPacked_type
SWIGRUNTIME PyTypeObject * SwigPyPacked_type(void)
Definition: graph_python_wrap.cc:1856
SWIG_Python_SetErrorObj
SWIGINTERN void SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj)
Definition: graph_python_wrap.cc:1136
SWIG_name
#define SWIG_name
Definition: graph_python_wrap.cc:2736
operations_research::MinCostFlowBase::UNBALANCED
@ UNBALANCED
Definition: min_cost_flow.h:199
_swigc__p_int
static swig_cast_info _swigc__p_int[]
Definition: graph_python_wrap.cc:4745
swig::SwigPtr_PyObject::SwigPtr_PyObject
SwigPtr_PyObject()
Definition: graph_python_wrap.cc:2755
swig::SwigPtr_PyObject::~SwigPtr_PyObject
~SwigPtr_PyObject()
Definition: graph_python_wrap.cc:2785
HandleResult
static ReturnT HandleResult(PyObject *pyresult)
Definition: graph_python_wrap.cc:2866
swig_varlinkobject
Definition: knapsack_solver_python_wrap.cc:3832
Swig_This_global
static PyObject * Swig_This_global
Definition: graph_python_wrap.cc:2001
SwigPyObject_next
SWIGRUNTIME PyObject * SwigPyObject_next(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: graph_python_wrap.cc:1607
swig_varlink_str
SWIGINTERN PyObject * swig_varlink_str(swig_varlinkobject *v)
Definition: graph_python_wrap.cc:5061
_wrap_LinearSumAssignment_RightMate
SWIGINTERN PyObject * _wrap_LinearSumAssignment_RightMate(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4347
SWIG_STATIC_POINTER
#define SWIG_STATIC_POINTER(var)
Definition: graph_python_wrap.cc:1273
SwigPyObject_dealloc
SWIGRUNTIME void SwigPyObject_dealloc(PyObject *v)
Definition: graph_python_wrap.cc:1543
SWIG_BUFFER_SIZE
#define SWIG_BUFFER_SIZE
Definition: graph_python_wrap.cc:220
SWIG_Python_InstallConstants
SWIGINTERN void SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[])
Definition: graph_python_wrap.cc:5250
SWIG_TypeClientData
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
Definition: graph_python_wrap.cc:552
SWIG_Python_SetSwigThis
SWIGRUNTIME int SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
Definition: graph_python_wrap.cc:2313
SwigPyObject_Check
SWIGRUNTIMEINLINE int SwigPyObject_Check(PyObject *op)
Definition: graph_python_wrap.cc:1527
SWIG_ERROR
#define SWIG_ERROR
Definition: graph_python_wrap.cc:312
_wrap_SimpleMinCostFlow_NumArcs
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3900
swig_module_info::cast_initial
swig_cast_info ** cast_initial
Definition: knapsack_solver_python_wrap.cc:392
_swigc__p_short
static swig_cast_info _swigc__p_short[]
Definition: graph_python_wrap.cc:4754
SWIG_exception_fail
#define SWIG_exception_fail(code, msg)
Definition: graph_python_wrap.cc:2669
swig_cast_initial
static swig_cast_info * swig_cast_initial[]
Definition: graph_python_wrap.cc:4762
malloc
void * malloc(YYSIZE_T)
operations_research::SimpleMinCostFlow::Solve
Status Solve()
Definition: min_cost_flow.h:243
_swigc__p_operations_research__SimpleMinCostFlow
static swig_cast_info _swigc__p_operations_research__SimpleMinCostFlow[]
Definition: graph_python_wrap.cc:4753
SWIG_NullReferenceError
#define SWIG_NullReferenceError
Definition: graph_python_wrap.cc:768
int64
int64_t int64
Definition: integral_types.h:34
swig_module_info::type_initial
swig_type_info ** type_initial
Definition: knapsack_solver_python_wrap.cc:391
_wrap_new_SimpleMinCostFlow__SWIG_1
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: graph_python_wrap.cc:3582
SWIG_Python_GetModule
SWIGRUNTIME swig_module_info * SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata))
Definition: graph_python_wrap.cc:2417
_wrap_SimpleMaxFlow_Flow
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Flow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3347
SWIG_POINTER_OWN
#define SWIG_POINTER_OWN
Definition: graph_python_wrap.cc:229
operations_research::SimpleMaxFlow::POSSIBLE_OVERFLOW
@ POSSIBLE_OVERFLOW
Definition: max_flow.h:190
_wrap_SimpleMaxFlow_Capacity
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3256
_p_operations_research__SimpleMinCostFlowTo_p_operations_research__MinCostFlowBase
static void * _p_operations_research__SimpleMinCostFlowTo_p_operations_research__MinCostFlowBase(void *x, int *SWIGUNUSEDPARM(newmemory))
Definition: graph_python_wrap.cc:4697
_wrap_SimpleMinCostFlow_NumNodes
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3877
_wrap_SimpleMaxFlow_NumArcs
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_NumArcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3173
SWIG_CanCastAsInteger
SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max)
Definition: graph_python_wrap.cc:2984
shortestpaths.h
index
int index
Definition: pack.cc:508
SWIG_Python_ArgFail
SWIGRUNTIME int SWIG_Python_ArgFail(int argnum)
Definition: graph_python_wrap.cc:2533
_wrap_delete_MinCostFlowBase
SWIGINTERN PyObject * _wrap_delete_MinCostFlowBase(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3520
swig::SwigPtr_PyObject::operator=
SwigPtr_PyObject & operator=(const SwigPtr_PyObject &item)
Definition: graph_python_wrap.cc:2775
SWIG_Python_addvarlink
SWIGINTERN void SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int(*set_attr)(PyObject *p))
Definition: graph_python_wrap.cc:5219
SWIG_Python_TypeError
SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject *obj)
Definition: graph_python_wrap.cc:2554
_wrap_LinearSumAssignment_Cost
SWIGINTERN PyObject * _wrap_LinearSumAssignment_Cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4271
SWIG_AttributeError
#define SWIG_AttributeError
Definition: graph_python_wrap.cc:766
SwigPyClientData::implicitconv
int implicitconv
Definition: knapsack_solver_python_wrap.cc:1311
SwigPyObject_TypeOnce
SWIGRUNTIME PyTypeObject * SwigPyObject_TypeOnce(void)
Definition: graph_python_wrap.cc:1666
SwigPyPacked_UnpackData
SWIGRUNTIME swig_type_info * SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
Definition: graph_python_wrap.cc:1985
_swigt__p_operations_research__SimpleMaxFlow
static swig_type_info _swigt__p_operations_research__SimpleMaxFlow
Definition: graph_python_wrap.cc:4710
swig_cast_info
Definition: knapsack_solver_python_wrap.cc:377
swig_globalvar::name
char * name
Definition: knapsack_solver_python_wrap.cc:3826
swig_cast_info::prev
struct swig_cast_info * prev
Definition: knapsack_solver_python_wrap.cc:381
SwigPyObject_oct
SWIGRUNTIME PyObject * SwigPyObject_oct(SwigPyObject *v)
Definition: graph_python_wrap.cc:1445
swig::SwigVar_PyObject
Definition: knapsack_solver_python_wrap.cc:2797
SwigPyClientData::pytype
PyTypeObject * pytype
Definition: knapsack_solver_python_wrap.cc:1312
SWIG_Python_RaiseOrModifyTypeError
SWIGRUNTIME void SWIG_Python_RaiseOrModifyTypeError(const char *message)
Definition: graph_python_wrap.cc:949
SwigPyObject::ty
swig_type_info * ty
Definition: knapsack_solver_python_wrap.cc:1391
operations_research::MinCostFlowBase::OPTIMAL
@ OPTIMAL
Definition: min_cost_flow.h:196
swig_const_info::ptype
swig_type_info ** ptype
Definition: knapsack_solver_python_wrap.cc:1057
SWIG_Python_CheckNoKeywords
SWIGINTERN int SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name)
Definition: graph_python_wrap.cc:1251
_wrap_LinearSumAssignment_Solve
SWIGINTERN PyObject * _wrap_LinearSumAssignment_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4301
SWIG_PyStaticMethod_New
SWIGINTERN PyObject * SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
Definition: graph_python_wrap.cc:5368
_swigc__p_operations_research__EbertGraphT_int_int_t
static swig_cast_info _swigc__p_operations_research__EbertGraphT_int_int_t[]
Definition: graph_python_wrap.cc:4747
SWIG_TypeError
#define SWIG_TypeError
Definition: graph_python_wrap.cc:760
SWIG_Python_SetModule
SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module)
Definition: graph_python_wrap.cc:2452
swig_const_info
Definition: knapsack_solver_python_wrap.cc:1051
SWIG_MangledTypeQuery
#define SWIG_MangledTypeQuery(name)
Definition: graph_python_wrap.cc:2717
operations_research::SimpleMaxFlow
Definition: max_flow.h:152
_wrap_AStarShortestPath
SWIGINTERN PyObject * _wrap_AStarShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4562
assignment.h
operations_research::MinCostFlowBase::INFEASIBLE
@ INFEASIBLE
Definition: min_cost_flow.h:198
min_cost_flow.h
SWIG_CheckState
#define SWIG_CheckState(r)
Definition: graph_python_wrap.cc:353
SWIG_MangledTypeQueryModule
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
Definition: graph_python_wrap.cc:582
SharedPyPtr::SharedPyPtr
SharedPyPtr(const SharedPyPtr &other)
Definition: graph_python_wrap.cc:2852
SWIG_From_bool
SWIGINTERNINLINE PyObject * SWIG_From_bool(bool value)
Definition: graph_python_wrap.cc:3083
operations_research::SimpleMinCostFlow
Definition: min_cost_flow.h:213
_swigt__p_operations_research__ForwardEbertGraphT_int_int_t
static swig_type_info _swigt__p_operations_research__ForwardEbertGraphT_int_int_t
Definition: graph_python_wrap.cc:4706
swig_cast_info
struct swig_cast_info swig_cast_info
_wrap_SimpleMaxFlow_SetArcCapacity
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_SetArcCapacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3437
SWIG_Python_NewShadowInstance
SWIGRUNTIME PyObject * SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
Definition: graph_python_wrap.cc:2257
SwigPyObject_type
SWIGRUNTIME PyTypeObject * SwigPyObject_type(void)
Definition: graph_python_wrap.cc:1520
swig_const_table
static swig_const_info swig_const_table[]
Definition: graph_python_wrap.cc:4787
_wrap_delete_SimpleMaxFlow
SWIGINTERN PyObject * _wrap_delete_SimpleMaxFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3474
SwigPyPacked::pack
PyObject_HEAD void * pack
Definition: knapsack_solver_python_wrap.cc:1817
_wrap_SimpleMaxFlow_NumNodes
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3150
SWIG_IOError
#define SWIG_IOError
Definition: graph_python_wrap.cc:757
SwigPyPacked_dealloc
SWIGRUNTIME void SwigPyPacked_dealloc(PyObject *v)
Definition: graph_python_wrap.cc:1868
_swigc__p_operations_research__MinCostFlowBase
static swig_cast_info _swigc__p_operations_research__MinCostFlowBase[]
Definition: graph_python_wrap.cc:4750
_wrap_SimpleMinCostFlow_MaximumFlow
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_MaximumFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3824
SwigPyObject_compare
SWIGRUNTIME int SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
Definition: graph_python_wrap.cc:1484
SWIG_PY_POINTER
#define SWIG_PY_POINTER
Definition: graph_python_wrap.cc:1047
_swigt__p_signed_char
static swig_type_info _swigt__p_signed_char
Definition: graph_python_wrap.cc:4713
swig_const_info::pvalue
void * pvalue
Definition: knapsack_solver_python_wrap.cc:1056
SWIG_NewClientData
#define SWIG_NewClientData(obj)
Definition: graph_python_wrap.cc:1122
_swigc__p_operations_research__ForwardStaticGraphT_int_int_t
static swig_cast_info _swigc__p_operations_research__ForwardStaticGraphT_int_int_t[]
Definition: graph_python_wrap.cc:4749
_wrap_new_SimpleMaxFlow
SWIGINTERN PyObject * _wrap_new_SimpleMaxFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3091
SwigPyPacked_repr
SWIGRUNTIME PyObject * SwigPyPacked_repr(SwigPyPacked *v)
Definition: graph_python_wrap.cc:1823
operations_research::FlowQuantity
int64 FlowQuantity
Definition: ebert_graph.h:202
SwigMethods
static PyMethodDef SwigMethods[]
Definition: graph_python_wrap.cc:4630
_swigc__p_unsigned_int
static swig_cast_info _swigc__p_unsigned_int[]
Definition: graph_python_wrap.cc:4758
_wrap_SimpleMinCostFlow_SetNodeSupply
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_SetNodeSupply(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3718
operations_research::CostValue
int64 CostValue
Definition: ebert_graph.h:203
_wrap_DijkstraShortestPath
SWIGINTERN PyObject * _wrap_DijkstraShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4440
_wrap_SimpleMinCostFlow_Capacity
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3983
swig_globalvar
struct swig_globalvar swig_globalvar
SimpleMinCostFlow_swiginit
SWIGINTERN PyObject * SimpleMinCostFlow_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4102
operations_research::MinCostFlowBase::BAD_RESULT
@ BAD_RESULT
Definition: min_cost_flow.h:200
_wrap_SimpleMinCostFlow_AddArcWithCapacityAndUnitCost
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_AddArcWithCapacityAndUnitCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3664
free
void free(void *)
SharedPyPtr::SharedPyPtr
SharedPyPtr(PyObject *obj)
Definition: graph_python_wrap.cc:2851
swig_const_info::name
const char * name
Definition: knapsack_solver_python_wrap.cc:1053
SharedPyPtr
Definition: constraint_solver_python_wrap.cc:3345
swig_varlink_setattr
SWIGINTERN int swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
Definition: graph_python_wrap.cc:5127
SwigPyPacked::size
size_t size
Definition: knapsack_solver_python_wrap.cc:1819
SwigPyObject
Definition: knapsack_solver_python_wrap.cc:1388
swig::SwigVar_PyObject::operator=
SwigVar_PyObject & operator=(PyObject *obj)
Definition: knapsack_solver_python_wrap.cc:2800
SwigPyObject::own
int own
Definition: knapsack_solver_python_wrap.cc:1392
SwigPyObject_repr2
SWIGRUNTIME PyObject * SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: graph_python_wrap.cc:1478
LinearSumAssignment_swiginit
SWIGINTERN PyObject * LinearSumAssignment_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4436
SWIG_Python_UnpackTuple
SWIGINTERN Py_ssize_t SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
Definition: graph_python_wrap.cc:1205
_swigc__p_unsigned_short
static swig_cast_info _swigc__p_unsigned_short[]
Definition: graph_python_wrap.cc:4760
SWIG_Python_TypeErrorOccurred
SWIGRUNTIME int SWIG_Python_TypeErrorOccurred(PyObject *obj)
Definition: graph_python_wrap.cc:939
SWIG_Python_ConvertPtr
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)
Definition: graph_python_wrap.cc:1085
_swigt__p_ZVectorT_long_t
static swig_type_info _swigt__p_ZVectorT_long_t
Definition: graph_python_wrap.cc:4701
SimpleMaxFlow_swigregister
SWIGINTERN PyObject * SimpleMaxFlow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3496
swig_varlink_dealloc
SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject *v)
Definition: graph_python_wrap.cc:5099
swig_module_info::types
swig_type_info ** types
Definition: knapsack_solver_python_wrap.cc:388
swig_type_initial
static swig_type_info * swig_type_initial[]
Definition: graph_python_wrap.cc:4720
SWIG_IndexError
#define SWIG_IndexError
Definition: graph_python_wrap.cc:759
swig_type_info::name
const char * name
Definition: knapsack_solver_python_wrap.cc:368
SwigPyClientData
Definition: knapsack_solver_python_wrap.cc:1305
SWIG_RuntimeError
#define SWIG_RuntimeError
Definition: graph_python_wrap.cc:758
SWIG_MemoryError
#define SWIG_MemoryError
Definition: graph_python_wrap.cc:767
SWIG_TypeNameComp
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
Definition: graph_python_wrap.cc:404
SWIGTYPE_p_operations_research__SimpleLinearSumAssignment
#define SWIGTYPE_p_operations_research__SimpleLinearSumAssignment
Definition: graph_python_wrap.cc:2704
operations_research::SimpleLinearSumAssignment::OPTIMAL
@ OPTIMAL
Definition: assignment.h:89
basictypes.h
SWIG_Python_InitShadowInstance
SWIGINTERN PyObject * SWIG_Python_InitShadowInstance(PyObject *args)
Definition: graph_python_wrap.cc:2331
SwigPyObject::ptr
PyObject_HEAD void * ptr
Definition: knapsack_solver_python_wrap.cc:1390
SWIG_Python_AddErrorMsg
SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg)
Definition: graph_python_wrap.cc:913
_swigc__p_unsigned_long
static swig_cast_info _swigc__p_unsigned_long[]
Definition: graph_python_wrap.cc:4759
SwigPyObject_disown
SWIGINTERN PyObject * SwigPyObject_disown(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
Definition: graph_python_wrap.cc:1619
_wrap_LinearSumAssignment_OptimalCost
SWIGINTERN PyObject * _wrap_LinearSumAssignment_OptimalCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4324
operations_research::SimpleLinearSumAssignment::INFEASIBLE
@ INFEASIBLE
Definition: assignment.h:90
_wrap_LinearSumAssignment_RightNode
SWIGINTERN PyObject * _wrap_LinearSumAssignment_RightNode(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4241
SWIG_TypeNewClientData
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
Definition: graph_python_wrap.cc:568
swig_type_info::dcast
swig_dycast_func dcast
Definition: knapsack_solver_python_wrap.cc:370
SWIG_DivisionByZero
#define SWIG_DivisionByZero
Definition: graph_python_wrap.cc:761
SWIGPY_CAPSULE_NAME
#define SWIGPY_CAPSULE_NAME
Definition: graph_python_wrap.cc:856
_wrap_SimpleMinCostFlow_Head
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Head(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3953
operations_research::ArcIndex
int32 ArcIndex
Definition: ebert_graph.h:201
InvokePythonCallableReturning
static ReturnT InvokePythonCallableReturning(PyObject *pyfunc, const char *format, Args... args)
Definition: graph_python_wrap.cc:2900
swig_module_info::clientdata
void * clientdata
Definition: knapsack_solver_python_wrap.cc:393
SWIG_Python_TypeCache
SWIGRUNTIME PyObject * SWIG_Python_TypeCache(void)
Definition: graph_python_wrap.cc:2470
SWIG_SyntaxError
#define SWIG_SyntaxError
Definition: graph_python_wrap.cc:763
operations_research::DijkstraShortestPath
bool DijkstraShortestPath(int node_count, int start_node, int end_node, std::function< int64(int, int)> graph, int64 disconnected_distance, std::vector< int > *nodes)
Definition: dijkstra.cc:147
swig
Definition: knapsack_solver_python_wrap.cc:2740
SWIGINTERN
#define SWIGINTERN
Definition: graph_python_wrap.cc:100
SWIG_Python_FixMethods
SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef *methods, swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial)
Definition: graph_python_wrap.cc:5277
SwigMethods_proxydocs
static PyMethodDef SwigMethods_proxydocs[]
Definition: graph_python_wrap.cc:4690
operations_research::MinCostFlowBase::NOT_SOLVED
@ NOT_SOLVED
Definition: min_cost_flow.h:195
swig_type_info::owndata
int owndata
Definition: knapsack_solver_python_wrap.cc:373
SwigPyClientData::klass
PyObject * klass
Definition: knapsack_solver_python_wrap.cc:1306
SWIG_Python_str_AsChar
SWIGINTERN char * SWIG_Python_str_AsChar(PyObject *str)
Definition: graph_python_wrap.cc:809
swig::SwigVar_PyObject::SwigVar_PyObject
SwigVar_PyObject(PyObject *obj=0)
Definition: graph_python_wrap.cc:2807
SwigPyClientData::destroy
PyObject * destroy
Definition: knapsack_solver_python_wrap.cc:1309
SWIG_Python_MustGetPtr
SWIGRUNTIME void * SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags)
Definition: graph_python_wrap.cc:2593
_wrap_SimpleMinCostFlow_SolveMaxFlowWithMinCost
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_SolveMaxFlowWithMinCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3778
SWIG_PY_BINARY
#define SWIG_PY_BINARY
Definition: graph_python_wrap.cc:1048
SWIG_POINTER_NO_NULL
#define SWIG_POINTER_NO_NULL
Definition: graph_python_wrap.cc:226
_wrap_SimpleMinCostFlow_OptimalCost
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_OptimalCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3801
max_flow.h
SWIG_Python_ConvertFunctionPtr
SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty)
Definition: graph_python_wrap.cc:2205
SWIGTYPE_p_operations_research__SimpleMinCostFlow
#define SWIGTYPE_p_operations_research__SimpleMinCostFlow
Definition: graph_python_wrap.cc:2706
swig_type_info
struct swig_type_info swig_type_info
SWIG_AsVal_double
SWIGINTERN int SWIG_AsVal_double(PyObject *obj, double *val)
Definition: graph_python_wrap.cc:2932
operations_research::MinCostFlowBase::Status
Status
Definition: min_cost_flow.h:194
LinearSumAssignment_swigregister
SWIGINTERN PyObject * LinearSumAssignment_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4429
operations_research::SimpleLinearSumAssignment
Definition: assignment.h:57
SWIG_Python_SetErrorMsg
SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg)
Definition: graph_python_wrap.cc:1144
swig_module_info
struct swig_module_info swig_module_info
SWIG_Python_CallFunctor
#define SWIG_Python_CallFunctor(functor, obj)
Definition: graph_python_wrap.cc:1264
SWIG_Python_DestroyModule
SWIGRUNTIME void SWIG_Python_DestroyModule(PyObject *obj)
Definition: graph_python_wrap.cc:2435
SWIG_BUILTIN_TP_INIT
#define SWIG_BUILTIN_TP_INIT
Definition: graph_python_wrap.cc:1286
swig_const_info
struct swig_const_info swig_const_info
operations_research::SimpleLinearSumAssignment::Status
Status
Definition: assignment.h:88
_swigc__p_std__vectorT_int_t
static swig_cast_info _swigc__p_std__vectorT_int_t[]
Definition: graph_python_wrap.cc:4756
SwigPyClientData::newargs
PyObject * newargs
Definition: knapsack_solver_python_wrap.cc:1308
_swigt__p_operations_research__SimpleMinCostFlow
static swig_type_info _swigt__p_operations_research__SimpleMinCostFlow
Definition: graph_python_wrap.cc:4711
SWIG_TypeEquiv
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
Definition: graph_python_wrap.cc:438
swig_type_info::str
const char * str
Definition: knapsack_solver_python_wrap.cc:369
_wrap_new_SimpleMinCostFlow__SWIG_2
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **SWIGUNUSEDPARM(swig_obj))
Definition: graph_python_wrap.cc:3603
SWIG_AddCast
#define SWIG_AddCast(r)
Definition: graph_python_wrap.cc:352
operations_research::BellmanFordShortestPath
bool BellmanFordShortestPath(int node_count, int start_node, int end_node, std::function< int64(int, int)> graph, int64 disconnected_distance, std::vector< int > *nodes)
Definition: bellman_ford.cc:112
swig_const_info::type
int type
Definition: knapsack_solver_python_wrap.cc:1052
_swigt__p_char
static swig_type_info _swigt__p_char
Definition: graph_python_wrap.cc:4702
_swigt__p_ZVectorT_int_t
static swig_type_info _swigt__p_ZVectorT_int_t
Definition: graph_python_wrap.cc:4700
_wrap_BellmanFordShortestPath
SWIGINTERN PyObject * _wrap_BellmanFordShortestPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4501
input
static int input(yyscan_t yyscanner)
SwigPyObject_format
SWIGRUNTIME PyObject * SwigPyObject_format(const char *fmt, SwigPyObject *v)
Definition: graph_python_wrap.cc:1423
SwigPyObject_own
SWIGINTERN PyObject * SwigPyObject_own(PyObject *v, PyObject *args)
Definition: graph_python_wrap.cc:1635
MinCostFlowBase_swigregister
SWIGINTERN PyObject * MinCostFlowBase_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3542
SWIG_PythonGetProxyDoc
SWIGINTERN PyMethodDef * SWIG_PythonGetProxyDoc(const char *name)
Definition: graph_python_wrap.cc:5329
_swigc__p_long
static swig_cast_info _swigc__p_long[]
Definition: graph_python_wrap.cc:4746
_wrap_SimpleMinCostFlow_Tail
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Tail(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3923
_swigt__p_long
static swig_type_info _swigt__p_long
Definition: graph_python_wrap.cc:4704
SWIG_ValueError
#define SWIG_ValueError
Definition: graph_python_wrap.cc:764
SwigPyObject::next
PyObject * next
Definition: knapsack_solver_python_wrap.cc:1393
SWIG_POINTER_DISOWN
#define SWIG_POINTER_DISOWN
Definition: graph_python_wrap.cc:224
operations_research::AStarShortestPath
bool AStarShortestPath(int node_count, int start_node, int end_node, std::function< int64(int, int)> graph, std::function< int64(int)> heuristic, int64 disconnected_distance, std::vector< int > *nodes)
Definition: astar.cc:170
SWIG_NewPointerObj
#define SWIG_NewPointerObj(ptr, type, flags)
Definition: graph_python_wrap.cc:1092
swig_globalvar::get_attr
PyObject *(* get_attr)(void)
Definition: knapsack_solver_python_wrap.cc:3827
SwigPyPacked_str
SWIGRUNTIME PyObject * SwigPyPacked_str(SwigPyPacked *v)
Definition: graph_python_wrap.cc:1834
SWIG_init
#define SWIG_init
Definition: graph_python_wrap.cc:2733
operations_research::MinCostFlowBase::FEASIBLE
@ FEASIBLE
Definition: min_cost_flow.h:197
_wrap_new_LinearSumAssignment
SWIGINTERN PyObject * _wrap_new_LinearSumAssignment(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4106
_swigt__p_unsigned_int
static swig_type_info _swigt__p_unsigned_int
Definition: graph_python_wrap.cc:4716
SWIG_PYTHON_THREAD_BEGIN_BLOCK
#define SWIG_PYTHON_THREAD_BEGIN_BLOCK
Definition: graph_python_wrap.cc:1028
SwigPyObject_New
SWIGRUNTIME PyObject * SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
Definition: graph_python_wrap.cc:1799
SWIG_OK
#define SWIG_OK
Definition: graph_python_wrap.cc:311
swig_varlink_type
SWIGINTERN PyTypeObject * swig_varlink_type(void)
Definition: graph_python_wrap.cc:5144
SwigPyObject_repr
SWIGRUNTIME PyObject * SwigPyObject_repr(SwigPyObject *v)
Definition: graph_python_wrap.cc:1457
_swigc__p_char
static swig_cast_info _swigc__p_char[]
Definition: graph_python_wrap.cc:4744
swig_globalvar::set_attr
int(* set_attr)(PyObject *)
Definition: knapsack_solver_python_wrap.cc:3828
SWIG_Python_AddErrMesg
SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront)
Definition: graph_python_wrap.cc:2505
_wrap_SimpleMaxFlow_OptimalFlow
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_OptimalFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3324
SWIG_PyInstanceMethod_New
SWIGINTERN PyObject * SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
Definition: graph_python_wrap.cc:5349
_wrap_new_MinCostFlowBase
SWIGINTERN PyObject * _wrap_new_MinCostFlowBase(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3507
SwigPyPacked_TypeOnce
SWIGRUNTIME PyTypeObject * SwigPyPacked_TypeOnce(void)
Definition: graph_python_wrap.cc:1878
_swigt__p_operations_research__ForwardStaticGraphT_int_int_t
static swig_type_info _swigt__p_operations_research__ForwardStaticGraphT_int_int_t
Definition: graph_python_wrap.cc:4707
_wrap_LinearSumAssignment_AssignmentCost
SWIGINTERN PyObject * _wrap_LinearSumAssignment_AssignmentCost(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4377
SWIG_GetModule
#define SWIG_GetModule(clientdata)
Definition: graph_python_wrap.cc:1120
SWIG_CAST_NEW_MEMORY
#define SWIG_CAST_NEW_MEMORY
Definition: graph_python_wrap.cc:225
_swigc__p_unsigned_char
static swig_cast_info _swigc__p_unsigned_char[]
Definition: graph_python_wrap.cc:4757
SWIG_fail
#define SWIG_fail
Definition: graph_python_wrap.cc:1128
SWIG_Python_NewPackedObj
SWIGRUNTIMEINLINE PyObject * SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type)
Definition: graph_python_wrap.cc:2404
operations_research::SimpleMaxFlow::Status
Status
Definition: max_flow.h:180
SWIG_InternalNewPointerObj
#define SWIG_InternalNewPointerObj(ptr, type, flags)
Definition: graph_python_wrap.cc:1095
_wrap_new_SimpleMinCostFlow__SWIG_0
SWIGINTERN PyObject * _wrap_new_SimpleMinCostFlow__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj)
Definition: graph_python_wrap.cc:3553
SWIG_Python_AcquirePtr
SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject *obj, int own)
Definition: graph_python_wrap.cc:2085
SwigPyObject_append
SWIGRUNTIME PyObject * SwigPyObject_append(PyObject *v, PyObject *next)
Definition: graph_python_wrap.cc:1594
SWIG_UnpackData
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
Definition: graph_python_wrap.cc:672
_swigt__p_short
static swig_type_info _swigt__p_short
Definition: graph_python_wrap.cc:4712
swig_types
static swig_type_info * swig_types[20]
Definition: graph_python_wrap.cc:2714
_wrap_delete_LinearSumAssignment
SWIGINTERN PyObject * _wrap_delete_LinearSumAssignment(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4407
swigobject_methods
static PyMethodDef swigobject_methods[]
Definition: graph_python_wrap.cc:1655
SWIGRUNTIMEINLINE
#define SWIGRUNTIMEINLINE
Definition: graph_python_wrap.cc:215
SWIG_Python_str_DelForPy3
#define SWIG_Python_str_DelForPy3(x)
Definition: graph_python_wrap.cc:833
next
Block * next
Definition: constraint_solver.cc:674
SWIG_Python_str_FromChar
SWIGINTERN PyObject * SWIG_Python_str_FromChar(const char *c)
Definition: graph_python_wrap.cc:840
operations_research::SimpleLinearSumAssignment::POSSIBLE_OVERFLOW
@ POSSIBLE_OVERFLOW
Definition: assignment.h:91
_swigc__p_signed_char
static swig_cast_info _swigc__p_signed_char[]
Definition: graph_python_wrap.cc:4755
swig::SwigPtr_PyObject::SwigPtr_PyObject
SwigPtr_PyObject(const SwigPtr_PyObject &item)
Definition: graph_python_wrap.cc:2759
SWIG_Python_str_FromFormat
#define SWIG_Python_str_FromFormat
Definition: graph_python_wrap.cc:801
operations_research::SimpleMaxFlow::BAD_RESULT
@ BAD_RESULT
Definition: max_flow.h:194
_swigc__p_ZVectorT_long_t
static swig_cast_info _swigc__p_ZVectorT_long_t[]
Definition: graph_python_wrap.cc:4743
SWIGUNUSEDPARM
#define SWIGUNUSEDPARM(p)
Definition: graph_python_wrap.cc:94
SWIGEXPORT
#define SWIGEXPORT
Definition: graph_python_wrap.cc:128
SWIG_Python_CheckImplicit
SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info *ty)
Definition: graph_python_wrap.cc:1316
SWIG_Python_AppendOutput
SWIGINTERN PyObject * SWIG_Python_AppendOutput(PyObject *result, PyObject *obj)
Definition: graph_python_wrap.cc:1184
MinCostFlowBase_swiginit
SWIGINTERN PyObject * MinCostFlowBase_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3549
swig_varlinkobject::vars
PyObject_HEAD swig_globalvar * vars
Definition: knapsack_solver_python_wrap.cc:3834
swig_varlink_repr
SWIGINTERN PyObject * swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v))
Definition: graph_python_wrap.cc:5052
swig::SwigPtr_PyObject::SwigPtr_PyObject
SwigPtr_PyObject(PyObject *obj, bool initial_ref=true)
Definition: graph_python_wrap.cc:2766
SharedPyPtr::~SharedPyPtr
~SharedPyPtr()
Definition: graph_python_wrap.cc:2854
_swigt__p_unsigned_short
static swig_type_info _swigt__p_unsigned_short
Definition: graph_python_wrap.cc:4718
_swigc__p_operations_research__SimpleMaxFlow
static swig_cast_info _swigc__p_operations_research__SimpleMaxFlow[]
Definition: graph_python_wrap.cc:4752
SWIG_SetModule
#define SWIG_SetModule(clientdata, pointer)
Definition: graph_python_wrap.cc:1121
SWIG_Python_ConvertPtrAndOwn
SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own)
Definition: graph_python_wrap.cc:2100
SWIG_PackDataName
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
Definition: graph_python_wrap.cc:724
SwigPyClientData::newraw
PyObject * newraw
Definition: knapsack_solver_python_wrap.cc:1307
SWIG_PropagateClientData
SWIGRUNTIME void SWIG_PropagateClientData(void)
Definition: graph_python_wrap.cc:4994
SwigPyObject_richcompare
SWIGRUNTIME PyObject * SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
Definition: graph_python_wrap.cc:1493
SWIG_IsOK
#define SWIG_IsOK(r)
Definition: graph_python_wrap.cc:313
SWIG_AsVal_long
SWIGINTERN int SWIG_AsVal_long(PyObject *obj, long *val)
Definition: graph_python_wrap.cc:3014
_wrap_delete_SimpleMinCostFlow
SWIGINTERN PyObject * _wrap_delete_SimpleMinCostFlow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4073
SWIG_UnpackDataName
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
Definition: graph_python_wrap.cc:739
Py_TYPE
#define Py_TYPE(op)
Definition: graph_python_wrap.cc:793
_wrap_SimpleMaxFlow_GetSourceSideMinCut
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_GetSourceSideMinCut(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3377
SWIGTYPE_p_operations_research__MinCostFlowBase
#define SWIGTYPE_p_operations_research__MinCostFlowBase
Definition: graph_python_wrap.cc:2703
SWIGINTERNINLINE
#define SWIGINTERNINLINE
Definition: graph_python_wrap.cc:105
SWIG_newvarlink
#define SWIG_newvarlink()
Definition: graph_python_wrap.cc:5031
_wrap_SimpleMinCostFlow_Solve
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Solve(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3755
swig_globalvar::next
struct swig_globalvar * next
Definition: knapsack_solver_python_wrap.cc:3829
swig_cast_info::converter
swig_converter_func converter
Definition: knapsack_solver_python_wrap.cc:379
operations_research::MinCostFlowBase::BAD_COST_RANGE
@ BAD_COST_RANGE
Definition: min_cost_flow.h:201
_wrap_LinearSumAssignment_LeftNode
SWIGINTERN PyObject * _wrap_LinearSumAssignment_LeftNode(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4211
SWIG_TypeCheck
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
Definition: graph_python_wrap.cc:446
SWIG_RUNTIME_VERSION
#define SWIG_RUNTIME_VERSION
Definition: graph_python_wrap.cc:190
SWIG_globals
SWIGINTERN PyObject * SWIG_globals(void)
Definition: graph_python_wrap.cc:5236
_wrap_SimpleMinCostFlow_Flow
SWIGINTERN PyObject * _wrap_SimpleMinCostFlow_Flow(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3847
name
const std::string name
Definition: default_search.cc:808
swig_dycast_func
struct swig_type_info *(* swig_dycast_func)(void **)
Definition: graph_python_wrap.cc:364
swig_type_info
Definition: knapsack_solver_python_wrap.cc:367
SwigPyPacked_Check
SWIGRUNTIMEINLINE int SwigPyPacked_Check(PyObject *op)
Definition: graph_python_wrap.cc:1862
_wrap_SimpleMaxFlow_GetSinkSideMinCut
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_GetSinkSideMinCut(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3407
_wrap_SimpleMaxFlow_Head
SWIGINTERN PyObject * _wrap_SimpleMaxFlow_Head(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:3226
SWIG_TypeCmp
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
Definition: graph_python_wrap.cc:419
SWIG_ConvertPtr
#define SWIG_ConvertPtr(obj, pptr, type, flags)
Definition: graph_python_wrap.cc:1086
SWIG_Py_Void
SWIGRUNTIMEINLINE PyObject * SWIG_Py_Void(void)
Definition: graph_python_wrap.cc:1296
swig_varlinkobject
struct swig_varlinkobject swig_varlinkobject
SWIG_TypeCheckStruct
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
Definition: graph_python_wrap.cc:473
SWIG_Python_newvarlink
SWIGINTERN PyObject * SWIG_Python_newvarlink(void)
Definition: graph_python_wrap.cc:5210
_wrap_LinearSumAssignment_NumNodes
SWIGINTERN PyObject * _wrap_LinearSumAssignment_NumNodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args)
Definition: graph_python_wrap.cc:4165
swig_type_info::cast
struct swig_cast_info * cast
Definition: knapsack_solver_python_wrap.cc:371
SWIG_From_long
#define SWIG_From_long
Definition: graph_python_wrap.cc:3079