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;
SwigMovePointerSwigValueWrapper::SwigMovePointer24 SwigMovePointer(T *p) : ptr(p) { }
~SwigMovePointerSwigValueWrapper::SwigMovePointer25 ~SwigMovePointer() { delete ptr; }
operator =SwigValueWrapper::SwigMovePointer26 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:
SwigValueWrapper()31 SwigValueWrapper() : pointer(0) { }
operator =(const T & t)32 SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
operator T&() const33 operator T&() const { return *pointer.ptr; }
operator &()34 T *operator&() { return pointer.ptr; }
35 };
36
SwigValueInit()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)
SWIG_AddCast(int r)345 SWIGINTERNINLINE int SWIG_AddCast(int r) {
346 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
347 }
SWIG_CheckState(int r)348 SWIGINTERNINLINE int SWIG_CheckState(int r) {
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 */
374 } swig_type_info;
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 */
382 } swig_cast_info;
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 */
394 } swig_module_info;
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
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)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
SWIG_TypeCmp(const char * nb,const char * tb)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
SWIG_TypeEquiv(const char * nb,const char * tb)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 */
445 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)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 */
472 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)473 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
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 *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)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 */
507 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)508 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
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 *
SWIG_TypeName(const swig_type_info * ty)522 SWIG_TypeName(const swig_type_info *ty) {
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 *
SWIG_TypePrettyName(const swig_type_info * type)531 SWIG_TypePrettyName(const swig_type_info *type) {
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
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)552 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
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) {
561 SWIG_TypeClientData(tc, clientdata);
562 }
563 }
564 cast = cast->next;
565 }
566 }
567 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)568 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
569 SWIG_TypeClientData(ti, clientdata);
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 */
581 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)582 SWIG_MangledTypeQueryModule(swig_module_info *start,
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 */
626 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)627 SWIG_TypeQueryModule(swig_module_info *start,
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 *
SWIG_PackData(char * c,void * ptr,size_t sz)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 *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)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 *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)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 *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)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 *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)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 *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)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*
SWIG_Python_str_AsChar(PyObject * str)809 SWIG_Python_str_AsChar(PyObject *str)
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*
SWIG_Python_str_FromChar(const char * c)840 SWIG_Python_str_FromChar(const char *c)
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*
SWIG_Python_ErrorType(int code)869 SWIG_Python_ErrorType(int code) {
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
SWIG_Python_AddErrorMsg(const char * mesg)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);
930 SWIG_Python_str_DelForPy3(tmp);
931 Py_DECREF(old_str);
932 Py_DECREF(value);
933 } else {
934 PyErr_SetString(PyExc_RuntimeError, mesg);
935 }
936 }
937
938 SWIGRUNTIME int
SWIG_Python_TypeErrorOccurred(PyObject * obj)939 SWIG_Python_TypeErrorOccurred(PyObject *obj)
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
SWIG_Python_RaiseOrModifyTypeError(const char * message)949 SWIG_Python_RaiseOrModifyTypeError(const char *message)
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:
end()987 void end() { if (status) { PyGILState_Release(state); status = false;} }
SWIG_Python_Thread_Block()988 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
~SWIG_Python_Thread_Block()989 ~SWIG_Python_Thread_Block() { end(); }
990 };
991 class SWIG_Python_Thread_Allow {
992 bool status;
993 PyThreadState *save;
994 public:
end()995 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
SWIG_Python_Thread_Allow()996 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
~SWIG_Python_Thread_Allow()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;
1057 swig_type_info **ptype;
1058 } swig_const_info;
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
SWIG_Python_SetErrorObj(PyObject * errtype,PyObject * obj)1136 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1137 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1138 PyErr_SetObject(errtype, obj);
1139 Py_DECREF(obj);
1140 SWIG_PYTHON_THREAD_END_BLOCK;
1141 }
1142
1143 SWIGINTERN void
SWIG_Python_SetErrorMsg(PyObject * errtype,const char * msg)1144 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1145 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1146 PyErr_SetString(errtype, msg);
1147 SWIG_PYTHON_THREAD_END_BLOCK;
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
SwigPyBuiltin_AddPublicSymbol(PyObject * seq,const char * key)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
SWIG_Python_SetConstant(PyObject * d,PyObject * public_interface,const char * name,PyObject * obj)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
SWIG_Python_SetConstant(PyObject * d,const char * name,PyObject * obj)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*
SWIG_Python_AppendOutput(PyObject * result,PyObject * obj)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
SWIG_Python_UnpackTuple(PyObject * args,const char * name,Py_ssize_t min,Py_ssize_t max,PyObject ** objs)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
SWIG_Python_CheckNoKeywords(PyObject * kwargs,const char * name)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 *
SWIG_Py_Void(void)1296 SWIG_Py_Void(void)
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;
1313 } SwigPyClientData;
1314
1315 SWIGRUNTIMEINLINE int
SWIG_Python_CheckImplicit(swig_type_info * ty)1316 SWIG_Python_CheckImplicit(swig_type_info *ty)
1317 {
1318 SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
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 *
SWIG_Python_ExceptionType(swig_type_info * desc)1326 SWIG_Python_ExceptionType(swig_type_info *desc) {
1327 SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1328 PyObject *klass = data ? data->klass : 0;
1329 return (klass ? klass : PyExc_RuntimeError);
1330 }
1331
1332
1333 SWIGRUNTIME SwigPyClientData *
SwigPyClientData_New(PyObject * obj)1334 SwigPyClientData_New(PyObject* obj)
1335 {
1336 if (!obj) {
1337 return 0;
1338 } else {
1339 SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
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
SwigPyClientData_Del(SwigPyClientData * data)1380 SwigPyClientData_Del(SwigPyClientData *data) {
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 *
SwigPyObject_get___dict__(PyObject * v,PyObject * SWIGUNUSEDPARM (args))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 *
SwigPyObject_long(SwigPyObject * v)1417 SwigPyObject_long(SwigPyObject *v)
1418 {
1419 return PyLong_FromVoidPtr(v->ptr);
1420 }
1421
1422 SWIGRUNTIME PyObject *
SwigPyObject_format(const char * fmt,SwigPyObject * v)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 *
SwigPyObject_oct(SwigPyObject * v)1445 SwigPyObject_oct(SwigPyObject *v)
1446 {
1447 return SwigPyObject_format("%o",v);
1448 }
1449
1450 SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject * v)1451 SwigPyObject_hex(SwigPyObject *v)
1452 {
1453 return SwigPyObject_format("%x",v);
1454 }
1455
1456 SWIGRUNTIME PyObject *
SwigPyObject_repr(SwigPyObject * v)1457 SwigPyObject_repr(SwigPyObject *v)
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 *
SwigPyObject_repr2(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1478 SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1479 {
1480 return SwigPyObject_repr((SwigPyObject*)v);
1481 }
1482
1483 SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject * v,SwigPyObject * w)1484 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
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*
SwigPyObject_richcompare(SwigPyObject * v,SwigPyObject * w,int op)1493 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
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*
SwigPyObject_type(void)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*
SwigPyObject_type(void)1520 SwigPyObject_type(void) {
1521 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1522 return type;
1523 }
1524 #endif
1525
1526 SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject * op)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
SwigPyObject_dealloc(PyObject * v)1543 SwigPyObject_dealloc(PyObject *v)
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*
SwigPyObject_append(PyObject * v,PyObject * next)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*
SwigPyObject_next(PyObject * v,PyObject * SWIGUNUSEDPARM (args))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*
SwigPyObject_disown(PyObject * v,PyObject * SWIGUNUSEDPARM (args))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*
SwigPyObject_acquire(PyObject * v,PyObject * SWIGUNUSEDPARM (args))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*
SwigPyObject_own(PyObject * v,PyObject * args)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
1655 swigobject_methods[] = {
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*
SwigPyObject_TypeOnce(void)1666 SwigPyObject_TypeOnce(void) {
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 *
SwigPyObject_New(void * ptr,swig_type_info * ty,int own)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 *
SwigPyPacked_repr(SwigPyPacked * v)1823 SwigPyPacked_repr(SwigPyPacked *v)
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 *
SwigPyPacked_str(SwigPyPacked * v)1834 SwigPyPacked_str(SwigPyPacked *v)
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
SwigPyPacked_compare(SwigPyPacked * v,SwigPyPacked * w)1845 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
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*
SwigPyPacked_type(void)1856 SwigPyPacked_type(void) {
1857 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1858 return type;
1859 }
1860
1861 SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject * op)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
SwigPyPacked_dealloc(PyObject * v)1868 SwigPyPacked_dealloc(PyObject *v)
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*
SwigPyPacked_TypeOnce(void)1878 SwigPyPacked_TypeOnce(void) {
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 *
SwigPyPacked_New(void * ptr,size_t size,swig_type_info * ty)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
1984 SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject * obj,void * ptr,size_t size)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 *
SWIG_This(void)2004 SWIG_This(void)
2005 {
2006 if (Swig_This_global == NULL)
2007 Swig_This_global = SWIG_Python_str_FromChar("this");
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
2018 SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject * pyobj)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
SWIG_Python_AcquirePtr(PyObject * obj,int own)2085 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2086 if (own == SWIG_POINTER_OWN) {
2087 SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
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
SWIG_Python_ConvertPtrAndOwn(PyObject * obj,void ** ptr,swig_type_info * ty,int flags,int * own)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;
2110 return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
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
SWIG_Python_ConvertFunctionPtr(PyObject * obj,void ** ptr,swig_type_info * ty)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
SWIG_Python_ConvertPacked(PyObject * obj,void * ptr,size_t sz,swig_type_info * ty)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*
SWIG_Python_NewShadowInstance(SwigPyClientData * data,PyObject * swig_this)2257 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
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
SWIG_Python_SetSwigThis(PyObject * inst,PyObject * swig_this)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 *
SWIG_Python_InitShadowInstance(PyObject * args)2331 SWIG_Python_InitShadowInstance(PyObject *args) {
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 *
SWIG_Python_NewPointerObj(PyObject * self,void * ptr,swig_type_info * type,int flags)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 *
SWIG_Python_NewPackedObj(void * ptr,size_t sz,swig_type_info * type)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
2416 SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void * SWIGUNUSEDPARM (clientdata))2417 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
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
SWIG_Python_DestroyModule(PyObject * obj)2435 SWIG_Python_DestroyModule(PyObject *obj)
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) {
2443 SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2444 if (data) SwigPyClientData_Del(data);
2445 }
2446 }
2447 Py_DECREF(SWIG_This());
2448 Swig_This_global = NULL;
2449 }
2450
2451 SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info * swig_module)2452 SWIG_Python_SetModule(swig_module_info *swig_module) {
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 *
SWIG_Python_TypeCache(void)2470 SWIG_Python_TypeCache(void) {
2471 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2472 return cache;
2473 }
2474
2475 SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char * type)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 {
2485 swig_module_info *swig_module = SWIG_GetModule(0);
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
SWIG_Python_AddErrMesg(const char * mesg,int infront)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 }
2523 SWIG_Python_str_DelForPy3(tmp);
2524 Py_DECREF(old_str);
2525 }
2526 return 1;
2527 } else {
2528 return 0;
2529 }
2530 }
2531
2532 SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)2533 SWIG_Python_ArgFail(int argnum)
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 *
SwigPyObject_GetDesc(PyObject * self)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
SWIG_Python_TypeError(const char * type,PyObject * obj)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);
2575 SWIG_Python_str_DelForPy3(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 *
SWIG_Python_MustGetPtr(PyObject * obj,swig_type_info * ty,int SWIGUNUSEDPARM (argnum),int flags)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) {
2599 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2600 SWIG_Python_ArgFail(argnum);
2601 }
2602 #endif
2603 }
2604 return result;
2605 }
2606
2607 #ifdef SWIGPYTHON_BUILTIN
2608 SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject * obj,PyObject * name,PyObject * value)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_COORDINATE swig_types[0]
2696 #define SWIGTYPE_p_FILE swig_types[1]
2697 #define SWIGTYPE_p_SOLUTION swig_types[2]
2698 #define SWIGTYPE_p_Tree swig_types[3]
2699 #define SWIGTYPE_p__struct_en swig_types[4]
2700 #define SWIGTYPE_p_a_3_VRNA_GQUAD_MAX_LINKER_LENGTH_1__double swig_types[5]
2701 #define SWIGTYPE_p_a_3_VRNA_GQUAD_MAX_LINKER_LENGTH_1__doubleArray swig_types[6]
2702 #define SWIGTYPE_p_a_5__a_5__double swig_types[7]
2703 #define SWIGTYPE_p_a_5__a_5__doubleArray swig_types[8]
2704 #define SWIGTYPE_p_a_5__a_5__int swig_types[9]
2705 #define SWIGTYPE_p_a_5__a_5__intArray swig_types[10]
2706 #define SWIGTYPE_p_a_5__double swig_types[11]
2707 #define SWIGTYPE_p_a_5__doubleArray swig_types[12]
2708 #define SWIGTYPE_p_a_7_1__a_5__a_5__a_5__a_5__int swig_types[13]
2709 #define SWIGTYPE_p_a_7_1__a_5__a_5__a_5__a_5__intArray swig_types[14]
2710 #define SWIGTYPE_p_a_7_1__a_5__a_5__a_5__int swig_types[15]
2711 #define SWIGTYPE_p_a_7_1__a_5__a_5__a_5__intArray swig_types[16]
2712 #define SWIGTYPE_p_a_7_1__a_5__a_5__int swig_types[17]
2713 #define SWIGTYPE_p_a_7_1__a_5__a_5__intArray swig_types[18]
2714 #define SWIGTYPE_p_a_MAXLOOP_1__double swig_types[19]
2715 #define SWIGTYPE_p_a_MAXLOOP_1__doubleArray swig_types[20]
2716 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__a_5__a_5__double swig_types[21]
2717 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__a_5__a_5__doubleArray swig_types[22]
2718 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__a_5__a_5__int swig_types[23]
2719 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__a_5__a_5__intArray swig_types[24]
2720 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__a_5__double swig_types[25]
2721 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__a_5__doubleArray swig_types[26]
2722 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__a_5__int swig_types[27]
2723 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__a_5__intArray swig_types[28]
2724 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__double swig_types[29]
2725 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__doubleArray swig_types[30]
2726 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__int swig_types[31]
2727 #define SWIGTYPE_p_a_NBPAIRS_1__a_5__a_5__intArray swig_types[32]
2728 #define SWIGTYPE_p_a_NBPAIRS_1__double swig_types[33]
2729 #define SWIGTYPE_p_a_NBPAIRS_1__doubleArray swig_types[34]
2730 #define SWIGTYPE_p_allocator_type swig_types[35]
2731 #define SWIGTYPE_p_char swig_types[36]
2732 #define SWIGTYPE_p_difference_type swig_types[37]
2733 #define SWIGTYPE_p_double swig_types[38]
2734 #define SWIGTYPE_p_doubleArray swig_types[39]
2735 #define SWIGTYPE_p_duplexT swig_types[40]
2736 #define SWIGTYPE_p_duplex_list_t swig_types[41]
2737 #define SWIGTYPE_p_first_type swig_types[42]
2738 #define SWIGTYPE_p_float swig_types[43]
2739 #define SWIGTYPE_p_floatArray swig_types[44]
2740 #define SWIGTYPE_p_heat_capacity_result swig_types[45]
2741 #define SWIGTYPE_p_int swig_types[46]
2742 #define SWIGTYPE_p_intArray swig_types[47]
2743 #define SWIGTYPE_p_my_fc_type_e swig_types[48]
2744 #define SWIGTYPE_p_p_PyObject swig_types[49]
2745 #define SWIGTYPE_p_p_char swig_types[50]
2746 #define SWIGTYPE_p_p_p_char swig_types[51]
2747 #define SWIGTYPE_p_p_void swig_types[52]
2748 #define SWIGTYPE_p_second_type swig_types[53]
2749 #define SWIGTYPE_p_short swig_types[54]
2750 #define SWIGTYPE_p_size_type swig_types[55]
2751 #define SWIGTYPE_p_std__allocatorT_COORDINATE_t swig_types[56]
2752 #define SWIGTYPE_p_std__allocatorT_SOLUTION_t swig_types[57]
2753 #define SWIGTYPE_p_std__allocatorT_char_const_p_t swig_types[58]
2754 #define SWIGTYPE_p_std__allocatorT_double_t swig_types[59]
2755 #define SWIGTYPE_p_std__allocatorT_duplex_list_t_t swig_types[60]
2756 #define SWIGTYPE_p_std__allocatorT_heat_capacity_result_t swig_types[61]
2757 #define SWIGTYPE_p_std__allocatorT_int_t swig_types[62]
2758 #define SWIGTYPE_p_std__allocatorT_std__string_t swig_types[63]
2759 #define SWIGTYPE_p_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t swig_types[64]
2760 #define SWIGTYPE_p_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t swig_types[65]
2761 #define SWIGTYPE_p_std__allocatorT_subopt_solution_t swig_types[66]
2762 #define SWIGTYPE_p_std__allocatorT_unsigned_int_t swig_types[67]
2763 #define SWIGTYPE_p_std__allocatorT_vrna_ep_t_t swig_types[68]
2764 #define SWIGTYPE_p_std__allocatorT_vrna_move_t_t swig_types[69]
2765 #define SWIGTYPE_p_std__allocatorT_vrna_path_t_t swig_types[70]
2766 #define SWIGTYPE_p_std__invalid_argument swig_types[71]
2767 #define SWIGTYPE_p_std__pairT_double_double_t swig_types[72]
2768 #define SWIGTYPE_p_std__string swig_types[73]
2769 #define SWIGTYPE_p_std__vectorT_COORDINATE_std__allocatorT_COORDINATE_t_t swig_types[74]
2770 #define SWIGTYPE_p_std__vectorT_SOLUTION_std__allocatorT_SOLUTION_t_t swig_types[75]
2771 #define SWIGTYPE_p_std__vectorT_char_const_p_std__allocatorT_char_const_p_t_t swig_types[76]
2772 #define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[77]
2773 #define SWIGTYPE_p_std__vectorT_duplex_list_t_std__allocatorT_duplex_list_t_t_t swig_types[78]
2774 #define SWIGTYPE_p_std__vectorT_heat_capacity_result_std__allocatorT_heat_capacity_result_t_t swig_types[79]
2775 #define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[80]
2776 #define SWIGTYPE_p_std__vectorT_std__string_std__allocatorT_std__string_t_t swig_types[81]
2777 #define SWIGTYPE_p_std__vectorT_std__vectorT_double_std__allocatorT_double_t_t_std__allocatorT_std__vectorT_double_std__allocatorT_double_t_t_t_t swig_types[82]
2778 #define SWIGTYPE_p_std__vectorT_std__vectorT_int_std__allocatorT_int_t_t_std__allocatorT_std__vectorT_int_std__allocatorT_int_t_t_t_t swig_types[83]
2779 #define SWIGTYPE_p_std__vectorT_subopt_solution_std__allocatorT_subopt_solution_t_t swig_types[84]
2780 #define SWIGTYPE_p_std__vectorT_unsigned_int_std__allocatorT_unsigned_int_t_t swig_types[85]
2781 #define SWIGTYPE_p_std__vectorT_vrna_ep_t_std__allocatorT_vrna_ep_t_t_t swig_types[86]
2782 #define SWIGTYPE_p_std__vectorT_vrna_move_t_std__allocatorT_vrna_move_t_t_t swig_types[87]
2783 #define SWIGTYPE_p_std__vectorT_vrna_path_t_std__allocatorT_vrna_path_t_t_t swig_types[88]
2784 #define SWIGTYPE_p_subopt_solution swig_types[89]
2785 #define SWIGTYPE_p_swString swig_types[90]
2786 #define SWIGTYPE_p_swig__SwigPyIterator swig_types[91]
2787 #define SWIGTYPE_p_unsigned_int swig_types[92]
2788 #define SWIGTYPE_p_unsigned_short swig_types[93]
2789 #define SWIGTYPE_p_value_type swig_types[94]
2790 #define SWIGTYPE_p_void swig_types[95]
2791 #define SWIGTYPE_p_vrna_basepair_t swig_types[96]
2792 #define SWIGTYPE_p_vrna_bp_stack_s swig_types[97]
2793 #define SWIGTYPE_p_vrna_command_s swig_types[98]
2794 #define SWIGTYPE_p_vrna_cpair_s swig_types[99]
2795 #define SWIGTYPE_p_vrna_dimer_pf_s swig_types[100]
2796 #define SWIGTYPE_p_vrna_elem_prob_s swig_types[101]
2797 #define SWIGTYPE_p_vrna_ep_t swig_types[102]
2798 #define SWIGTYPE_p_vrna_exp_param_t swig_types[103]
2799 #define SWIGTYPE_p_vrna_fold_compound_t swig_types[104]
2800 #define SWIGTYPE_p_vrna_md_t swig_types[105]
2801 #define SWIGTYPE_p_vrna_move_t swig_types[106]
2802 #define SWIGTYPE_p_vrna_param_t swig_types[107]
2803 #define SWIGTYPE_p_vrna_path_options_s swig_types[108]
2804 #define SWIGTYPE_p_vrna_path_s swig_types[109]
2805 #define SWIGTYPE_p_vrna_path_t swig_types[110]
2806 #define SWIGTYPE_p_vrna_pbacktrack_mem_t swig_types[111]
2807 #define SWIGTYPE_p_vrna_pinfo_s swig_types[112]
2808 #define SWIGTYPE_p_vrna_sc_s swig_types[113]
2809 static swig_type_info *swig_types[115];
2810 static swig_module_info swig_module = {swig_types, 114, 0, 0, 0, 0};
2811 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2812 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2813
2814 /* -------- TYPES TABLE (END) -------- */
2815
2816 #ifdef SWIG_TypeQuery
2817 # undef SWIG_TypeQuery
2818 #endif
2819 #define SWIG_TypeQuery SWIG_Python_TypeQuery
2820
2821 /*-----------------------------------------------
2822 @(target):= _RNA.so
2823 ------------------------------------------------*/
2824 #if PY_VERSION_HEX >= 0x03000000
2825 # define SWIG_init PyInit__RNA
2826
2827 #else
2828 # define SWIG_init init_RNA
2829
2830 #endif
2831 #define SWIG_name "_RNA"
2832
2833 #define SWIGVERSION 0x040002
2834 #define SWIG_VERSION SWIGVERSION
2835
2836
2837 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2838 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2839
2840
2841 #include <stdexcept>
2842
2843
2844 namespace swig {
2845 class SwigPtr_PyObject {
2846 protected:
2847 PyObject *_obj;
2848
2849 public:
SwigPtr_PyObject()2850 SwigPtr_PyObject() :_obj(0)
2851 {
2852 }
2853
SwigPtr_PyObject(const SwigPtr_PyObject & item)2854 SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
2855 {
2856 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2857 Py_XINCREF(_obj);
2858 SWIG_PYTHON_THREAD_END_BLOCK;
2859 }
2860
SwigPtr_PyObject(PyObject * obj,bool initial_ref=true)2861 SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2862 {
2863 if (initial_ref) {
2864 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2865 Py_XINCREF(_obj);
2866 SWIG_PYTHON_THREAD_END_BLOCK;
2867 }
2868 }
2869
operator =(const SwigPtr_PyObject & item)2870 SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
2871 {
2872 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2873 Py_XINCREF(item._obj);
2874 Py_XDECREF(_obj);
2875 _obj = item._obj;
2876 SWIG_PYTHON_THREAD_END_BLOCK;
2877 return *this;
2878 }
2879
~SwigPtr_PyObject()2880 ~SwigPtr_PyObject()
2881 {
2882 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2883 Py_XDECREF(_obj);
2884 SWIG_PYTHON_THREAD_END_BLOCK;
2885 }
2886
operator PyObject*() const2887 operator PyObject *() const
2888 {
2889 return _obj;
2890 }
2891
operator ->() const2892 PyObject *operator->() const
2893 {
2894 return _obj;
2895 }
2896 };
2897 }
2898
2899
2900 namespace swig {
2901 struct SwigVar_PyObject : SwigPtr_PyObject {
SwigVar_PyObjectswig::SwigVar_PyObject2902 SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2903
operator =swig::SwigVar_PyObject2904 SwigVar_PyObject & operator = (PyObject* obj)
2905 {
2906 Py_XDECREF(_obj);
2907 _obj = obj;
2908 return *this;
2909 }
2910 };
2911 }
2912
2913
2914
2915 extern "C" {
2916 #include <ViennaRNA/model.h>
2917 #include <ViennaRNA/datastructures/basic.h>
2918 #include <ViennaRNA/fold_compound.h>
2919 #include <ViennaRNA/dp_matrices.h>
2920 #include <ViennaRNA/alphabet.h>
2921 #include <ViennaRNA/sequence.h>
2922 #include <ViennaRNA/grammar.h>
2923 #include <ViennaRNA/unstructured_domains.h>
2924 #include <ViennaRNA/structured_domains.h>
2925 #include <ViennaRNA/commands.h>
2926
2927 #include <ViennaRNA/utils/basic.h>
2928 #include <ViennaRNA/utils/structures.h>
2929 #include <ViennaRNA/utils/strings.h>
2930 #include <ViennaRNA/utils/alignments.h>
2931 #include <ViennaRNA/fold_vars.h>
2932
2933 #include <ViennaRNA/params/constants.h>
2934 #include <ViennaRNA/params/basic.h>
2935 #include <ViennaRNA/params/io.h>
2936 #include <ViennaRNA/params/default.h>
2937
2938 #include <ViennaRNA/constraints/basic.h>
2939 #include <ViennaRNA/constraints/hard.h>
2940 #include <ViennaRNA/constraints/soft.h>
2941 #include <ViennaRNA/constraints/SHAPE.h>
2942 #include <ViennaRNA/constraints/ligand.h>
2943
2944 #include <ViennaRNA/plotting/naview.h>
2945 #include <ViennaRNA/plotting/layouts.h>
2946 #include <ViennaRNA/plotting/structures.h>
2947 #include <ViennaRNA/plotting/alignments.h>
2948 #include <ViennaRNA/plotting/probabilities.h>
2949
2950 #include <ViennaRNA/io/file_formats.h>
2951 #include <ViennaRNA/io/file_formats_msa.h>
2952 #include <ViennaRNA/io/utils.h>
2953
2954 #include <ViennaRNA/loops/external.h>
2955 #include <ViennaRNA/loops/hairpin.h>
2956 #include <ViennaRNA/loops/internal.h>
2957 #include <ViennaRNA/loops/multibranch.h>
2958
2959 #include <ViennaRNA/mfe.h>
2960 #include <ViennaRNA/mfe_window.h>
2961 #include <ViennaRNA/fold.h>
2962 #include <ViennaRNA/eval.h>
2963 #include <ViennaRNA/cofold.h>
2964 #include <ViennaRNA/alifold.h>
2965
2966 #include <ViennaRNA/part_func.h>
2967 #include <ViennaRNA/part_func_window.h>
2968 #include <ViennaRNA/part_func_co.h>
2969 #include <ViennaRNA/equilibrium_probs.h>
2970 #include <ViennaRNA/boltzmann_sampling.h>
2971 #include <ViennaRNA/concentrations.h>
2972 #include <ViennaRNA/LPfold.h>
2973 #include <ViennaRNA/centroid.h>
2974 #include <ViennaRNA/MEA.h>
2975 #include <ViennaRNA/heat_capacity.h>
2976
2977 #ifdef VRNA_WITH_SVM
2978 #include <ViennaRNA/zscore.h>
2979 #endif
2980
2981 #include <ViennaRNA/inverse.h>
2982 #include <ViennaRNA/RNAstruct.h>
2983 #include <ViennaRNA/treedist.h>
2984 #include <ViennaRNA/stringdist.h>
2985 #include <ViennaRNA/profiledist.h>
2986 #include <ViennaRNA/dist_vars.h>
2987 #include <ViennaRNA/pair_mat.h>
2988 #include <ViennaRNA/subopt.h>
2989 #include <ViennaRNA/duplex.h>
2990
2991 #include <ViennaRNA/combinatorics.h>
2992
2993 #include <ViennaRNA/move_set.h>
2994 #include <ViennaRNA/landscape/paths.h>
2995 #include <ViennaRNA/landscape/findpath.h>
2996 #include <ViennaRNA/landscape/move.h>
2997 #include <ViennaRNA/landscape/neighbor.h>
2998 #include <ViennaRNA/landscape/walk.h>
2999
3000 #include <ViennaRNA/mm.h>
3001 }
3002
3003
3004
new_intP(size_t nelements)3005 static int *new_intP(size_t nelements) {
3006 return (new int[nelements]());
3007 }
3008
delete_intP(int * ary)3009 static void delete_intP(int *ary) {
3010 delete[] ary;
3011 }
3012
intP_getitem(int * ary,size_t index)3013 static int intP_getitem(int *ary, size_t index) {
3014 return ary[index];
3015 }
intP_setitem(int * ary,size_t index,int value)3016 static void intP_setitem(int *ary, size_t index, int value) {
3017 ary[index] = value;
3018 }
3019
3020
3021 SWIGINTERN int
SWIG_AsVal_double(PyObject * obj,double * val)3022 SWIG_AsVal_double (PyObject *obj, double *val)
3023 {
3024 int res = SWIG_TypeError;
3025 if (PyFloat_Check(obj)) {
3026 if (val) *val = PyFloat_AsDouble(obj);
3027 return SWIG_OK;
3028 #if PY_VERSION_HEX < 0x03000000
3029 } else if (PyInt_Check(obj)) {
3030 if (val) *val = (double) PyInt_AsLong(obj);
3031 return SWIG_OK;
3032 #endif
3033 } else if (PyLong_Check(obj)) {
3034 double v = PyLong_AsDouble(obj);
3035 if (!PyErr_Occurred()) {
3036 if (val) *val = v;
3037 return SWIG_OK;
3038 } else {
3039 PyErr_Clear();
3040 }
3041 }
3042 #ifdef SWIG_PYTHON_CAST_MODE
3043 {
3044 int dispatch = 0;
3045 double d = PyFloat_AsDouble(obj);
3046 if (!PyErr_Occurred()) {
3047 if (val) *val = d;
3048 return SWIG_AddCast(SWIG_OK);
3049 } else {
3050 PyErr_Clear();
3051 }
3052 if (!dispatch) {
3053 long v = PyLong_AsLong(obj);
3054 if (!PyErr_Occurred()) {
3055 if (val) *val = v;
3056 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3057 } else {
3058 PyErr_Clear();
3059 }
3060 }
3061 }
3062 #endif
3063 return res;
3064 }
3065
3066
3067 #include <float.h>
3068
3069
3070 #include <math.h>
3071
3072
3073 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)3074 SWIG_CanCastAsInteger(double *d, double min, double max) {
3075 double x = *d;
3076 if ((min <= x && x <= max)) {
3077 double fx = floor(x);
3078 double cx = ceil(x);
3079 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3080 if ((errno == EDOM) || (errno == ERANGE)) {
3081 errno = 0;
3082 } else {
3083 double summ, reps, diff;
3084 if (rd < x) {
3085 diff = x - rd;
3086 } else if (rd > x) {
3087 diff = rd - x;
3088 } else {
3089 return 1;
3090 }
3091 summ = rd + x;
3092 reps = diff/summ;
3093 if (reps < 8*DBL_EPSILON) {
3094 *d = rd;
3095 return 1;
3096 }
3097 }
3098 }
3099 return 0;
3100 }
3101
3102
3103 SWIGINTERN int
SWIG_AsVal_unsigned_SS_long(PyObject * obj,unsigned long * val)3104 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
3105 {
3106 #if PY_VERSION_HEX < 0x03000000
3107 if (PyInt_Check(obj)) {
3108 long v = PyInt_AsLong(obj);
3109 if (v >= 0) {
3110 if (val) *val = v;
3111 return SWIG_OK;
3112 } else {
3113 return SWIG_OverflowError;
3114 }
3115 } else
3116 #endif
3117 if (PyLong_Check(obj)) {
3118 unsigned long v = PyLong_AsUnsignedLong(obj);
3119 if (!PyErr_Occurred()) {
3120 if (val) *val = v;
3121 return SWIG_OK;
3122 } else {
3123 PyErr_Clear();
3124 return SWIG_OverflowError;
3125 }
3126 }
3127 #ifdef SWIG_PYTHON_CAST_MODE
3128 {
3129 int dispatch = 0;
3130 unsigned long v = PyLong_AsUnsignedLong(obj);
3131 if (!PyErr_Occurred()) {
3132 if (val) *val = v;
3133 return SWIG_AddCast(SWIG_OK);
3134 } else {
3135 PyErr_Clear();
3136 }
3137 if (!dispatch) {
3138 double d;
3139 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3140 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3141 if (val) *val = (unsigned long)(d);
3142 return res;
3143 }
3144 }
3145 }
3146 #endif
3147 return SWIG_TypeError;
3148 }
3149
3150
3151 #include <limits.h>
3152 #if !defined(SWIG_NO_LLONG_MAX)
3153 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3154 # define LLONG_MAX __LONG_LONG_MAX__
3155 # define LLONG_MIN (-LLONG_MAX - 1LL)
3156 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3157 # endif
3158 #endif
3159
3160
3161 #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
3162 # define SWIG_LONG_LONG_AVAILABLE
3163 #endif
3164
3165
3166 #ifdef SWIG_LONG_LONG_AVAILABLE
3167 SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long(PyObject * obj,unsigned long long * val)3168 SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
3169 {
3170 int res = SWIG_TypeError;
3171 if (PyLong_Check(obj)) {
3172 unsigned long long v = PyLong_AsUnsignedLongLong(obj);
3173 if (!PyErr_Occurred()) {
3174 if (val) *val = v;
3175 return SWIG_OK;
3176 } else {
3177 PyErr_Clear();
3178 res = SWIG_OverflowError;
3179 }
3180 } else {
3181 unsigned long v;
3182 res = SWIG_AsVal_unsigned_SS_long (obj,&v);
3183 if (SWIG_IsOK(res)) {
3184 if (val) *val = v;
3185 return res;
3186 }
3187 }
3188 #ifdef SWIG_PYTHON_CAST_MODE
3189 {
3190 const double mant_max = 1LL << DBL_MANT_DIG;
3191 double d;
3192 res = SWIG_AsVal_double (obj,&d);
3193 if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
3194 return SWIG_OverflowError;
3195 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
3196 if (val) *val = (unsigned long long)(d);
3197 return SWIG_AddCast(res);
3198 }
3199 res = SWIG_TypeError;
3200 }
3201 #endif
3202 return res;
3203 }
3204 #endif
3205
3206
3207 SWIGINTERNINLINE int
SWIG_AsVal_size_t(PyObject * obj,size_t * val)3208 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
3209 {
3210 int res = SWIG_TypeError;
3211 #ifdef SWIG_LONG_LONG_AVAILABLE
3212 if (sizeof(size_t) <= sizeof(unsigned long)) {
3213 #endif
3214 unsigned long v;
3215 res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
3216 if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3217 #ifdef SWIG_LONG_LONG_AVAILABLE
3218 } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
3219 unsigned long long v;
3220 res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
3221 if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3222 }
3223 #endif
3224 return res;
3225 }
3226
3227
3228 SWIGINTERNINLINE PyObject*
SWIG_From_int(int value)3229 SWIG_From_int (int value)
3230 {
3231 return PyInt_FromLong((long) value);
3232 }
3233
3234
3235 SWIGINTERN int
SWIG_AsVal_long(PyObject * obj,long * val)3236 SWIG_AsVal_long (PyObject *obj, long* val)
3237 {
3238 #if PY_VERSION_HEX < 0x03000000
3239 if (PyInt_Check(obj)) {
3240 if (val) *val = PyInt_AsLong(obj);
3241 return SWIG_OK;
3242 } else
3243 #endif
3244 if (PyLong_Check(obj)) {
3245 long v = PyLong_AsLong(obj);
3246 if (!PyErr_Occurred()) {
3247 if (val) *val = v;
3248 return SWIG_OK;
3249 } else {
3250 PyErr_Clear();
3251 return SWIG_OverflowError;
3252 }
3253 }
3254 #ifdef SWIG_PYTHON_CAST_MODE
3255 {
3256 int dispatch = 0;
3257 long v = PyInt_AsLong(obj);
3258 if (!PyErr_Occurred()) {
3259 if (val) *val = v;
3260 return SWIG_AddCast(SWIG_OK);
3261 } else {
3262 PyErr_Clear();
3263 }
3264 if (!dispatch) {
3265 double d;
3266 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3267 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3268 if (val) *val = (long)(d);
3269 return res;
3270 }
3271 }
3272 }
3273 #endif
3274 return SWIG_TypeError;
3275 }
3276
3277
3278 SWIGINTERN int
SWIG_AsVal_int(PyObject * obj,int * val)3279 SWIG_AsVal_int (PyObject * obj, int *val)
3280 {
3281 long v;
3282 int res = SWIG_AsVal_long (obj, &v);
3283 if (SWIG_IsOK(res)) {
3284 if ((v < INT_MIN || v > INT_MAX)) {
3285 return SWIG_OverflowError;
3286 } else {
3287 if (val) *val = static_cast< int >(v);
3288 }
3289 }
3290 return res;
3291 }
3292
3293
3294 typedef int intArray;
3295
new_intArray(size_t nelements)3296 SWIGINTERN intArray *new_intArray(size_t nelements){
3297 return (new int[nelements]());
3298 }
delete_intArray(intArray * self)3299 SWIGINTERN void delete_intArray(intArray *self){
3300 delete[] self;
3301 }
intArray___getitem__(intArray * self,size_t index)3302 SWIGINTERN int intArray___getitem__(intArray *self,size_t index){
3303 return self[index];
3304 }
intArray___setitem__(intArray * self,size_t index,int value)3305 SWIGINTERN void intArray___setitem__(intArray *self,size_t index,int value){
3306 self[index] = value;
3307 }
intArray_cast(intArray * self)3308 SWIGINTERN int *intArray_cast(intArray *self){
3309 return self;
3310 }
intArray_frompointer(int * t)3311 SWIGINTERN intArray *intArray_frompointer(int *t){
3312 return static_cast< intArray * >(t);
3313 }
3314
new_floatP(size_t nelements)3315 static float *new_floatP(size_t nelements) {
3316 return (new float[nelements]());
3317 }
3318
delete_floatP(float * ary)3319 static void delete_floatP(float *ary) {
3320 delete[] ary;
3321 }
3322
floatP_getitem(float * ary,size_t index)3323 static float floatP_getitem(float *ary, size_t index) {
3324 return ary[index];
3325 }
floatP_setitem(float * ary,size_t index,float value)3326 static void floatP_setitem(float *ary, size_t index, float value) {
3327 ary[index] = value;
3328 }
3329
3330
3331 #define SWIG_From_double PyFloat_FromDouble
3332
3333
3334 SWIGINTERNINLINE PyObject *
SWIG_From_float(float value)3335 SWIG_From_float (float value)
3336 {
3337 return SWIG_From_double (value);
3338 }
3339
3340
3341 /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
3342 #ifndef SWIG_isfinite
3343 /* isfinite() is a macro for C99 */
3344 # if defined(isfinite)
3345 # define SWIG_isfinite(X) (isfinite(X))
3346 # elif defined(__cplusplus) && __cplusplus >= 201103L
3347 /* Use a template so that this works whether isfinite() is std::isfinite() or
3348 * in the global namespace. The reality seems to vary between compiler
3349 * versions.
3350 *
3351 * Make sure namespace std exists to avoid compiler warnings.
3352 *
3353 * extern "C++" is required as this fragment can end up inside an extern "C" { } block
3354 */
3355 namespace std { }
3356 extern "C++" template<typename T>
SWIG_isfinite_func(T x)3357 inline int SWIG_isfinite_func(T x) {
3358 using namespace std;
3359 return isfinite(x);
3360 }
3361 # define SWIG_isfinite(X) (SWIG_isfinite_func(X))
3362 # elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
3363 # define SWIG_isfinite(X) (__builtin_isfinite(X))
3364 # elif defined(__clang__) && defined(__has_builtin)
3365 # if __has_builtin(__builtin_isfinite)
3366 # define SWIG_isfinite(X) (__builtin_isfinite(X))
3367 # endif
3368 # elif defined(_MSC_VER)
3369 # define SWIG_isfinite(X) (_finite(X))
3370 # elif defined(__sun) && defined(__SVR4)
3371 # include <ieeefp.h>
3372 # define SWIG_isfinite(X) (finite(X))
3373 # endif
3374 #endif
3375
3376
3377 /* Accept infinite as a valid float value unless we are unable to check if a value is finite */
3378 #ifdef SWIG_isfinite
3379 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
3380 #else
3381 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
3382 #endif
3383
3384
3385 SWIGINTERN int
SWIG_AsVal_float(PyObject * obj,float * val)3386 SWIG_AsVal_float (PyObject * obj, float *val)
3387 {
3388 double v;
3389 int res = SWIG_AsVal_double (obj, &v);
3390 if (SWIG_IsOK(res)) {
3391 if (SWIG_Float_Overflow_Check(v)) {
3392 return SWIG_OverflowError;
3393 } else {
3394 if (val) *val = static_cast< float >(v);
3395 }
3396 }
3397 return res;
3398 }
3399
3400
3401 typedef float floatArray;
3402
new_floatArray(size_t nelements)3403 SWIGINTERN floatArray *new_floatArray(size_t nelements){
3404 return (new float[nelements]());
3405 }
delete_floatArray(floatArray * self)3406 SWIGINTERN void delete_floatArray(floatArray *self){
3407 delete[] self;
3408 }
floatArray___getitem__(floatArray * self,size_t index)3409 SWIGINTERN float floatArray___getitem__(floatArray *self,size_t index){
3410 return self[index];
3411 }
floatArray___setitem__(floatArray * self,size_t index,float value)3412 SWIGINTERN void floatArray___setitem__(floatArray *self,size_t index,float value){
3413 self[index] = value;
3414 }
floatArray_cast(floatArray * self)3415 SWIGINTERN float *floatArray_cast(floatArray *self){
3416 return self;
3417 }
floatArray_frompointer(float * t)3418 SWIGINTERN floatArray *floatArray_frompointer(float *t){
3419 return static_cast< floatArray * >(t);
3420 }
3421
new_doubleP(size_t nelements)3422 static double *new_doubleP(size_t nelements) {
3423 return (new double[nelements]());
3424 }
3425
delete_doubleP(double * ary)3426 static void delete_doubleP(double *ary) {
3427 delete[] ary;
3428 }
3429
doubleP_getitem(double * ary,size_t index)3430 static double doubleP_getitem(double *ary, size_t index) {
3431 return ary[index];
3432 }
doubleP_setitem(double * ary,size_t index,double value)3433 static void doubleP_setitem(double *ary, size_t index, double value) {
3434 ary[index] = value;
3435 }
3436
3437
3438 typedef double doubleArray;
3439
new_doubleArray(size_t nelements)3440 SWIGINTERN doubleArray *new_doubleArray(size_t nelements){
3441 return (new double[nelements]());
3442 }
delete_doubleArray(doubleArray * self)3443 SWIGINTERN void delete_doubleArray(doubleArray *self){
3444 delete[] self;
3445 }
doubleArray___getitem__(doubleArray * self,size_t index)3446 SWIGINTERN double doubleArray___getitem__(doubleArray *self,size_t index){
3447 return self[index];
3448 }
doubleArray___setitem__(doubleArray * self,size_t index,double value)3449 SWIGINTERN void doubleArray___setitem__(doubleArray *self,size_t index,double value){
3450 self[index] = value;
3451 }
doubleArray_cast(doubleArray * self)3452 SWIGINTERN double *doubleArray_cast(doubleArray *self){
3453 return self;
3454 }
doubleArray_frompointer(double * t)3455 SWIGINTERN doubleArray *doubleArray_frompointer(double *t){
3456 return static_cast< doubleArray * >(t);
3457 }
3458
new_ushortP(size_t nelements)3459 static unsigned short *new_ushortP(size_t nelements) {
3460 return (new unsigned short[nelements]());
3461 }
3462
delete_ushortP(unsigned short * ary)3463 static void delete_ushortP(unsigned short *ary) {
3464 delete[] ary;
3465 }
3466
ushortP_getitem(unsigned short * ary,size_t index)3467 static unsigned short ushortP_getitem(unsigned short *ary, size_t index) {
3468 return ary[index];
3469 }
ushortP_setitem(unsigned short * ary,size_t index,unsigned short value)3470 static void ushortP_setitem(unsigned short *ary, size_t index, unsigned short value) {
3471 ary[index] = value;
3472 }
3473
3474
3475 #define SWIG_From_long PyInt_FromLong
3476
3477
3478 SWIGINTERNINLINE PyObject*
SWIG_From_unsigned_SS_long(unsigned long value)3479 SWIG_From_unsigned_SS_long (unsigned long value)
3480 {
3481 return (value > LONG_MAX) ?
3482 PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
3483 }
3484
3485
3486 SWIGINTERNINLINE PyObject *
SWIG_From_unsigned_SS_short(unsigned short value)3487 SWIG_From_unsigned_SS_short (unsigned short value)
3488 {
3489 return SWIG_From_unsigned_SS_long (value);
3490 }
3491
3492
3493 SWIGINTERN int
SWIG_AsVal_unsigned_SS_short(PyObject * obj,unsigned short * val)3494 SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val)
3495 {
3496 unsigned long v;
3497 int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3498 if (SWIG_IsOK(res)) {
3499 if ((v > USHRT_MAX)) {
3500 return SWIG_OverflowError;
3501 } else {
3502 if (val) *val = static_cast< unsigned short >(v);
3503 }
3504 }
3505 return res;
3506 }
3507
3508
new_shortP(size_t nelements)3509 static short *new_shortP(size_t nelements) {
3510 return (new short[nelements]());
3511 }
3512
delete_shortP(short * ary)3513 static void delete_shortP(short *ary) {
3514 delete[] ary;
3515 }
3516
shortP_getitem(short * ary,size_t index)3517 static short shortP_getitem(short *ary, size_t index) {
3518 return ary[index];
3519 }
shortP_setitem(short * ary,size_t index,short value)3520 static void shortP_setitem(short *ary, size_t index, short value) {
3521 ary[index] = value;
3522 }
3523
3524
3525 SWIGINTERNINLINE PyObject *
SWIG_From_short(short value)3526 SWIG_From_short (short value)
3527 {
3528 return SWIG_From_long (value);
3529 }
3530
3531
3532 SWIGINTERN int
SWIG_AsVal_short(PyObject * obj,short * val)3533 SWIG_AsVal_short (PyObject * obj, short *val)
3534 {
3535 long v;
3536 int res = SWIG_AsVal_long (obj, &v);
3537 if (SWIG_IsOK(res)) {
3538 if ((v < SHRT_MIN || v > SHRT_MAX)) {
3539 return SWIG_OverflowError;
3540 } else {
3541 if (val) *val = static_cast< short >(v);
3542 }
3543 }
3544 return res;
3545 }
3546
3547
3548 typedef struct SWIGCDATA {
3549 char *data;
3550 size_t len;
3551 } SWIGCDATA;
3552
3553
3554
3555 extern "C" {
3556
3557
cdata_void(void * ptr,size_t nelements)3558 static SWIGCDATA cdata_void(void *ptr, size_t nelements)
3559
3560
3561
3562 {
3563 SWIGCDATA d;
3564 d.data = (char *) ptr;
3565
3566
3567
3568 d.len = nelements;
3569
3570 return d;
3571 }
3572
3573 }
3574
3575
3576
3577 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)3578 SWIG_pchar_descriptor(void)
3579 {
3580 static int init = 0;
3581 static swig_type_info* info = 0;
3582 if (!init) {
3583 info = SWIG_TypeQuery("_p_char");
3584 init = 1;
3585 }
3586 return info;
3587 }
3588
3589
3590 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)3591 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3592 {
3593 if (carray) {
3594 if (size > INT_MAX) {
3595 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3596 return pchar_descriptor ?
3597 SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3598 } else {
3599 #if PY_VERSION_HEX >= 0x03000000
3600 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3601 return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3602 #else
3603 return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
3604 #endif
3605 #else
3606 return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3607 #endif
3608 }
3609 } else {
3610 return SWIG_Py_Void();
3611 }
3612 }
3613
3614
3615 SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject * obj,char ** cptr,size_t * psize,int * alloc)3616 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3617 {
3618 #if PY_VERSION_HEX>=0x03000000
3619 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3620 if (PyBytes_Check(obj))
3621 #else
3622 if (PyUnicode_Check(obj))
3623 #endif
3624 #else
3625 if (PyString_Check(obj))
3626 #endif
3627 {
3628 char *cstr; Py_ssize_t len;
3629 int ret = SWIG_OK;
3630 #if PY_VERSION_HEX>=0x03000000
3631 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3632 if (!alloc && cptr) {
3633 /* We can't allow converting without allocation, since the internal
3634 representation of string in Python 3 is UCS-2/UCS-4 but we require
3635 a UTF-8 representation.
3636 TODO(bhy) More detailed explanation */
3637 return SWIG_RuntimeError;
3638 }
3639 obj = PyUnicode_AsUTF8String(obj);
3640 if (!obj)
3641 return SWIG_TypeError;
3642 if (alloc)
3643 *alloc = SWIG_NEWOBJ;
3644 #endif
3645 if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
3646 return SWIG_TypeError;
3647 #else
3648 if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
3649 return SWIG_TypeError;
3650 #endif
3651 if (cptr) {
3652 if (alloc) {
3653 if (*alloc == SWIG_NEWOBJ) {
3654 *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3655 *alloc = SWIG_NEWOBJ;
3656 } else {
3657 *cptr = cstr;
3658 *alloc = SWIG_OLDOBJ;
3659 }
3660 } else {
3661 #if PY_VERSION_HEX>=0x03000000
3662 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3663 *cptr = PyBytes_AsString(obj);
3664 #else
3665 assert(0); /* Should never reach here with Unicode strings in Python 3 */
3666 #endif
3667 #else
3668 *cptr = SWIG_Python_str_AsChar(obj);
3669 if (!*cptr)
3670 ret = SWIG_TypeError;
3671 #endif
3672 }
3673 }
3674 if (psize) *psize = len + 1;
3675 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3676 Py_XDECREF(obj);
3677 #endif
3678 return ret;
3679 } else {
3680 #if defined(SWIG_PYTHON_2_UNICODE)
3681 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3682 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3683 #endif
3684 #if PY_VERSION_HEX<0x03000000
3685 if (PyUnicode_Check(obj)) {
3686 char *cstr; Py_ssize_t len;
3687 if (!alloc && cptr) {
3688 return SWIG_RuntimeError;
3689 }
3690 obj = PyUnicode_AsUTF8String(obj);
3691 if (!obj)
3692 return SWIG_TypeError;
3693 if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3694 if (cptr) {
3695 if (alloc) *alloc = SWIG_NEWOBJ;
3696 *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3697 }
3698 if (psize) *psize = len + 1;
3699
3700 Py_XDECREF(obj);
3701 return SWIG_OK;
3702 } else {
3703 Py_XDECREF(obj);
3704 }
3705 }
3706 #endif
3707 #endif
3708
3709 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3710 if (pchar_descriptor) {
3711 void* vptr = 0;
3712 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3713 if (cptr) *cptr = (char *) vptr;
3714 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3715 if (alloc) *alloc = SWIG_OLDOBJ;
3716 return SWIG_OK;
3717 }
3718 }
3719 }
3720 return SWIG_TypeError;
3721 }
3722
3723
3724 /** @file version.i.in
3725 * @brief Set RNA.__version__ to the bindings version
3726 */
3727
3728
3729 #include <typeinfo>
3730 #include <stdexcept>
3731
3732
3733 #if defined(__GNUC__)
3734 # if __GNUC__ == 2 && __GNUC_MINOR <= 96
3735 # define SWIG_STD_NOMODERN_STL
3736 # endif
3737 #endif
3738
3739
3740 #include <string>
3741
3742
3743 #include <stddef.h>
3744
3745
3746 #include <utility>
3747
3748
3749 #include <iostream>
3750
3751 #if PY_VERSION_HEX >= 0x03020000
3752 # define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
3753 #else
3754 # define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
3755 #endif
3756
3757
3758 namespace swig {
3759 struct stop_iteration {
3760 };
3761
3762 struct SwigPyIterator {
3763 private:
3764 SwigPtr_PyObject _seq;
3765
3766 protected:
SwigPyIteratorswig::SwigPyIterator3767 SwigPyIterator(PyObject *seq) : _seq(seq)
3768 {
3769 }
3770
3771 public:
~SwigPyIteratorswig::SwigPyIterator3772 virtual ~SwigPyIterator() {}
3773
3774 // Access iterator method, required by Python
3775 virtual PyObject *value() const = 0;
3776
3777 // Forward iterator method, required by Python
3778 virtual SwigPyIterator *incr(size_t n = 1) = 0;
3779
3780 // Backward iterator method, very common in C++, but not required in Python
decrswig::SwigPyIterator3781 virtual SwigPyIterator *decr(size_t /*n*/ = 1)
3782 {
3783 throw stop_iteration();
3784 }
3785
3786 // Random access iterator methods, but not required in Python
distanceswig::SwigPyIterator3787 virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
3788 {
3789 throw std::invalid_argument("operation not supported");
3790 }
3791
equalswig::SwigPyIterator3792 virtual bool equal (const SwigPyIterator &/*x*/) const
3793 {
3794 throw std::invalid_argument("operation not supported");
3795 }
3796
3797 // C++ common/needed methods
3798 virtual SwigPyIterator *copy() const = 0;
3799
nextswig::SwigPyIterator3800 PyObject *next()
3801 {
3802 SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
3803 PyObject *obj = value();
3804 incr();
3805 SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
3806 return obj;
3807 }
3808
3809 /* Make an alias for Python 3.x */
__next__swig::SwigPyIterator3810 PyObject *__next__()
3811 {
3812 return next();
3813 }
3814
previousswig::SwigPyIterator3815 PyObject *previous()
3816 {
3817 SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads
3818 decr();
3819 PyObject *obj = value();
3820 SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
3821 return obj;
3822 }
3823
advanceswig::SwigPyIterator3824 SwigPyIterator *advance(ptrdiff_t n)
3825 {
3826 return (n > 0) ? incr(n) : decr(-n);
3827 }
3828
operator ==swig::SwigPyIterator3829 bool operator == (const SwigPyIterator& x) const
3830 {
3831 return equal(x);
3832 }
3833
operator !=swig::SwigPyIterator3834 bool operator != (const SwigPyIterator& x) const
3835 {
3836 return ! operator==(x);
3837 }
3838
operator +=swig::SwigPyIterator3839 SwigPyIterator& operator += (ptrdiff_t n)
3840 {
3841 return *advance(n);
3842 }
3843
operator -=swig::SwigPyIterator3844 SwigPyIterator& operator -= (ptrdiff_t n)
3845 {
3846 return *advance(-n);
3847 }
3848
operator +swig::SwigPyIterator3849 SwigPyIterator* operator + (ptrdiff_t n) const
3850 {
3851 return copy()->advance(n);
3852 }
3853
operator -swig::SwigPyIterator3854 SwigPyIterator* operator - (ptrdiff_t n) const
3855 {
3856 return copy()->advance(-n);
3857 }
3858
operator -swig::SwigPyIterator3859 ptrdiff_t operator - (const SwigPyIterator& x) const
3860 {
3861 return x.distance(*this);
3862 }
3863
descriptorswig::SwigPyIterator3864 static swig_type_info* descriptor() {
3865 static int init = 0;
3866 static swig_type_info* desc = 0;
3867 if (!init) {
3868 desc = SWIG_TypeQuery("swig::SwigPyIterator *");
3869 init = 1;
3870 }
3871 return desc;
3872 }
3873 };
3874
3875 #if defined(SWIGPYTHON_BUILTIN)
make_output_iterator_builtin(PyObject * pyself)3876 inline PyObject* make_output_iterator_builtin (PyObject *pyself)
3877 {
3878 Py_INCREF(pyself);
3879 return pyself;
3880 }
3881 #endif
3882 }
3883
3884
3885 #ifdef SWIG_LONG_LONG_AVAILABLE
3886 SWIGINTERNINLINE PyObject*
SWIG_From_long_SS_long(long long value)3887 SWIG_From_long_SS_long (long long value)
3888 {
3889 return ((value < LONG_MIN) || (value > LONG_MAX)) ?
3890 PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value));
3891 }
3892 #endif
3893
3894
3895 SWIGINTERNINLINE PyObject *
SWIG_From_ptrdiff_t(ptrdiff_t value)3896 SWIG_From_ptrdiff_t (ptrdiff_t value)
3897 {
3898 #ifdef SWIG_LONG_LONG_AVAILABLE
3899 if (sizeof(ptrdiff_t) <= sizeof(long)) {
3900 #endif
3901 return SWIG_From_long (static_cast< long >(value));
3902 #ifdef SWIG_LONG_LONG_AVAILABLE
3903 } else {
3904 /* assume sizeof(ptrdiff_t) <= sizeof(long long) */
3905 return SWIG_From_long_SS_long (static_cast< long long >(value));
3906 }
3907 #endif
3908 }
3909
3910
3911 SWIGINTERNINLINE PyObject*
SWIG_From_bool(bool value)3912 SWIG_From_bool (bool value)
3913 {
3914 return PyBool_FromLong(value ? 1 : 0);
3915 }
3916
3917
3918 #ifdef SWIG_LONG_LONG_AVAILABLE
3919 SWIGINTERN int
SWIG_AsVal_long_SS_long(PyObject * obj,long long * val)3920 SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
3921 {
3922 int res = SWIG_TypeError;
3923 if (PyLong_Check(obj)) {
3924 long long v = PyLong_AsLongLong(obj);
3925 if (!PyErr_Occurred()) {
3926 if (val) *val = v;
3927 return SWIG_OK;
3928 } else {
3929 PyErr_Clear();
3930 res = SWIG_OverflowError;
3931 }
3932 } else {
3933 long v;
3934 res = SWIG_AsVal_long (obj,&v);
3935 if (SWIG_IsOK(res)) {
3936 if (val) *val = v;
3937 return res;
3938 }
3939 }
3940 #ifdef SWIG_PYTHON_CAST_MODE
3941 {
3942 const double mant_max = 1LL << DBL_MANT_DIG;
3943 const double mant_min = -mant_max;
3944 double d;
3945 res = SWIG_AsVal_double (obj,&d);
3946 if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max))
3947 return SWIG_OverflowError;
3948 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
3949 if (val) *val = (long long)(d);
3950 return SWIG_AddCast(res);
3951 }
3952 res = SWIG_TypeError;
3953 }
3954 #endif
3955 return res;
3956 }
3957 #endif
3958
3959
3960 SWIGINTERNINLINE int
SWIG_AsVal_ptrdiff_t(PyObject * obj,ptrdiff_t * val)3961 SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
3962 {
3963 int res = SWIG_TypeError;
3964 #ifdef SWIG_LONG_LONG_AVAILABLE
3965 if (sizeof(ptrdiff_t) <= sizeof(long)) {
3966 #endif
3967 long v;
3968 res = SWIG_AsVal_long (obj, val ? &v : 0);
3969 if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
3970 #ifdef SWIG_LONG_LONG_AVAILABLE
3971 } else if (sizeof(ptrdiff_t) <= sizeof(long long)) {
3972 long long v;
3973 res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0);
3974 if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
3975 }
3976 #endif
3977 return res;
3978 }
3979
3980
3981 #include <algorithm>
3982
3983
3984 #include <vector>
3985
3986
3987 namespace swig {
3988 template <class Type>
3989 struct noconst_traits {
3990 typedef Type noconst_type;
3991 };
3992
3993 template <class Type>
3994 struct noconst_traits<const Type> {
3995 typedef Type noconst_type;
3996 };
3997
3998 /*
3999 type categories
4000 */
4001 struct pointer_category { };
4002 struct value_category { };
4003
4004 /*
4005 General traits that provides type_name and type_info
4006 */
4007 template <class Type> struct traits { };
4008
4009 template <class Type>
type_name()4010 inline const char* type_name() {
4011 return traits<typename noconst_traits<Type >::noconst_type >::type_name();
4012 }
4013
4014 template <class Type> struct traits_info {
type_queryswig::traits_info4015 static swig_type_info *type_query(std::string name) {
4016 name += " *";
4017 return SWIG_TypeQuery(name.c_str());
4018 }
type_infoswig::traits_info4019 static swig_type_info *type_info() {
4020 static swig_type_info *info = type_query(type_name<Type>());
4021 return info;
4022 }
4023 };
4024
4025 /*
4026 Partial specialization for pointers (traits_info)
4027 */
4028 template <class Type> struct traits_info<Type *> {
type_queryswig::traits_info4029 static swig_type_info *type_query(std::string name) {
4030 name += " *";
4031 return SWIG_TypeQuery(name.c_str());
4032 }
type_infoswig::traits_info4033 static swig_type_info *type_info() {
4034 static swig_type_info *info = type_query(type_name<Type>());
4035 return info;
4036 }
4037 };
4038
4039 template <class Type>
type_info()4040 inline swig_type_info *type_info() {
4041 return traits_info<Type>::type_info();
4042 }
4043
4044 /*
4045 Partial specialization for pointers (traits)
4046 */
4047 template <class Type> struct traits <Type *> {
4048 typedef pointer_category category;
make_ptr_nameswig::traits4049 static std::string make_ptr_name(const char* name) {
4050 std::string ptrname = name;
4051 ptrname += " *";
4052 return ptrname;
4053 }
type_nameswig::traits4054 static const char* type_name() {
4055 static std::string name = make_ptr_name(swig::type_name<Type>());
4056 return name.c_str();
4057 }
4058 };
4059
4060 template <class Type, class Category>
4061 struct traits_as { };
4062
4063 template <class Type, class Category>
4064 struct traits_check { };
4065
4066 }
4067
4068
4069 namespace swig {
4070 /*
4071 Traits that provides the from method
4072 */
4073 template <class Type> struct traits_from_ptr {
fromswig::traits_from_ptr4074 static PyObject *from(Type *val, int owner = 0) {
4075 return SWIG_InternalNewPointerObj(val, type_info<Type>(), owner);
4076 }
4077 };
4078
4079 template <class Type> struct traits_from {
fromswig::traits_from4080 static PyObject *from(const Type& val) {
4081 return traits_from_ptr<Type>::from(new Type(val), 1);
4082 }
4083 };
4084
4085 template <class Type> struct traits_from<Type *> {
fromswig::traits_from4086 static PyObject *from(Type* val) {
4087 return traits_from_ptr<Type>::from(val, 0);
4088 }
4089 };
4090
4091 template <class Type> struct traits_from<const Type *> {
fromswig::traits_from4092 static PyObject *from(const Type* val) {
4093 return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
4094 }
4095 };
4096
4097
4098 template <class Type>
from(const Type & val)4099 inline PyObject *from(const Type& val) {
4100 return traits_from<Type>::from(val);
4101 }
4102
4103 template <class Type>
from_ptr(Type * val,int owner)4104 inline PyObject *from_ptr(Type* val, int owner) {
4105 return traits_from_ptr<Type>::from(val, owner);
4106 }
4107
4108 /*
4109 Traits that provides the asval/as/check method
4110 */
4111 template <class Type>
4112 struct traits_asptr {
asptrswig::traits_asptr4113 static int asptr(PyObject *obj, Type **val) {
4114 int res = SWIG_ERROR;
4115 swig_type_info *descriptor = type_info<Type>();
4116 if (val) {
4117 Type *p = 0;
4118 int newmem = 0;
4119 res = descriptor ? SWIG_ConvertPtrAndOwn(obj, (void **)&p, descriptor, 0, &newmem) : SWIG_ERROR;
4120 if (SWIG_IsOK(res)) {
4121 if (newmem & SWIG_CAST_NEW_MEMORY) {
4122 res |= SWIG_NEWOBJMASK;
4123 }
4124 *val = p;
4125 }
4126 } else {
4127 res = descriptor ? SWIG_ConvertPtr(obj, 0, descriptor, 0) : SWIG_ERROR;
4128 }
4129 return res;
4130 }
4131 };
4132
4133 template <class Type>
asptr(PyObject * obj,Type ** vptr)4134 inline int asptr(PyObject *obj, Type **vptr) {
4135 return traits_asptr<Type>::asptr(obj, vptr);
4136 }
4137
4138 template <class Type>
4139 struct traits_asval {
asvalswig::traits_asval4140 static int asval(PyObject *obj, Type *val) {
4141 if (val) {
4142 Type *p = 0;
4143 int res = traits_asptr<Type>::asptr(obj, &p);
4144 if (!SWIG_IsOK(res)) return res;
4145 if (p) {
4146 typedef typename noconst_traits<Type>::noconst_type noconst_type;
4147 *(const_cast<noconst_type*>(val)) = *p;
4148 if (SWIG_IsNewObj(res)){
4149 delete p;
4150 res = SWIG_DelNewMask(res);
4151 }
4152 return res;
4153 } else {
4154 return SWIG_ERROR;
4155 }
4156 } else {
4157 return traits_asptr<Type>::asptr(obj, (Type **)(0));
4158 }
4159 }
4160 };
4161
4162 template <class Type> struct traits_asval<Type*> {
asvalswig::traits_asval4163 static int asval(PyObject *obj, Type **val) {
4164 if (val) {
4165 typedef typename noconst_traits<Type>::noconst_type noconst_type;
4166 noconst_type *p = 0;
4167 int res = traits_asptr<noconst_type>::asptr(obj, &p);
4168 if (SWIG_IsOK(res)) {
4169 *(const_cast<noconst_type**>(val)) = p;
4170 }
4171 return res;
4172 } else {
4173 return traits_asptr<Type>::asptr(obj, (Type **)(0));
4174 }
4175 }
4176 };
4177
4178 template <class Type>
asval(PyObject * obj,Type * val)4179 inline int asval(PyObject *obj, Type *val) {
4180 return traits_asval<Type>::asval(obj, val);
4181 }
4182
4183 template <class Type>
4184 struct traits_as<Type, value_category> {
asswig::traits_as4185 static Type as(PyObject *obj) {
4186 Type v;
4187 int res = asval(obj, &v);
4188 if (!obj || !SWIG_IsOK(res)) {
4189 if (!PyErr_Occurred()) {
4190 ::SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
4191 }
4192 throw std::invalid_argument("bad type");
4193 }
4194 return v;
4195 }
4196 };
4197
4198 template <class Type>
4199 struct traits_as<Type, pointer_category> {
asswig::traits_as4200 static Type as(PyObject *obj) {
4201 Type *v = 0;
4202 int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
4203 if (SWIG_IsOK(res) && v) {
4204 if (SWIG_IsNewObj(res)) {
4205 Type r(*v);
4206 delete v;
4207 return r;
4208 } else {
4209 return *v;
4210 }
4211 } else {
4212 if (!PyErr_Occurred()) {
4213 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
4214 }
4215 throw std::invalid_argument("bad type");
4216 }
4217 }
4218 };
4219
4220 template <class Type>
4221 struct traits_as<Type*, pointer_category> {
asswig::traits_as4222 static Type* as(PyObject *obj) {
4223 Type *v = 0;
4224 int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
4225 if (SWIG_IsOK(res)) {
4226 return v;
4227 } else {
4228 if (!PyErr_Occurred()) {
4229 SWIG_Error(SWIG_TypeError, swig::type_name<Type>());
4230 }
4231 throw std::invalid_argument("bad type");
4232 }
4233 }
4234 };
4235
4236 template <class Type>
as(PyObject * obj)4237 inline Type as(PyObject *obj) {
4238 return traits_as<Type, typename traits<Type>::category>::as(obj);
4239 }
4240
4241 template <class Type>
4242 struct traits_check<Type, value_category> {
checkswig::traits_check4243 static bool check(PyObject *obj) {
4244 int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
4245 return SWIG_IsOK(res) ? true : false;
4246 }
4247 };
4248
4249 template <class Type>
4250 struct traits_check<Type, pointer_category> {
checkswig::traits_check4251 static bool check(PyObject *obj) {
4252 int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
4253 return SWIG_IsOK(res) ? true : false;
4254 }
4255 };
4256
4257 template <class Type>
check(PyObject * obj)4258 inline bool check(PyObject *obj) {
4259 return traits_check<Type, typename traits<Type>::category>::check(obj);
4260 }
4261 }
4262
4263
4264 namespace swig {
4265 template <> struct traits< double > {
4266 typedef value_category category;
type_nameswig::traits4267 static const char* type_name() { return"double"; }
4268 };
4269 template <> struct traits_asval< double > {
4270 typedef double value_type;
asvalswig::traits_asval4271 static int asval(PyObject *obj, value_type *val) {
4272 return SWIG_AsVal_double (obj, val);
4273 }
4274 };
4275 template <> struct traits_from< double > {
4276 typedef double value_type;
fromswig::traits_from4277 static PyObject *from(const value_type& val) {
4278 return SWIG_From_double (val);
4279 }
4280 };
4281 }
4282
4283
4284 namespace swig {
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335 template <class T, class U >
4336 struct traits_asptr<std::pair<T,U> > {
4337 typedef std::pair<T,U> value_type;
4338
get_pairswig::traits_asptr4339 static int get_pair(PyObject* first, PyObject* second,
4340 std::pair<T,U> **val)
4341 {
4342 if (val) {
4343 value_type *vp = (new std::pair<T,U>());
4344 T *pfirst = &(vp->first);
4345 int res1 = swig::asval((PyObject*)first, pfirst);
4346 if (!SWIG_IsOK(res1)) {
4347 delete vp;
4348 return res1;
4349 }
4350 U *psecond = &(vp->second);
4351 int res2 = swig::asval((PyObject*)second, psecond);
4352 if (!SWIG_IsOK(res2)) {
4353 delete vp;
4354 return res2;
4355 }
4356 *val = vp;
4357 return SWIG_AddNewMask(res1 > res2 ? res1 : res2);
4358 } else {
4359 T *pfirst = 0;
4360 int res1 = swig::asval((PyObject*)first, pfirst);
4361 if (!SWIG_IsOK(res1)) return res1;
4362 U *psecond = 0;
4363 int res2 = swig::asval((PyObject*)second, psecond);
4364 if (!SWIG_IsOK(res2)) return res2;
4365 return res1 > res2 ? res1 : res2;
4366 }
4367 }
4368
asptrswig::traits_asptr4369 static int asptr(PyObject *obj, std::pair<T,U> **val) {
4370 int res = SWIG_ERROR;
4371 if (PyTuple_Check(obj)) {
4372 if (PyTuple_GET_SIZE(obj) == 2) {
4373 res = get_pair(PyTuple_GET_ITEM(obj,0),PyTuple_GET_ITEM(obj,1), val);
4374 }
4375 } else if (PySequence_Check(obj)) {
4376 if (PySequence_Size(obj) == 2) {
4377 swig::SwigVar_PyObject first = PySequence_GetItem(obj,0);
4378 swig::SwigVar_PyObject second = PySequence_GetItem(obj,1);
4379 res = get_pair(first, second, val);
4380 }
4381 } else {
4382 value_type *p = 0;
4383 swig_type_info *descriptor = swig::type_info<value_type>();
4384 res = descriptor ? SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0) : SWIG_ERROR;
4385 if (SWIG_IsOK(res) && val) *val = p;
4386 }
4387 return res;
4388 }
4389 };
4390
4391
4392 template <class T, class U >
4393 struct traits_from<std::pair<T,U> > {
fromswig::traits_from4394 static PyObject *from(const std::pair<T,U>& val) {
4395 PyObject* obj = PyTuple_New(2);
4396 PyTuple_SetItem(obj,0,swig::from(val.first));
4397 PyTuple_SetItem(obj,1,swig::from(val.second));
4398 return obj;
4399 }
4400 };
4401 }
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439 namespace swig {
4440 template <> struct traits<std::pair< double, double > > {
4441 typedef pointer_category category;
type_nameswig::traits4442 static const char* type_name() {
4443 return "std::pair<" "double" "," "double" " >";
4444 }
4445 };
4446 }
4447
4448
4449 #include <functional>
4450
4451 namespace std {
4452 template <>
4453 struct less <PyObject *>
4454 {
4455 bool
operator ()std::less4456 operator()(PyObject * v, PyObject *w) const
4457 {
4458 bool res;
4459 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
4460 res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false;
4461 /* This may fall into a case of inconsistent
4462 eg. ObjA > ObjX > ObjB
4463 but ObjA < ObjB
4464 */
4465 if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) )
4466 {
4467 /* Objects can't be compared, this mostly occurred in Python 3.0 */
4468 /* Compare their ptr directly for a workaround */
4469 res = (v < w);
4470 PyErr_Clear();
4471 }
4472 SWIG_PYTHON_THREAD_END_BLOCK;
4473 return res;
4474 }
4475 };
4476
4477 template <>
4478 struct less <swig::SwigPtr_PyObject>
4479 {
4480 bool
operator ()std::less4481 operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const
4482 {
4483 return std::less<PyObject *>()(v, w);
4484 }
4485 };
4486
4487 template <>
4488 struct less <swig::SwigVar_PyObject>
4489 {
4490 bool
operator ()std::less4491 operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const
4492 {
4493 return std::less<PyObject *>()(v, w);
4494 }
4495 };
4496
4497 }
4498
4499 namespace swig {
4500 template <> struct traits<PyObject *> {
4501 typedef value_category category;
type_nameswig::traits4502 static const char* type_name() { return "PyObject *"; }
4503 };
4504
4505 template <> struct traits_asval<PyObject * > {
4506 typedef PyObject * value_type;
asvalswig::traits_asval4507 static int asval(PyObject *obj, value_type *val) {
4508 if (val) *val = obj;
4509 return SWIG_OK;
4510 }
4511 };
4512
4513 template <>
4514 struct traits_check<PyObject *, value_category> {
checkswig::traits_check4515 static bool check(PyObject *) {
4516 return true;
4517 }
4518 };
4519
4520 template <> struct traits_from<PyObject *> {
4521 typedef PyObject * value_type;
fromswig::traits_from4522 static PyObject *from(const value_type& val) {
4523 Py_XINCREF(val);
4524 return val;
4525 }
4526 };
4527
4528 }
4529
4530 namespace swig {
4531 template <class Difference>
4532 inline size_t
check_index(Difference i,size_t size,bool insert=false)4533 check_index(Difference i, size_t size, bool insert = false) {
4534 if ( i < 0 ) {
4535 if ((size_t) (-i) <= size)
4536 return (size_t) (i + size);
4537 } else if ( (size_t) i < size ) {
4538 return (size_t) i;
4539 } else if (insert && ((size_t) i == size)) {
4540 return size;
4541 }
4542 throw std::out_of_range("index out of range");
4543 }
4544
4545 template <class Difference>
4546 void
slice_adjust(Difference i,Difference j,Py_ssize_t step,size_t size,Difference & ii,Difference & jj,bool insert=false)4547 slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) {
4548 if (step == 0) {
4549 throw std::invalid_argument("slice step cannot be zero");
4550 } else if (step > 0) {
4551 // Required range: 0 <= i < size, 0 <= j < size, i <= j
4552 if (i < 0) {
4553 ii = 0;
4554 } else if (i < (Difference)size) {
4555 ii = i;
4556 } else if (insert && (i >= (Difference)size)) {
4557 ii = (Difference)size;
4558 }
4559 if (j < 0) {
4560 jj = 0;
4561 } else {
4562 jj = (j < (Difference)size) ? j : (Difference)size;
4563 }
4564 if (jj < ii)
4565 jj = ii;
4566 } else {
4567 // Required range: -1 <= i < size-1, -1 <= j < size-1, i >= j
4568 if (i < -1) {
4569 ii = -1;
4570 } else if (i < (Difference) size) {
4571 ii = i;
4572 } else if (i >= (Difference)(size-1)) {
4573 ii = (Difference)(size-1);
4574 }
4575 if (j < -1) {
4576 jj = -1;
4577 } else {
4578 jj = (j < (Difference)size ) ? j : (Difference)(size-1);
4579 }
4580 if (ii < jj)
4581 ii = jj;
4582 }
4583 }
4584
4585 template <class Sequence, class Difference>
4586 inline typename Sequence::iterator
getpos(Sequence * self,Difference i)4587 getpos(Sequence* self, Difference i) {
4588 typename Sequence::iterator pos = self->begin();
4589 std::advance(pos, check_index(i,self->size()));
4590 return pos;
4591 }
4592
4593 template <class Sequence, class Difference>
4594 inline typename Sequence::const_iterator
cgetpos(const Sequence * self,Difference i)4595 cgetpos(const Sequence* self, Difference i) {
4596 typename Sequence::const_iterator pos = self->begin();
4597 std::advance(pos, check_index(i,self->size()));
4598 return pos;
4599 }
4600
4601 template <class Sequence>
4602 inline void
erase(Sequence * seq,const typename Sequence::iterator & position)4603 erase(Sequence* seq, const typename Sequence::iterator& position) {
4604 seq->erase(position);
4605 }
4606
4607 template <class Sequence>
4608 struct traits_reserve {
reserveswig::traits_reserve4609 static void reserve(Sequence & /*seq*/, typename Sequence::size_type /*n*/) {
4610 // This should be specialized for types that support reserve
4611 }
4612 };
4613
4614 template <class Sequence, class Difference>
4615 inline Sequence*
getslice(const Sequence * self,Difference i,Difference j,Py_ssize_t step)4616 getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) {
4617 typename Sequence::size_type size = self->size();
4618 Difference ii = 0;
4619 Difference jj = 0;
4620 swig::slice_adjust(i, j, step, size, ii, jj);
4621
4622 if (step > 0) {
4623 typename Sequence::const_iterator sb = self->begin();
4624 typename Sequence::const_iterator se = self->begin();
4625 std::advance(sb,ii);
4626 std::advance(se,jj);
4627 if (step == 1) {
4628 return new Sequence(sb, se);
4629 } else {
4630 Sequence *sequence = new Sequence();
4631 swig::traits_reserve<Sequence>::reserve(*sequence, (jj - ii + step - 1) / step);
4632 typename Sequence::const_iterator it = sb;
4633 while (it!=se) {
4634 sequence->push_back(*it);
4635 for (Py_ssize_t c=0; c<step && it!=se; ++c)
4636 it++;
4637 }
4638 return sequence;
4639 }
4640 } else {
4641 Sequence *sequence = new Sequence();
4642 swig::traits_reserve<Sequence>::reserve(*sequence, (ii - jj - step - 1) / -step);
4643 typename Sequence::const_reverse_iterator sb = self->rbegin();
4644 typename Sequence::const_reverse_iterator se = self->rbegin();
4645 std::advance(sb,size-ii-1);
4646 std::advance(se,size-jj-1);
4647 typename Sequence::const_reverse_iterator it = sb;
4648 while (it!=se) {
4649 sequence->push_back(*it);
4650 for (Py_ssize_t c=0; c<-step && it!=se; ++c)
4651 it++;
4652 }
4653 return sequence;
4654 }
4655 }
4656
4657 template <class Sequence, class Difference, class InputSeq>
4658 inline void
setslice(Sequence * self,Difference i,Difference j,Py_ssize_t step,const InputSeq & is=InputSeq ())4659 setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) {
4660 typename Sequence::size_type size = self->size();
4661 Difference ii = 0;
4662 Difference jj = 0;
4663 swig::slice_adjust(i, j, step, size, ii, jj, true);
4664 if (step > 0) {
4665 if (step == 1) {
4666 size_t ssize = jj - ii;
4667 if (ssize <= is.size()) {
4668 // expanding/staying the same size
4669 swig::traits_reserve<Sequence>::reserve(*self, self->size() - ssize + is.size());
4670 typename Sequence::iterator sb = self->begin();
4671 typename InputSeq::const_iterator isit = is.begin();
4672 std::advance(sb,ii);
4673 std::advance(isit, jj - ii);
4674 self->insert(std::copy(is.begin(), isit, sb), isit, is.end());
4675 } else {
4676 // shrinking
4677 typename Sequence::iterator sb = self->begin();
4678 typename Sequence::iterator se = self->begin();
4679 std::advance(sb,ii);
4680 std::advance(se,jj);
4681 self->erase(sb,se);
4682 sb = self->begin();
4683 std::advance(sb,ii);
4684 self->insert(sb, is.begin(), is.end());
4685 }
4686 } else {
4687 size_t replacecount = (jj - ii + step - 1) / step;
4688 if (is.size() != replacecount) {
4689 char msg[1024];
4690 sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
4691 throw std::invalid_argument(msg);
4692 }
4693 typename Sequence::const_iterator isit = is.begin();
4694 typename Sequence::iterator it = self->begin();
4695 std::advance(it,ii);
4696 for (size_t rc=0; rc<replacecount && it != self->end(); ++rc) {
4697 *it++ = *isit++;
4698 for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
4699 it++;
4700 }
4701 }
4702 } else {
4703 size_t replacecount = (ii - jj - step - 1) / -step;
4704 if (is.size() != replacecount) {
4705 char msg[1024];
4706 sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
4707 throw std::invalid_argument(msg);
4708 }
4709 typename Sequence::const_iterator isit = is.begin();
4710 typename Sequence::reverse_iterator it = self->rbegin();
4711 std::advance(it,size-ii-1);
4712 for (size_t rc=0; rc<replacecount && it != self->rend(); ++rc) {
4713 *it++ = *isit++;
4714 for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
4715 it++;
4716 }
4717 }
4718 }
4719
4720 template <class Sequence, class Difference>
4721 inline void
delslice(Sequence * self,Difference i,Difference j,Py_ssize_t step)4722 delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) {
4723 typename Sequence::size_type size = self->size();
4724 Difference ii = 0;
4725 Difference jj = 0;
4726 swig::slice_adjust(i, j, step, size, ii, jj, true);
4727 if (step > 0) {
4728 typename Sequence::iterator sb = self->begin();
4729 std::advance(sb,ii);
4730 if (step == 1) {
4731 typename Sequence::iterator se = self->begin();
4732 std::advance(se,jj);
4733 self->erase(sb,se);
4734 } else {
4735 typename Sequence::iterator it = sb;
4736 size_t delcount = (jj - ii + step - 1) / step;
4737 while (delcount) {
4738 it = self->erase(it);
4739 for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
4740 it++;
4741 delcount--;
4742 }
4743 }
4744 } else {
4745 typename Sequence::reverse_iterator sb = self->rbegin();
4746 std::advance(sb,size-ii-1);
4747 typename Sequence::reverse_iterator it = sb;
4748 size_t delcount = (ii - jj - step - 1) / -step;
4749 while (delcount) {
4750 it = typename Sequence::reverse_iterator(self->erase((++it).base()));
4751 for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
4752 it++;
4753 delcount--;
4754 }
4755 }
4756 }
4757 }
4758
4759
4760 #if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
4761 # if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
4762 # define SWIG_STD_NOITERATOR_TRAITS_STL
4763 # endif
4764 #endif
4765
4766 #if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
4767 #include <iterator>
4768 #else
4769 namespace std {
4770 template <class Iterator>
4771 struct iterator_traits {
4772 typedef ptrdiff_t difference_type;
4773 typedef typename Iterator::value_type value_type;
4774 };
4775
4776 template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
4777 struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
4778 typedef Distance difference_type;
4779 typedef T value_type;
4780 };
4781
4782 template <class T>
4783 struct iterator_traits<T*> {
4784 typedef T value_type;
4785 typedef ptrdiff_t difference_type;
4786 };
4787
4788 template<typename _InputIterator>
4789 inline typename iterator_traits<_InputIterator>::difference_type
distance(_InputIterator __first,_InputIterator __last)4790 distance(_InputIterator __first, _InputIterator __last)
4791 {
4792 typename iterator_traits<_InputIterator>::difference_type __n = 0;
4793 while (__first != __last) {
4794 ++__first; ++__n;
4795 }
4796 return __n;
4797 }
4798 }
4799 #endif
4800
4801
4802 namespace swig {
4803 template<typename OutIterator>
4804 class SwigPyIterator_T : public SwigPyIterator
4805 {
4806 public:
4807 typedef OutIterator out_iterator;
4808 typedef typename std::iterator_traits<out_iterator>::value_type value_type;
4809 typedef SwigPyIterator_T<out_iterator> self_type;
4810
SwigPyIterator_T(out_iterator curr,PyObject * seq)4811 SwigPyIterator_T(out_iterator curr, PyObject *seq)
4812 : SwigPyIterator(seq), current(curr)
4813 {
4814 }
4815
get_current() const4816 const out_iterator& get_current() const
4817 {
4818 return current;
4819 }
4820
4821
equal(const SwigPyIterator & iter) const4822 bool equal (const SwigPyIterator &iter) const
4823 {
4824 const self_type *iters = dynamic_cast<const self_type *>(&iter);
4825 if (iters) {
4826 return (current == iters->get_current());
4827 } else {
4828 throw std::invalid_argument("bad iterator type");
4829 }
4830 }
4831
distance(const SwigPyIterator & iter) const4832 ptrdiff_t distance(const SwigPyIterator &iter) const
4833 {
4834 const self_type *iters = dynamic_cast<const self_type *>(&iter);
4835 if (iters) {
4836 return std::distance(current, iters->get_current());
4837 } else {
4838 throw std::invalid_argument("bad iterator type");
4839 }
4840 }
4841
4842 protected:
4843 out_iterator current;
4844 };
4845
4846 template <class ValueType>
4847 struct from_oper
4848 {
4849 typedef const ValueType& argument_type;
4850 typedef PyObject *result_type;
operator ()swig::from_oper4851 result_type operator()(argument_type v) const
4852 {
4853 return swig::from(v);
4854 }
4855 };
4856
4857 template<typename OutIterator,
4858 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4859 typename FromOper = from_oper<ValueType> >
4860 class SwigPyForwardIteratorOpen_T : public SwigPyIterator_T<OutIterator>
4861 {
4862 public:
4863 FromOper from;
4864 typedef OutIterator out_iterator;
4865 typedef ValueType value_type;
4866 typedef SwigPyIterator_T<out_iterator> base;
4867 typedef SwigPyForwardIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
4868
SwigPyForwardIteratorOpen_T(out_iterator curr,PyObject * seq)4869 SwigPyForwardIteratorOpen_T(out_iterator curr, PyObject *seq)
4870 : SwigPyIterator_T<OutIterator>(curr, seq)
4871 {
4872 }
4873
value() const4874 PyObject *value() const {
4875 return from(static_cast<const value_type&>(*(base::current)));
4876 }
4877
copy() const4878 SwigPyIterator *copy() const
4879 {
4880 return new self_type(*this);
4881 }
4882
incr(size_t n=1)4883 SwigPyIterator *incr(size_t n = 1)
4884 {
4885 while (n--) {
4886 ++base::current;
4887 }
4888 return this;
4889 }
4890
4891 };
4892
4893 template<typename OutIterator,
4894 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4895 typename FromOper = from_oper<ValueType> >
4896 class SwigPyIteratorOpen_T : public SwigPyForwardIteratorOpen_T<OutIterator, ValueType, FromOper>
4897 {
4898 public:
4899 FromOper from;
4900 typedef OutIterator out_iterator;
4901 typedef ValueType value_type;
4902 typedef SwigPyIterator_T<out_iterator> base;
4903 typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
4904
SwigPyIteratorOpen_T(out_iterator curr,PyObject * seq)4905 SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
4906 : SwigPyForwardIteratorOpen_T<OutIterator>(curr, seq)
4907 {
4908 }
4909
decr(size_t n=1)4910 SwigPyIterator *decr(size_t n = 1)
4911 {
4912 while (n--) {
4913 --base::current;
4914 }
4915 return this;
4916 }
4917 };
4918
4919 template<typename OutIterator,
4920 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4921 typename FromOper = from_oper<ValueType> >
4922 class SwigPyForwardIteratorClosed_T : public SwigPyIterator_T<OutIterator>
4923 {
4924 public:
4925 FromOper from;
4926 typedef OutIterator out_iterator;
4927 typedef ValueType value_type;
4928 typedef SwigPyIterator_T<out_iterator> base;
4929 typedef SwigPyForwardIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
4930
SwigPyForwardIteratorClosed_T(out_iterator curr,out_iterator first,out_iterator last,PyObject * seq)4931 SwigPyForwardIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
4932 : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last)
4933 {
4934 }
4935
value() const4936 PyObject *value() const {
4937 if (base::current == end) {
4938 throw stop_iteration();
4939 } else {
4940 return from(static_cast<const value_type&>(*(base::current)));
4941 }
4942 }
4943
copy() const4944 SwigPyIterator *copy() const
4945 {
4946 return new self_type(*this);
4947 }
4948
incr(size_t n=1)4949 SwigPyIterator *incr(size_t n = 1)
4950 {
4951 while (n--) {
4952 if (base::current == end) {
4953 throw stop_iteration();
4954 } else {
4955 ++base::current;
4956 }
4957 }
4958 return this;
4959 }
4960
4961 protected:
4962 out_iterator begin;
4963 out_iterator end;
4964 };
4965
4966 template<typename OutIterator,
4967 typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
4968 typename FromOper = from_oper<ValueType> >
4969 class SwigPyIteratorClosed_T : public SwigPyForwardIteratorClosed_T<OutIterator,ValueType,FromOper>
4970 {
4971 public:
4972 FromOper from;
4973 typedef OutIterator out_iterator;
4974 typedef ValueType value_type;
4975 typedef SwigPyIterator_T<out_iterator> base;
4976 typedef SwigPyForwardIteratorClosed_T<OutIterator, ValueType, FromOper> base0;
4977 typedef SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
4978
SwigPyIteratorClosed_T(out_iterator curr,out_iterator first,out_iterator last,PyObject * seq)4979 SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
4980 : SwigPyForwardIteratorClosed_T<OutIterator,ValueType,FromOper>(curr, first, last, seq)
4981 {
4982 }
4983
decr(size_t n=1)4984 SwigPyIterator *decr(size_t n = 1)
4985 {
4986 while (n--) {
4987 if (base::current == base0::begin) {
4988 throw stop_iteration();
4989 } else {
4990 --base::current;
4991 }
4992 }
4993 return this;
4994 }
4995 };
4996
4997
4998 template<typename OutIter>
4999 inline SwigPyIterator*
make_output_forward_iterator(const OutIter & current,const OutIter & begin,const OutIter & end,PyObject * seq=0)5000 make_output_forward_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
5001 {
5002 return new SwigPyForwardIteratorClosed_T<OutIter>(current, begin, end, seq);
5003 }
5004
5005 template<typename OutIter>
5006 inline SwigPyIterator*
make_output_iterator(const OutIter & current,const OutIter & begin,const OutIter & end,PyObject * seq=0)5007 make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
5008 {
5009 return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq);
5010 }
5011
5012 template<typename OutIter>
5013 inline SwigPyIterator*
make_output_forward_iterator(const OutIter & current,PyObject * seq=0)5014 make_output_forward_iterator(const OutIter& current, PyObject *seq = 0)
5015 {
5016 return new SwigPyForwardIteratorOpen_T<OutIter>(current, seq);
5017 }
5018
5019 template<typename OutIter>
5020 inline SwigPyIterator*
make_output_iterator(const OutIter & current,PyObject * seq=0)5021 make_output_iterator(const OutIter& current, PyObject *seq = 0)
5022 {
5023 return new SwigPyIteratorOpen_T<OutIter>(current, seq);
5024 }
5025
5026 }
5027
5028
5029 namespace swig
5030 {
5031 template <class T>
5032 struct SwigPySequence_Ref
5033 {
SwigPySequence_Refswig::SwigPySequence_Ref5034 SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
5035 : _seq(seq), _index(index)
5036 {
5037 }
5038
operator Tswig::SwigPySequence_Ref5039 operator T () const
5040 {
5041 swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
5042 try {
5043 return swig::as<T>(item);
5044 } catch (const std::invalid_argument& e) {
5045 char msg[1024];
5046 sprintf(msg, "in sequence element %d ", (int)_index);
5047 if (!PyErr_Occurred()) {
5048 ::SWIG_Error(SWIG_TypeError, swig::type_name<T>());
5049 }
5050 SWIG_Python_AddErrorMsg(msg);
5051 SWIG_Python_AddErrorMsg(e.what());
5052 throw;
5053 }
5054 }
5055
operator =swig::SwigPySequence_Ref5056 SwigPySequence_Ref& operator=(const T& v)
5057 {
5058 PySequence_SetItem(_seq, _index, swig::from<T>(v));
5059 return *this;
5060 }
5061
5062 private:
5063 PyObject* _seq;
5064 Py_ssize_t _index;
5065 };
5066
5067 template <class T>
5068 struct SwigPySequence_ArrowProxy
5069 {
SwigPySequence_ArrowProxyswig::SwigPySequence_ArrowProxy5070 SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
operator ->swig::SwigPySequence_ArrowProxy5071 const T* operator->() const { return &m_value; }
operator const T*swig::SwigPySequence_ArrowProxy5072 operator const T*() const { return &m_value; }
5073 T m_value;
5074 };
5075
5076 template <class T, class Reference >
5077 struct SwigPySequence_InputIterator
5078 {
5079 typedef SwigPySequence_InputIterator<T, Reference > self;
5080
5081 typedef std::random_access_iterator_tag iterator_category;
5082 typedef Reference reference;
5083 typedef T value_type;
5084 typedef T* pointer;
5085 typedef Py_ssize_t difference_type;
5086
SwigPySequence_InputIteratorswig::SwigPySequence_InputIterator5087 SwigPySequence_InputIterator()
5088 {
5089 }
5090
SwigPySequence_InputIteratorswig::SwigPySequence_InputIterator5091 SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
5092 : _seq(seq), _index(index)
5093 {
5094 }
5095
operator *swig::SwigPySequence_InputIterator5096 reference operator*() const
5097 {
5098 return reference(_seq, _index);
5099 }
5100
5101 SwigPySequence_ArrowProxy<T>
operator ->swig::SwigPySequence_InputIterator5102 operator->() const {
5103 return SwigPySequence_ArrowProxy<T>(operator*());
5104 }
5105
operator ==swig::SwigPySequence_InputIterator5106 bool operator==(const self& ri) const
5107 {
5108 return (_index == ri._index) && (_seq == ri._seq);
5109 }
5110
operator !=swig::SwigPySequence_InputIterator5111 bool operator!=(const self& ri) const
5112 {
5113 return !(operator==(ri));
5114 }
5115
operator ++swig::SwigPySequence_InputIterator5116 self& operator ++ ()
5117 {
5118 ++_index;
5119 return *this;
5120 }
5121
operator --swig::SwigPySequence_InputIterator5122 self& operator -- ()
5123 {
5124 --_index;
5125 return *this;
5126 }
5127
operator +=swig::SwigPySequence_InputIterator5128 self& operator += (difference_type n)
5129 {
5130 _index += n;
5131 return *this;
5132 }
5133
operator +swig::SwigPySequence_InputIterator5134 self operator +(difference_type n) const
5135 {
5136 return self(_seq, _index + n);
5137 }
5138
operator -=swig::SwigPySequence_InputIterator5139 self& operator -= (difference_type n)
5140 {
5141 _index -= n;
5142 return *this;
5143 }
5144
operator -swig::SwigPySequence_InputIterator5145 self operator -(difference_type n) const
5146 {
5147 return self(_seq, _index - n);
5148 }
5149
operator -swig::SwigPySequence_InputIterator5150 difference_type operator - (const self& ri) const
5151 {
5152 return _index - ri._index;
5153 }
5154
operator <swig::SwigPySequence_InputIterator5155 bool operator < (const self& ri) const
5156 {
5157 return _index < ri._index;
5158 }
5159
5160 reference
operator []swig::SwigPySequence_InputIterator5161 operator[](difference_type n) const
5162 {
5163 return reference(_seq, _index + n);
5164 }
5165
5166 private:
5167 PyObject* _seq;
5168 difference_type _index;
5169 };
5170
5171 // STL container wrapper around a Python sequence
5172 template <class T>
5173 struct SwigPySequence_Cont
5174 {
5175 typedef SwigPySequence_Ref<T> reference;
5176 typedef const SwigPySequence_Ref<T> const_reference;
5177 typedef T value_type;
5178 typedef T* pointer;
5179 typedef Py_ssize_t difference_type;
5180 typedef size_t size_type;
5181 typedef const pointer const_pointer;
5182 typedef SwigPySequence_InputIterator<T, reference> iterator;
5183 typedef SwigPySequence_InputIterator<T, const_reference> const_iterator;
5184
SwigPySequence_Contswig::SwigPySequence_Cont5185 SwigPySequence_Cont(PyObject* seq) : _seq(0)
5186 {
5187 if (!PySequence_Check(seq)) {
5188 throw std::invalid_argument("a sequence is expected");
5189 }
5190 _seq = seq;
5191 Py_INCREF(_seq);
5192 }
5193
~SwigPySequence_Contswig::SwigPySequence_Cont5194 ~SwigPySequence_Cont()
5195 {
5196 Py_XDECREF(_seq);
5197 }
5198
sizeswig::SwigPySequence_Cont5199 size_type size() const
5200 {
5201 return static_cast<size_type>(PySequence_Size(_seq));
5202 }
5203
emptyswig::SwigPySequence_Cont5204 bool empty() const
5205 {
5206 return size() == 0;
5207 }
5208
beginswig::SwigPySequence_Cont5209 iterator begin()
5210 {
5211 return iterator(_seq, 0);
5212 }
5213
beginswig::SwigPySequence_Cont5214 const_iterator begin() const
5215 {
5216 return const_iterator(_seq, 0);
5217 }
5218
endswig::SwigPySequence_Cont5219 iterator end()
5220 {
5221 return iterator(_seq, size());
5222 }
5223
endswig::SwigPySequence_Cont5224 const_iterator end() const
5225 {
5226 return const_iterator(_seq, size());
5227 }
5228
operator []swig::SwigPySequence_Cont5229 reference operator[](difference_type n)
5230 {
5231 return reference(_seq, n);
5232 }
5233
operator []swig::SwigPySequence_Cont5234 const_reference operator[](difference_type n) const
5235 {
5236 return const_reference(_seq, n);
5237 }
5238
checkswig::SwigPySequence_Cont5239 bool check() const
5240 {
5241 Py_ssize_t s = size();
5242 for (Py_ssize_t i = 0; i < s; ++i) {
5243 swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i);
5244 if (!swig::check<value_type>(item))
5245 return false;
5246 }
5247 return true;
5248 }
5249
5250 private:
5251 PyObject* _seq;
5252 };
5253
5254 }
5255
5256
5257 namespace swig {
5258 template <> struct traits< int > {
5259 typedef value_category category;
type_nameswig::traits5260 static const char* type_name() { return"int"; }
5261 };
5262 template <> struct traits_asval< int > {
5263 typedef int value_type;
asvalswig::traits_asval5264 static int asval(PyObject *obj, value_type *val) {
5265 return SWIG_AsVal_int (obj, val);
5266 }
5267 };
5268 template <> struct traits_from< int > {
5269 typedef int value_type;
fromswig::traits_from5270 static PyObject *from(const value_type& val) {
5271 return SWIG_From_int (val);
5272 }
5273 };
5274 }
5275
5276
5277 namespace swig {
5278 template <class SwigPySeq, class Seq>
5279 inline void
assign(const SwigPySeq & swigpyseq,Seq * seq)5280 assign(const SwigPySeq& swigpyseq, Seq* seq) {
5281 // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
5282 typedef typename SwigPySeq::value_type value_type;
5283 typename SwigPySeq::const_iterator it = swigpyseq.begin();
5284 for (;it != swigpyseq.end(); ++it) {
5285 seq->insert(seq->end(),(value_type)(*it));
5286 }
5287 }
5288
5289 template <class Seq, class T = typename Seq::value_type >
5290 struct traits_asptr_stdseq {
5291 typedef Seq sequence;
5292 typedef T value_type;
5293
asptrswig::traits_asptr_stdseq5294 static int asptr(PyObject *obj, sequence **seq) {
5295 if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) {
5296 sequence *p;
5297 swig_type_info *descriptor = swig::type_info<sequence>();
5298 if (descriptor && SWIG_IsOK(::SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0))) {
5299 if (seq) *seq = p;
5300 return SWIG_OLDOBJ;
5301 }
5302 } else if (PySequence_Check(obj)) {
5303 try {
5304 SwigPySequence_Cont<value_type> swigpyseq(obj);
5305 if (seq) {
5306 sequence *pseq = new sequence();
5307 assign(swigpyseq, pseq);
5308 *seq = pseq;
5309 return SWIG_NEWOBJ;
5310 } else {
5311 return swigpyseq.check() ? SWIG_OK : SWIG_ERROR;
5312 }
5313 } catch (std::exception& e) {
5314 if (seq) {
5315 if (!PyErr_Occurred()) {
5316 PyErr_SetString(PyExc_TypeError, e.what());
5317 }
5318 }
5319 return SWIG_ERROR;
5320 }
5321 }
5322 return SWIG_ERROR;
5323 }
5324 };
5325
5326 template <class Seq, class T = typename Seq::value_type >
5327 struct traits_from_stdseq {
5328 typedef Seq sequence;
5329 typedef T value_type;
5330 typedef typename Seq::size_type size_type;
5331 typedef typename sequence::const_iterator const_iterator;
5332
fromswig::traits_from_stdseq5333 static PyObject *from(const sequence& seq) {
5334 #ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
5335 swig_type_info *desc = swig::type_info<sequence>();
5336 if (desc && desc->clientdata) {
5337 return SWIG_InternalNewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
5338 }
5339 #endif
5340 size_type size = seq.size();
5341 if (size <= (size_type)INT_MAX) {
5342 PyObject *obj = PyTuple_New((Py_ssize_t)size);
5343 Py_ssize_t i = 0;
5344 for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) {
5345 PyTuple_SetItem(obj,i,swig::from<value_type>(*it));
5346 }
5347 return obj;
5348 } else {
5349 PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
5350 return NULL;
5351 }
5352 }
5353 };
5354 }
5355
5356
5357 namespace swig {
5358 template <class T>
5359 struct traits_reserve<std::vector<T> > {
reserveswig::traits_reserve5360 static void reserve(std::vector<T> &seq, typename std::vector<T>::size_type n) {
5361 seq.reserve(n);
5362 }
5363 };
5364
5365 template <class T>
5366 struct traits_asptr<std::vector<T> > {
asptrswig::traits_asptr5367 static int asptr(PyObject *obj, std::vector<T> **vec) {
5368 return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
5369 }
5370 };
5371
5372 template <class T>
5373 struct traits_from<std::vector<T> > {
fromswig::traits_from5374 static PyObject *from(const std::vector<T>& vec) {
5375 return traits_from_stdseq<std::vector<T> >::from(vec);
5376 }
5377 };
5378 }
5379
5380
5381 namespace swig {
5382 template <> struct traits<std::vector< int, std::allocator< int > > > {
5383 typedef pointer_category category;
type_nameswig::traits5384 static const char* type_name() {
5385 return "std::vector<" "int" "," "std::allocator< int >" " >";
5386 }
5387 };
5388 }
5389
std_vector_Sl_int_Sg__iterator(std::vector<int> * self,PyObject ** PYTHON_SELF)5390 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){
5391 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
5392 }
std_vector_Sl_int_Sg____nonzero__(std::vector<int> const * self)5393 SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){
5394 return !(self->empty());
5395 }
std_vector_Sl_int_Sg____bool__(std::vector<int> const * self)5396 SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){
5397 return !(self->empty());
5398 }
std_vector_Sl_int_Sg____len__(std::vector<int> const * self)5399 SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){
5400 return self->size();
5401 }
5402
5403 #ifdef SWIG_LONG_LONG_AVAILABLE
5404 SWIGINTERNINLINE PyObject*
SWIG_From_unsigned_SS_long_SS_long(unsigned long long value)5405 SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
5406 {
5407 return (value > LONG_MAX) ?
5408 PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
5409 }
5410 #endif
5411
5412
5413 SWIGINTERNINLINE PyObject *
SWIG_From_size_t(size_t value)5414 SWIG_From_size_t (size_t value)
5415 {
5416 #ifdef SWIG_LONG_LONG_AVAILABLE
5417 if (sizeof(size_t) <= sizeof(unsigned long)) {
5418 #endif
5419 return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
5420 #ifdef SWIG_LONG_LONG_AVAILABLE
5421 } else {
5422 /* assume sizeof(size_t) <= sizeof(unsigned long long) */
5423 return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value));
5424 }
5425 #endif
5426 }
5427
std_vector_Sl_int_Sg____getslice__(std::vector<int> * self,std::vector<int>::difference_type i,std::vector<int>::difference_type j)5428 SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
5429 return swig::getslice(self, i, j, 1);
5430 }
std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector<int> * self,std::vector<int>::difference_type i,std::vector<int>::difference_type j)5431 SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
5432 swig::setslice(self, i, j, 1, std::vector< int,std::allocator< int > >());
5433 }
std_vector_Sl_int_Sg____setslice____SWIG_1(std::vector<int> * self,std::vector<int>::difference_type i,std::vector<int>::difference_type j,std::vector<int,std::allocator<int>> const & v)5434 SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_1(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v){
5435 swig::setslice(self, i, j, 1, v);
5436 }
std_vector_Sl_int_Sg____delslice__(std::vector<int> * self,std::vector<int>::difference_type i,std::vector<int>::difference_type j)5437 SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
5438 swig::delslice(self, i, j, 1);
5439 }
std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector<int> * self,std::vector<int>::difference_type i)5440 SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){
5441 swig::erase(self, swig::getpos(self, i));
5442 }
std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector<int> * self,PySliceObject * slice)5443 SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){
5444 Py_ssize_t i, j, step;
5445 if( !PySlice_Check(slice) ) {
5446 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5447 return NULL;
5448 }
5449 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5450 std::vector< int,std::allocator< int > >::difference_type id = i;
5451 std::vector< int,std::allocator< int > >::difference_type jd = j;
5452 return swig::getslice(self, id, jd, step);
5453 }
std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector<int> * self,PySliceObject * slice,std::vector<int,std::allocator<int>> const & v)5454 SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){
5455 Py_ssize_t i, j, step;
5456 if( !PySlice_Check(slice) ) {
5457 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5458 return;
5459 }
5460 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5461 std::vector< int,std::allocator< int > >::difference_type id = i;
5462 std::vector< int,std::allocator< int > >::difference_type jd = j;
5463 swig::setslice(self, id, jd, step, v);
5464 }
std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector<int> * self,PySliceObject * slice)5465 SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
5466 Py_ssize_t i, j, step;
5467 if( !PySlice_Check(slice) ) {
5468 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5469 return;
5470 }
5471 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5472 std::vector< int,std::allocator< int > >::difference_type id = i;
5473 std::vector< int,std::allocator< int > >::difference_type jd = j;
5474 swig::delslice(self, id, jd, step);
5475 }
std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector<int> * self,PySliceObject * slice)5476 SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
5477 Py_ssize_t i, j, step;
5478 if( !PySlice_Check(slice) ) {
5479 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5480 return;
5481 }
5482 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5483 std::vector< int,std::allocator< int > >::difference_type id = i;
5484 std::vector< int,std::allocator< int > >::difference_type jd = j;
5485 swig::delslice(self, id, jd, step);
5486 }
std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector<int> const * self,std::vector<int>::difference_type i)5487 SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){
5488 return *(swig::cgetpos(self, i));
5489 }
5490
5491 namespace swig {
container_owner_attribute()5492 static PyObject* container_owner_attribute() {
5493 static PyObject* attr = SWIG_Python_str_FromChar("__swig_container");
5494 return attr;
5495 }
5496
5497 template <typename T>
5498 struct container_owner {
5499 // By default, do not add the back-reference (for value types)
5500 // Specialization below will check the reference for pointer types.
back_referenceswig::container_owner5501 static bool back_reference(PyObject* /*child*/, PyObject* /*owner*/) {
5502 return false;
5503 }
5504 };
5505
5506 template <>
5507 struct container_owner<swig::pointer_category> {
5508 /*
5509 * Call to add a back-reference to the owning object when returning a
5510 * reference from a container. Will only set the reference if child
5511 * is a SWIG wrapper object that does not own the pointer.
5512 *
5513 * returns whether the reference was set or not
5514 */
back_referenceswig::container_owner5515 static bool back_reference(PyObject* child, PyObject* owner) {
5516 SwigPyObject* swigThis = SWIG_Python_GetSwigThis(child);
5517 if (swigThis && (swigThis->own & SWIG_POINTER_OWN) != SWIG_POINTER_OWN) {
5518 return PyObject_SetAttr(child, container_owner_attribute(), owner) != -1;
5519 }
5520 return false;
5521 }
5522 };
5523 }
5524
std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector<int> * self,std::vector<int>::difference_type i,std::vector<int>::value_type const & x)5525 SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){
5526 *(swig::getpos(self,i)) = x;
5527 }
std_vector_Sl_int_Sg__pop(std::vector<int> * self)5528 SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){
5529 if (self->size() == 0)
5530 throw std::out_of_range("pop from empty container");
5531 std::vector< int,std::allocator< int > >::value_type x = self->back();
5532 self->pop_back();
5533 return x;
5534 }
std_vector_Sl_int_Sg__append(std::vector<int> * self,std::vector<int>::value_type const & x)5535 SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){
5536 self->push_back(x);
5537 }
std_vector_Sl_int_Sg__erase__SWIG_0(std::vector<int> * self,std::vector<int>::iterator pos)5538 SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos){ return self->erase(pos); }
std_vector_Sl_int_Sg__erase__SWIG_1(std::vector<int> * self,std::vector<int>::iterator first,std::vector<int>::iterator last)5539 SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_1(std::vector< int > *self,std::vector< int >::iterator first,std::vector< int >::iterator last){ return self->erase(first, last); }
std_vector_Sl_int_Sg__insert__SWIG_0(std::vector<int> * self,std::vector<int>::iterator pos,std::vector<int>::value_type const & x)5540 SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__insert__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::value_type const &x){ return self->insert(pos, x); }
std_vector_Sl_int_Sg__insert__SWIG_1(std::vector<int> * self,std::vector<int>::iterator pos,std::vector<int>::size_type n,std::vector<int>::value_type const & x)5541 SWIGINTERN void std_vector_Sl_int_Sg__insert__SWIG_1(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::size_type n,std::vector< int >::value_type const &x){ self->insert(pos, n, x); }
5542
5543 SWIGINTERN int
SWIG_AsVal_unsigned_SS_int(PyObject * obj,unsigned int * val)5544 SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
5545 {
5546 unsigned long v;
5547 int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
5548 if (SWIG_IsOK(res)) {
5549 if ((v > UINT_MAX)) {
5550 return SWIG_OverflowError;
5551 } else {
5552 if (val) *val = static_cast< unsigned int >(v);
5553 }
5554 }
5555 return res;
5556 }
5557
5558
5559 SWIGINTERNINLINE PyObject*
SWIG_From_unsigned_SS_int(unsigned int value)5560 SWIG_From_unsigned_SS_int (unsigned int value)
5561 {
5562 return PyInt_FromSize_t((size_t) value);
5563 }
5564
5565
5566 namespace swig {
5567 template <> struct traits< unsigned int > {
5568 typedef value_category category;
type_nameswig::traits5569 static const char* type_name() { return"unsigned int"; }
5570 };
5571 template <> struct traits_asval< unsigned int > {
5572 typedef unsigned int value_type;
asvalswig::traits_asval5573 static int asval(PyObject *obj, value_type *val) {
5574 return SWIG_AsVal_unsigned_SS_int (obj, val);
5575 }
5576 };
5577 template <> struct traits_from< unsigned int > {
5578 typedef unsigned int value_type;
fromswig::traits_from5579 static PyObject *from(const value_type& val) {
5580 return SWIG_From_unsigned_SS_int (val);
5581 }
5582 };
5583 }
5584
5585
5586 namespace swig {
5587 template <> struct traits<std::vector< unsigned int, std::allocator< unsigned int > > > {
5588 typedef pointer_category category;
type_nameswig::traits5589 static const char* type_name() {
5590 return "std::vector<" "unsigned int" "," "std::allocator< unsigned int >" " >";
5591 }
5592 };
5593 }
5594
std_vector_Sl_unsigned_SS_int_Sg__iterator(std::vector<unsigned int> * self,PyObject ** PYTHON_SELF)5595 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_unsigned_SS_int_Sg__iterator(std::vector< unsigned int > *self,PyObject **PYTHON_SELF){
5596 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
5597 }
std_vector_Sl_unsigned_SS_int_Sg____nonzero__(std::vector<unsigned int> const * self)5598 SWIGINTERN bool std_vector_Sl_unsigned_SS_int_Sg____nonzero__(std::vector< unsigned int > const *self){
5599 return !(self->empty());
5600 }
std_vector_Sl_unsigned_SS_int_Sg____bool__(std::vector<unsigned int> const * self)5601 SWIGINTERN bool std_vector_Sl_unsigned_SS_int_Sg____bool__(std::vector< unsigned int > const *self){
5602 return !(self->empty());
5603 }
std_vector_Sl_unsigned_SS_int_Sg____len__(std::vector<unsigned int> const * self)5604 SWIGINTERN std::vector< unsigned int >::size_type std_vector_Sl_unsigned_SS_int_Sg____len__(std::vector< unsigned int > const *self){
5605 return self->size();
5606 }
std_vector_Sl_unsigned_SS_int_Sg____getslice__(std::vector<unsigned int> * self,std::vector<unsigned int>::difference_type i,std::vector<unsigned int>::difference_type j)5607 SWIGINTERN std::vector< unsigned int,std::allocator< unsigned int > > *std_vector_Sl_unsigned_SS_int_Sg____getslice__(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::difference_type j){
5608 return swig::getslice(self, i, j, 1);
5609 }
std_vector_Sl_unsigned_SS_int_Sg____setslice____SWIG_0(std::vector<unsigned int> * self,std::vector<unsigned int>::difference_type i,std::vector<unsigned int>::difference_type j)5610 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setslice____SWIG_0(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::difference_type j){
5611 swig::setslice(self, i, j, 1, std::vector< unsigned int,std::allocator< unsigned int > >());
5612 }
std_vector_Sl_unsigned_SS_int_Sg____setslice____SWIG_1(std::vector<unsigned int> * self,std::vector<unsigned int>::difference_type i,std::vector<unsigned int>::difference_type j,std::vector<unsigned int,std::allocator<unsigned int>> const & v)5613 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setslice____SWIG_1(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::difference_type j,std::vector< unsigned int,std::allocator< unsigned int > > const &v){
5614 swig::setslice(self, i, j, 1, v);
5615 }
std_vector_Sl_unsigned_SS_int_Sg____delslice__(std::vector<unsigned int> * self,std::vector<unsigned int>::difference_type i,std::vector<unsigned int>::difference_type j)5616 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____delslice__(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::difference_type j){
5617 swig::delslice(self, i, j, 1);
5618 }
std_vector_Sl_unsigned_SS_int_Sg____delitem____SWIG_0(std::vector<unsigned int> * self,std::vector<unsigned int>::difference_type i)5619 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____delitem____SWIG_0(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i){
5620 swig::erase(self, swig::getpos(self, i));
5621 }
std_vector_Sl_unsigned_SS_int_Sg____getitem____SWIG_0(std::vector<unsigned int> * self,PySliceObject * slice)5622 SWIGINTERN std::vector< unsigned int,std::allocator< unsigned int > > *std_vector_Sl_unsigned_SS_int_Sg____getitem____SWIG_0(std::vector< unsigned int > *self,PySliceObject *slice){
5623 Py_ssize_t i, j, step;
5624 if( !PySlice_Check(slice) ) {
5625 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5626 return NULL;
5627 }
5628 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5629 std::vector< unsigned int,std::allocator< unsigned int > >::difference_type id = i;
5630 std::vector< unsigned int,std::allocator< unsigned int > >::difference_type jd = j;
5631 return swig::getslice(self, id, jd, step);
5632 }
std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_0(std::vector<unsigned int> * self,PySliceObject * slice,std::vector<unsigned int,std::allocator<unsigned int>> const & v)5633 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_0(std::vector< unsigned int > *self,PySliceObject *slice,std::vector< unsigned int,std::allocator< unsigned int > > const &v){
5634 Py_ssize_t i, j, step;
5635 if( !PySlice_Check(slice) ) {
5636 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5637 return;
5638 }
5639 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5640 std::vector< unsigned int,std::allocator< unsigned int > >::difference_type id = i;
5641 std::vector< unsigned int,std::allocator< unsigned int > >::difference_type jd = j;
5642 swig::setslice(self, id, jd, step, v);
5643 }
std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_1(std::vector<unsigned int> * self,PySliceObject * slice)5644 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_1(std::vector< unsigned int > *self,PySliceObject *slice){
5645 Py_ssize_t i, j, step;
5646 if( !PySlice_Check(slice) ) {
5647 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5648 return;
5649 }
5650 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5651 std::vector< unsigned int,std::allocator< unsigned int > >::difference_type id = i;
5652 std::vector< unsigned int,std::allocator< unsigned int > >::difference_type jd = j;
5653 swig::delslice(self, id, jd, step);
5654 }
std_vector_Sl_unsigned_SS_int_Sg____delitem____SWIG_1(std::vector<unsigned int> * self,PySliceObject * slice)5655 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____delitem____SWIG_1(std::vector< unsigned int > *self,PySliceObject *slice){
5656 Py_ssize_t i, j, step;
5657 if( !PySlice_Check(slice) ) {
5658 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5659 return;
5660 }
5661 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5662 std::vector< unsigned int,std::allocator< unsigned int > >::difference_type id = i;
5663 std::vector< unsigned int,std::allocator< unsigned int > >::difference_type jd = j;
5664 swig::delslice(self, id, jd, step);
5665 }
std_vector_Sl_unsigned_SS_int_Sg____getitem____SWIG_1(std::vector<unsigned int> const * self,std::vector<unsigned int>::difference_type i)5666 SWIGINTERN std::vector< unsigned int >::value_type const &std_vector_Sl_unsigned_SS_int_Sg____getitem____SWIG_1(std::vector< unsigned int > const *self,std::vector< unsigned int >::difference_type i){
5667 return *(swig::cgetpos(self, i));
5668 }
std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_2(std::vector<unsigned int> * self,std::vector<unsigned int>::difference_type i,std::vector<unsigned int>::value_type const & x)5669 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg____setitem____SWIG_2(std::vector< unsigned int > *self,std::vector< unsigned int >::difference_type i,std::vector< unsigned int >::value_type const &x){
5670 *(swig::getpos(self,i)) = x;
5671 }
std_vector_Sl_unsigned_SS_int_Sg__pop(std::vector<unsigned int> * self)5672 SWIGINTERN std::vector< unsigned int >::value_type std_vector_Sl_unsigned_SS_int_Sg__pop(std::vector< unsigned int > *self){
5673 if (self->size() == 0)
5674 throw std::out_of_range("pop from empty container");
5675 std::vector< unsigned int,std::allocator< unsigned int > >::value_type x = self->back();
5676 self->pop_back();
5677 return x;
5678 }
std_vector_Sl_unsigned_SS_int_Sg__append(std::vector<unsigned int> * self,std::vector<unsigned int>::value_type const & x)5679 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg__append(std::vector< unsigned int > *self,std::vector< unsigned int >::value_type const &x){
5680 self->push_back(x);
5681 }
std_vector_Sl_unsigned_SS_int_Sg__erase__SWIG_0(std::vector<unsigned int> * self,std::vector<unsigned int>::iterator pos)5682 SWIGINTERN std::vector< unsigned int >::iterator std_vector_Sl_unsigned_SS_int_Sg__erase__SWIG_0(std::vector< unsigned int > *self,std::vector< unsigned int >::iterator pos){ return self->erase(pos); }
std_vector_Sl_unsigned_SS_int_Sg__erase__SWIG_1(std::vector<unsigned int> * self,std::vector<unsigned int>::iterator first,std::vector<unsigned int>::iterator last)5683 SWIGINTERN std::vector< unsigned int >::iterator std_vector_Sl_unsigned_SS_int_Sg__erase__SWIG_1(std::vector< unsigned int > *self,std::vector< unsigned int >::iterator first,std::vector< unsigned int >::iterator last){ return self->erase(first, last); }
std_vector_Sl_unsigned_SS_int_Sg__insert__SWIG_0(std::vector<unsigned int> * self,std::vector<unsigned int>::iterator pos,std::vector<unsigned int>::value_type const & x)5684 SWIGINTERN std::vector< unsigned int >::iterator std_vector_Sl_unsigned_SS_int_Sg__insert__SWIG_0(std::vector< unsigned int > *self,std::vector< unsigned int >::iterator pos,std::vector< unsigned int >::value_type const &x){ return self->insert(pos, x); }
std_vector_Sl_unsigned_SS_int_Sg__insert__SWIG_1(std::vector<unsigned int> * self,std::vector<unsigned int>::iterator pos,std::vector<unsigned int>::size_type n,std::vector<unsigned int>::value_type const & x)5685 SWIGINTERN void std_vector_Sl_unsigned_SS_int_Sg__insert__SWIG_1(std::vector< unsigned int > *self,std::vector< unsigned int >::iterator pos,std::vector< unsigned int >::size_type n,std::vector< unsigned int >::value_type const &x){ self->insert(pos, n, x); }
5686
5687 namespace swig {
5688 template <> struct traits<std::vector< double, std::allocator< double > > > {
5689 typedef pointer_category category;
type_nameswig::traits5690 static const char* type_name() {
5691 return "std::vector<" "double" "," "std::allocator< double >" " >";
5692 }
5693 };
5694 }
5695
std_vector_Sl_double_Sg__iterator(std::vector<double> * self,PyObject ** PYTHON_SELF)5696 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_double_Sg__iterator(std::vector< double > *self,PyObject **PYTHON_SELF){
5697 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
5698 }
std_vector_Sl_double_Sg____nonzero__(std::vector<double> const * self)5699 SWIGINTERN bool std_vector_Sl_double_Sg____nonzero__(std::vector< double > const *self){
5700 return !(self->empty());
5701 }
std_vector_Sl_double_Sg____bool__(std::vector<double> const * self)5702 SWIGINTERN bool std_vector_Sl_double_Sg____bool__(std::vector< double > const *self){
5703 return !(self->empty());
5704 }
std_vector_Sl_double_Sg____len__(std::vector<double> const * self)5705 SWIGINTERN std::vector< double >::size_type std_vector_Sl_double_Sg____len__(std::vector< double > const *self){
5706 return self->size();
5707 }
std_vector_Sl_double_Sg____getslice__(std::vector<double> * self,std::vector<double>::difference_type i,std::vector<double>::difference_type j)5708 SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
5709 return swig::getslice(self, i, j, 1);
5710 }
std_vector_Sl_double_Sg____setslice____SWIG_0(std::vector<double> * self,std::vector<double>::difference_type i,std::vector<double>::difference_type j)5711 SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
5712 swig::setslice(self, i, j, 1, std::vector< double,std::allocator< double > >());
5713 }
std_vector_Sl_double_Sg____setslice____SWIG_1(std::vector<double> * self,std::vector<double>::difference_type i,std::vector<double>::difference_type j,std::vector<double,std::allocator<double>> const & v)5714 SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_1(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j,std::vector< double,std::allocator< double > > const &v){
5715 swig::setslice(self, i, j, 1, v);
5716 }
std_vector_Sl_double_Sg____delslice__(std::vector<double> * self,std::vector<double>::difference_type i,std::vector<double>::difference_type j)5717 SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
5718 swig::delslice(self, i, j, 1);
5719 }
std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector<double> * self,std::vector<double>::difference_type i)5720 SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){
5721 swig::erase(self, swig::getpos(self, i));
5722 }
std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector<double> * self,PySliceObject * slice)5723 SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){
5724 Py_ssize_t i, j, step;
5725 if( !PySlice_Check(slice) ) {
5726 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5727 return NULL;
5728 }
5729 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5730 std::vector< double,std::allocator< double > >::difference_type id = i;
5731 std::vector< double,std::allocator< double > >::difference_type jd = j;
5732 return swig::getslice(self, id, jd, step);
5733 }
std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector<double> * self,PySliceObject * slice,std::vector<double,std::allocator<double>> const & v)5734 SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){
5735 Py_ssize_t i, j, step;
5736 if( !PySlice_Check(slice) ) {
5737 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5738 return;
5739 }
5740 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5741 std::vector< double,std::allocator< double > >::difference_type id = i;
5742 std::vector< double,std::allocator< double > >::difference_type jd = j;
5743 swig::setslice(self, id, jd, step, v);
5744 }
std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector<double> * self,PySliceObject * slice)5745 SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
5746 Py_ssize_t i, j, step;
5747 if( !PySlice_Check(slice) ) {
5748 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5749 return;
5750 }
5751 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5752 std::vector< double,std::allocator< double > >::difference_type id = i;
5753 std::vector< double,std::allocator< double > >::difference_type jd = j;
5754 swig::delslice(self, id, jd, step);
5755 }
std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector<double> * self,PySliceObject * slice)5756 SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
5757 Py_ssize_t i, j, step;
5758 if( !PySlice_Check(slice) ) {
5759 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5760 return;
5761 }
5762 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5763 std::vector< double,std::allocator< double > >::difference_type id = i;
5764 std::vector< double,std::allocator< double > >::difference_type jd = j;
5765 swig::delslice(self, id, jd, step);
5766 }
std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector<double> const * self,std::vector<double>::difference_type i)5767 SWIGINTERN std::vector< double >::value_type const &std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector< double > const *self,std::vector< double >::difference_type i){
5768 return *(swig::cgetpos(self, i));
5769 }
std_vector_Sl_double_Sg____setitem____SWIG_2(std::vector<double> * self,std::vector<double>::difference_type i,std::vector<double>::value_type const & x)5770 SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_2(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::value_type const &x){
5771 *(swig::getpos(self,i)) = x;
5772 }
std_vector_Sl_double_Sg__pop(std::vector<double> * self)5773 SWIGINTERN std::vector< double >::value_type std_vector_Sl_double_Sg__pop(std::vector< double > *self){
5774 if (self->size() == 0)
5775 throw std::out_of_range("pop from empty container");
5776 std::vector< double,std::allocator< double > >::value_type x = self->back();
5777 self->pop_back();
5778 return x;
5779 }
std_vector_Sl_double_Sg__append(std::vector<double> * self,std::vector<double>::value_type const & x)5780 SWIGINTERN void std_vector_Sl_double_Sg__append(std::vector< double > *self,std::vector< double >::value_type const &x){
5781 self->push_back(x);
5782 }
std_vector_Sl_double_Sg__erase__SWIG_0(std::vector<double> * self,std::vector<double>::iterator pos)5783 SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos){ return self->erase(pos); }
std_vector_Sl_double_Sg__erase__SWIG_1(std::vector<double> * self,std::vector<double>::iterator first,std::vector<double>::iterator last)5784 SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_1(std::vector< double > *self,std::vector< double >::iterator first,std::vector< double >::iterator last){ return self->erase(first, last); }
std_vector_Sl_double_Sg__insert__SWIG_0(std::vector<double> * self,std::vector<double>::iterator pos,std::vector<double>::value_type const & x)5785 SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__insert__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::value_type const &x){ return self->insert(pos, x); }
std_vector_Sl_double_Sg__insert__SWIG_1(std::vector<double> * self,std::vector<double>::iterator pos,std::vector<double>::size_type n,std::vector<double>::value_type const & x)5786 SWIGINTERN void std_vector_Sl_double_Sg__insert__SWIG_1(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::size_type n,std::vector< double >::value_type const &x){ self->insert(pos, n, x); }
5787
5788 SWIGINTERN int
SWIG_AsPtr_std_string(PyObject * obj,std::string ** val)5789 SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
5790 {
5791 char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
5792 if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
5793 if (buf) {
5794 if (val) *val = new std::string(buf, size - 1);
5795 if (alloc == SWIG_NEWOBJ) delete[] buf;
5796 return SWIG_NEWOBJ;
5797 } else {
5798 if (val) *val = 0;
5799 return SWIG_OLDOBJ;
5800 }
5801 } else {
5802 static int init = 0;
5803 static swig_type_info* descriptor = 0;
5804 if (!init) {
5805 descriptor = SWIG_TypeQuery("std::string" " *");
5806 init = 1;
5807 }
5808 if (descriptor) {
5809 std::string *vptr;
5810 int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
5811 if (SWIG_IsOK(res) && val) *val = vptr;
5812 return res;
5813 }
5814 }
5815 return SWIG_ERROR;
5816 }
5817
5818
5819 SWIGINTERN int
SWIG_AsVal_std_string(PyObject * obj,std::string * val)5820 SWIG_AsVal_std_string (PyObject * obj, std::string *val)
5821 {
5822 std::string* v = (std::string *) 0;
5823 int res = SWIG_AsPtr_std_string (obj, &v);
5824 if (!SWIG_IsOK(res)) return res;
5825 if (v) {
5826 if (val) *val = *v;
5827 if (SWIG_IsNewObj(res)) {
5828 delete v;
5829 res = SWIG_DelNewMask(res);
5830 }
5831 return res;
5832 }
5833 return SWIG_ERROR;
5834 }
5835
5836
5837 SWIGINTERNINLINE PyObject *
SWIG_From_std_string(const std::string & s)5838 SWIG_From_std_string (const std::string& s)
5839 {
5840 return SWIG_FromCharPtrAndSize(s.data(), s.size());
5841 }
5842
5843
5844 namespace swig {
5845 template <> struct traits< std::string > {
5846 typedef value_category category;
type_nameswig::traits5847 static const char* type_name() { return"std::string"; }
5848 };
5849 template <> struct traits_asval< std::string > {
5850 typedef std::string value_type;
asvalswig::traits_asval5851 static int asval(PyObject *obj, value_type *val) {
5852 return SWIG_AsVal_std_string (obj, val);
5853 }
5854 };
5855 template <> struct traits_from< std::string > {
5856 typedef std::string value_type;
fromswig::traits_from5857 static PyObject *from(const value_type& val) {
5858 return SWIG_From_std_string (val);
5859 }
5860 };
5861 }
5862
5863
5864 namespace swig {
5865 template <> struct traits<std::vector< std::string, std::allocator< std::string > > > {
5866 typedef pointer_category category;
type_nameswig::traits5867 static const char* type_name() {
5868 return "std::vector<" "std::string" "," "std::allocator< std::string >" " >";
5869 }
5870 };
5871 }
5872
std_vector_Sl_std_string_Sg__iterator(std::vector<std::string> * self,PyObject ** PYTHON_SELF)5873 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_string_Sg__iterator(std::vector< std::string > *self,PyObject **PYTHON_SELF){
5874 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
5875 }
std_vector_Sl_std_string_Sg____nonzero__(std::vector<std::string> const * self)5876 SWIGINTERN bool std_vector_Sl_std_string_Sg____nonzero__(std::vector< std::string > const *self){
5877 return !(self->empty());
5878 }
std_vector_Sl_std_string_Sg____bool__(std::vector<std::string> const * self)5879 SWIGINTERN bool std_vector_Sl_std_string_Sg____bool__(std::vector< std::string > const *self){
5880 return !(self->empty());
5881 }
std_vector_Sl_std_string_Sg____len__(std::vector<std::string> const * self)5882 SWIGINTERN std::vector< std::string >::size_type std_vector_Sl_std_string_Sg____len__(std::vector< std::string > const *self){
5883 return self->size();
5884 }
std_vector_Sl_std_string_Sg____getslice__(std::vector<std::string> * self,std::vector<std::string>::difference_type i,std::vector<std::string>::difference_type j)5885 SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){
5886 return swig::getslice(self, i, j, 1);
5887 }
std_vector_Sl_std_string_Sg____setslice____SWIG_0(std::vector<std::string> * self,std::vector<std::string>::difference_type i,std::vector<std::string>::difference_type j)5888 SWIGINTERN void std_vector_Sl_std_string_Sg____setslice____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){
5889 swig::setslice(self, i, j, 1, std::vector< std::string,std::allocator< std::string > >());
5890 }
std_vector_Sl_std_string_Sg____setslice____SWIG_1(std::vector<std::string> * self,std::vector<std::string>::difference_type i,std::vector<std::string>::difference_type j,std::vector<std::string,std::allocator<std::string>> const & v)5891 SWIGINTERN void std_vector_Sl_std_string_Sg____setslice____SWIG_1(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j,std::vector< std::string,std::allocator< std::string > > const &v){
5892 swig::setslice(self, i, j, 1, v);
5893 }
std_vector_Sl_std_string_Sg____delslice__(std::vector<std::string> * self,std::vector<std::string>::difference_type i,std::vector<std::string>::difference_type j)5894 SWIGINTERN void std_vector_Sl_std_string_Sg____delslice__(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::difference_type j){
5895 swig::delslice(self, i, j, 1);
5896 }
std_vector_Sl_std_string_Sg____delitem____SWIG_0(std::vector<std::string> * self,std::vector<std::string>::difference_type i)5897 SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_0(std::vector< std::string > *self,std::vector< std::string >::difference_type i){
5898 swig::erase(self, swig::getpos(self, i));
5899 }
std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector<std::string> * self,PySliceObject * slice)5900 SWIGINTERN std::vector< std::string,std::allocator< std::string > > *std_vector_Sl_std_string_Sg____getitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice){
5901 Py_ssize_t i, j, step;
5902 if( !PySlice_Check(slice) ) {
5903 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5904 return NULL;
5905 }
5906 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5907 std::vector< std::string,std::allocator< std::string > >::difference_type id = i;
5908 std::vector< std::string,std::allocator< std::string > >::difference_type jd = j;
5909 return swig::getslice(self, id, jd, step);
5910 }
std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector<std::string> * self,PySliceObject * slice,std::vector<std::string,std::allocator<std::string>> const & v)5911 SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_0(std::vector< std::string > *self,PySliceObject *slice,std::vector< std::string,std::allocator< std::string > > const &v){
5912 Py_ssize_t i, j, step;
5913 if( !PySlice_Check(slice) ) {
5914 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5915 return;
5916 }
5917 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5918 std::vector< std::string,std::allocator< std::string > >::difference_type id = i;
5919 std::vector< std::string,std::allocator< std::string > >::difference_type jd = j;
5920 swig::setslice(self, id, jd, step, v);
5921 }
std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector<std::string> * self,PySliceObject * slice)5922 SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){
5923 Py_ssize_t i, j, step;
5924 if( !PySlice_Check(slice) ) {
5925 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5926 return;
5927 }
5928 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5929 std::vector< std::string,std::allocator< std::string > >::difference_type id = i;
5930 std::vector< std::string,std::allocator< std::string > >::difference_type jd = j;
5931 swig::delslice(self, id, jd, step);
5932 }
std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector<std::string> * self,PySliceObject * slice)5933 SWIGINTERN void std_vector_Sl_std_string_Sg____delitem____SWIG_1(std::vector< std::string > *self,PySliceObject *slice){
5934 Py_ssize_t i, j, step;
5935 if( !PySlice_Check(slice) ) {
5936 SWIG_Error(SWIG_TypeError, "Slice object expected.");
5937 return;
5938 }
5939 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
5940 std::vector< std::string,std::allocator< std::string > >::difference_type id = i;
5941 std::vector< std::string,std::allocator< std::string > >::difference_type jd = j;
5942 swig::delslice(self, id, jd, step);
5943 }
std_vector_Sl_std_string_Sg____getitem____SWIG_1(std::vector<std::string> const * self,std::vector<std::string>::difference_type i)5944 SWIGINTERN std::vector< std::string >::value_type const &std_vector_Sl_std_string_Sg____getitem____SWIG_1(std::vector< std::string > const *self,std::vector< std::string >::difference_type i){
5945 return *(swig::cgetpos(self, i));
5946 }
std_vector_Sl_std_string_Sg____setitem____SWIG_2(std::vector<std::string> * self,std::vector<std::string>::difference_type i,std::vector<std::string>::value_type const & x)5947 SWIGINTERN void std_vector_Sl_std_string_Sg____setitem____SWIG_2(std::vector< std::string > *self,std::vector< std::string >::difference_type i,std::vector< std::string >::value_type const &x){
5948 *(swig::getpos(self,i)) = x;
5949 }
std_vector_Sl_std_string_Sg__pop(std::vector<std::string> * self)5950 SWIGINTERN std::vector< std::string >::value_type std_vector_Sl_std_string_Sg__pop(std::vector< std::string > *self){
5951 if (self->size() == 0)
5952 throw std::out_of_range("pop from empty container");
5953 std::vector< std::string,std::allocator< std::string > >::value_type x = self->back();
5954 self->pop_back();
5955 return x;
5956 }
std_vector_Sl_std_string_Sg__append(std::vector<std::string> * self,std::vector<std::string>::value_type const & x)5957 SWIGINTERN void std_vector_Sl_std_string_Sg__append(std::vector< std::string > *self,std::vector< std::string >::value_type const &x){
5958 self->push_back(x);
5959 }
std_vector_Sl_std_string_Sg__erase__SWIG_0(std::vector<std::string> * self,std::vector<std::string>::iterator pos)5960 SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos){ return self->erase(pos); }
std_vector_Sl_std_string_Sg__erase__SWIG_1(std::vector<std::string> * self,std::vector<std::string>::iterator first,std::vector<std::string>::iterator last)5961 SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__erase__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator first,std::vector< std::string >::iterator last){ return self->erase(first, last); }
std_vector_Sl_std_string_Sg__insert__SWIG_0(std::vector<std::string> * self,std::vector<std::string>::iterator pos,std::vector<std::string>::value_type const & x)5962 SWIGINTERN std::vector< std::string >::iterator std_vector_Sl_std_string_Sg__insert__SWIG_0(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::value_type const &x){ return self->insert(pos, x); }
std_vector_Sl_std_string_Sg__insert__SWIG_1(std::vector<std::string> * self,std::vector<std::string>::iterator pos,std::vector<std::string>::size_type n,std::vector<std::string>::value_type const & x)5963 SWIGINTERN void std_vector_Sl_std_string_Sg__insert__SWIG_1(std::vector< std::string > *self,std::vector< std::string >::iterator pos,std::vector< std::string >::size_type n,std::vector< std::string >::value_type const &x){ self->insert(pos, n, x); }
5964
5965 SWIGINTERN int
SWIG_AsCharArray(PyObject * obj,char * val,size_t size)5966 SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
5967 {
5968 char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
5969 int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
5970 if (SWIG_IsOK(res)) {
5971 /* special case of single char conversion when we don't need space for NUL */
5972 if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize;
5973 if (csize <= size) {
5974 if (val) {
5975 if (csize) memcpy(val, cptr, csize*sizeof(char));
5976 if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
5977 }
5978 if (alloc == SWIG_NEWOBJ) {
5979 delete[] cptr;
5980 res = SWIG_DelNewMask(res);
5981 }
5982 return res;
5983 }
5984 if (alloc == SWIG_NEWOBJ) delete[] cptr;
5985 }
5986 return SWIG_TypeError;
5987 }
5988
5989
5990 SWIGINTERN int
SWIG_AsVal_char(PyObject * obj,char * val)5991 SWIG_AsVal_char (PyObject * obj, char *val)
5992 {
5993 int res = SWIG_AsCharArray(obj, val, 1);
5994 if (!SWIG_IsOK(res)) {
5995 long v;
5996 res = SWIG_AddCast(SWIG_AsVal_long (obj, &v));
5997 if (SWIG_IsOK(res)) {
5998 if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) {
5999 if (val) *val = static_cast< char >(v);
6000 } else {
6001 res = SWIG_OverflowError;
6002 }
6003 }
6004 }
6005 return res;
6006 }
6007
6008
6009 SWIGINTERNINLINE PyObject *
SWIG_From_char(char c)6010 SWIG_From_char (char c)
6011 {
6012 return SWIG_FromCharPtrAndSize(&c,1);
6013 }
6014
6015
6016 namespace swig {
6017 template <> struct traits< char > {
6018 typedef value_category category;
type_nameswig::traits6019 static const char* type_name() { return"char"; }
6020 };
6021 template <> struct traits_asval< char > {
6022 typedef char value_type;
asvalswig::traits_asval6023 static int asval(PyObject *obj, value_type *val) {
6024 return SWIG_AsVal_char (obj, val);
6025 }
6026 };
6027 template <> struct traits_from< char > {
6028 typedef char value_type;
fromswig::traits_from6029 static PyObject *from(const value_type& val) {
6030 return SWIG_From_char (val);
6031 }
6032 };
6033 }
6034
6035
6036 namespace swig {
6037 template <> struct traits<std::vector< char const*, std::allocator< char const * > > > {
6038 typedef value_category category;
type_nameswig::traits6039 static const char* type_name() {
6040 return "std::vector<" "char" " const*," "std::allocator< char const * >" " >";
6041 }
6042 };
6043 }
6044
std_vector_Sl_char_SS_const_Sm__Sg__iterator(std::vector<char const * > * self,PyObject ** PYTHON_SELF)6045 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_char_SS_const_Sm__Sg__iterator(std::vector< char const * > *self,PyObject **PYTHON_SELF){
6046 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6047 }
std_vector_Sl_char_SS_const_Sm__Sg____nonzero__(std::vector<char const * > const * self)6048 SWIGINTERN bool std_vector_Sl_char_SS_const_Sm__Sg____nonzero__(std::vector< char const * > const *self){
6049 return !(self->empty());
6050 }
std_vector_Sl_char_SS_const_Sm__Sg____bool__(std::vector<char const * > const * self)6051 SWIGINTERN bool std_vector_Sl_char_SS_const_Sm__Sg____bool__(std::vector< char const * > const *self){
6052 return !(self->empty());
6053 }
std_vector_Sl_char_SS_const_Sm__Sg____len__(std::vector<char const * > const * self)6054 SWIGINTERN std::vector< char const * >::size_type std_vector_Sl_char_SS_const_Sm__Sg____len__(std::vector< char const * > const *self){
6055 return self->size();
6056 }
std_vector_Sl_char_SS_const_Sm__Sg____getslice__(std::vector<char const * > * self,std::vector<char const * >::difference_type i,std::vector<char const * >::difference_type j)6057 SWIGINTERN std::vector< char const *,std::allocator< char const * > > *std_vector_Sl_char_SS_const_Sm__Sg____getslice__(std::vector< char const * > *self,std::vector< char const * >::difference_type i,std::vector< char const * >::difference_type j){
6058 return swig::getslice(self, i, j, 1);
6059 }
std_vector_Sl_char_SS_const_Sm__Sg____setslice____SWIG_0(std::vector<char const * > * self,std::vector<char const * >::difference_type i,std::vector<char const * >::difference_type j)6060 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg____setslice____SWIG_0(std::vector< char const * > *self,std::vector< char const * >::difference_type i,std::vector< char const * >::difference_type j){
6061 swig::setslice(self, i, j, 1, std::vector< char const*,std::allocator< char const * > >());
6062 }
std_vector_Sl_char_SS_const_Sm__Sg____setslice____SWIG_1(std::vector<char const * > * self,std::vector<char const * >::difference_type i,std::vector<char const * >::difference_type j,std::vector<char const *,std::allocator<char const * >> const & v)6063 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg____setslice____SWIG_1(std::vector< char const * > *self,std::vector< char const * >::difference_type i,std::vector< char const * >::difference_type j,std::vector< char const *,std::allocator< char const * > > const &v){
6064 swig::setslice(self, i, j, 1, v);
6065 }
std_vector_Sl_char_SS_const_Sm__Sg____delslice__(std::vector<char const * > * self,std::vector<char const * >::difference_type i,std::vector<char const * >::difference_type j)6066 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg____delslice__(std::vector< char const * > *self,std::vector< char const * >::difference_type i,std::vector< char const * >::difference_type j){
6067 swig::delslice(self, i, j, 1);
6068 }
std_vector_Sl_char_SS_const_Sm__Sg____delitem____SWIG_0(std::vector<char const * > * self,std::vector<char const * >::difference_type i)6069 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg____delitem____SWIG_0(std::vector< char const * > *self,std::vector< char const * >::difference_type i){
6070 swig::erase(self, swig::getpos(self, i));
6071 }
std_vector_Sl_char_SS_const_Sm__Sg____getitem____SWIG_0(std::vector<char const * > * self,PySliceObject * slice)6072 SWIGINTERN std::vector< char const *,std::allocator< char const * > > *std_vector_Sl_char_SS_const_Sm__Sg____getitem____SWIG_0(std::vector< char const * > *self,PySliceObject *slice){
6073 Py_ssize_t i, j, step;
6074 if( !PySlice_Check(slice) ) {
6075 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6076 return NULL;
6077 }
6078 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6079 std::vector< char const*,std::allocator< char const * > >::difference_type id = i;
6080 std::vector< char const*,std::allocator< char const * > >::difference_type jd = j;
6081 return swig::getslice(self, id, jd, step);
6082 }
std_vector_Sl_char_SS_const_Sm__Sg____setitem____SWIG_0(std::vector<char const * > * self,PySliceObject * slice,std::vector<char const *,std::allocator<char const * >> const & v)6083 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg____setitem____SWIG_0(std::vector< char const * > *self,PySliceObject *slice,std::vector< char const *,std::allocator< char const * > > const &v){
6084 Py_ssize_t i, j, step;
6085 if( !PySlice_Check(slice) ) {
6086 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6087 return;
6088 }
6089 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6090 std::vector< char const*,std::allocator< char const * > >::difference_type id = i;
6091 std::vector< char const*,std::allocator< char const * > >::difference_type jd = j;
6092 swig::setslice(self, id, jd, step, v);
6093 }
std_vector_Sl_char_SS_const_Sm__Sg____setitem____SWIG_1(std::vector<char const * > * self,PySliceObject * slice)6094 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg____setitem____SWIG_1(std::vector< char const * > *self,PySliceObject *slice){
6095 Py_ssize_t i, j, step;
6096 if( !PySlice_Check(slice) ) {
6097 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6098 return;
6099 }
6100 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6101 std::vector< char const*,std::allocator< char const * > >::difference_type id = i;
6102 std::vector< char const*,std::allocator< char const * > >::difference_type jd = j;
6103 swig::delslice(self, id, jd, step);
6104 }
std_vector_Sl_char_SS_const_Sm__Sg____delitem____SWIG_1(std::vector<char const * > * self,PySliceObject * slice)6105 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg____delitem____SWIG_1(std::vector< char const * > *self,PySliceObject *slice){
6106 Py_ssize_t i, j, step;
6107 if( !PySlice_Check(slice) ) {
6108 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6109 return;
6110 }
6111 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6112 std::vector< char const*,std::allocator< char const * > >::difference_type id = i;
6113 std::vector< char const*,std::allocator< char const * > >::difference_type jd = j;
6114 swig::delslice(self, id, jd, step);
6115 }
std_vector_Sl_char_SS_const_Sm__Sg____getitem____SWIG_1(std::vector<char const * > * self,std::vector<char const * >::difference_type i)6116 SWIGINTERN std::vector< char const * >::value_type std_vector_Sl_char_SS_const_Sm__Sg____getitem____SWIG_1(std::vector< char const * > *self,std::vector< char const * >::difference_type i){
6117 return *(swig::cgetpos(self, i));
6118 }
6119
6120 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtr(const char * cptr)6121 SWIG_FromCharPtr(const char *cptr)
6122 {
6123 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
6124 }
6125
6126
6127
6128
std_vector_Sl_char_SS_const_Sm__Sg____setitem____SWIG_2(std::vector<char const * > * self,std::vector<char const * >::difference_type i,std::vector<char const * >::value_type x)6129 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg____setitem____SWIG_2(std::vector< char const * > *self,std::vector< char const * >::difference_type i,std::vector< char const * >::value_type x){
6130 *(swig::getpos(self,i)) = x;
6131 }
std_vector_Sl_char_SS_const_Sm__Sg__pop(std::vector<char const * > * self)6132 SWIGINTERN std::vector< char const * >::value_type std_vector_Sl_char_SS_const_Sm__Sg__pop(std::vector< char const * > *self){
6133 if (self->size() == 0)
6134 throw std::out_of_range("pop from empty container");
6135 std::vector< char const*,std::allocator< char const * > >::value_type x = self->back();
6136 self->pop_back();
6137 return x;
6138 }
std_vector_Sl_char_SS_const_Sm__Sg__append(std::vector<char const * > * self,std::vector<char const * >::value_type x)6139 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg__append(std::vector< char const * > *self,std::vector< char const * >::value_type x){
6140 self->push_back(x);
6141 }
std_vector_Sl_char_SS_const_Sm__Sg__erase__SWIG_0(std::vector<char const * > * self,std::vector<char const * >::iterator pos)6142 SWIGINTERN std::vector< char const * >::iterator std_vector_Sl_char_SS_const_Sm__Sg__erase__SWIG_0(std::vector< char const * > *self,std::vector< char const * >::iterator pos){ return self->erase(pos); }
std_vector_Sl_char_SS_const_Sm__Sg__erase__SWIG_1(std::vector<char const * > * self,std::vector<char const * >::iterator first,std::vector<char const * >::iterator last)6143 SWIGINTERN std::vector< char const * >::iterator std_vector_Sl_char_SS_const_Sm__Sg__erase__SWIG_1(std::vector< char const * > *self,std::vector< char const * >::iterator first,std::vector< char const * >::iterator last){ return self->erase(first, last); }
std_vector_Sl_char_SS_const_Sm__Sg__insert__SWIG_0(std::vector<char const * > * self,std::vector<char const * >::iterator pos,std::vector<char const * >::value_type x)6144 SWIGINTERN std::vector< char const * >::iterator std_vector_Sl_char_SS_const_Sm__Sg__insert__SWIG_0(std::vector< char const * > *self,std::vector< char const * >::iterator pos,std::vector< char const * >::value_type x){ return self->insert(pos, x); }
std_vector_Sl_char_SS_const_Sm__Sg__insert__SWIG_1(std::vector<char const * > * self,std::vector<char const * >::iterator pos,std::vector<char const * >::size_type n,std::vector<char const * >::value_type x)6145 SWIGINTERN void std_vector_Sl_char_SS_const_Sm__Sg__insert__SWIG_1(std::vector< char const * > *self,std::vector< char const * >::iterator pos,std::vector< char const * >::size_type n,std::vector< char const * >::value_type x){ self->insert(pos, n, x); }
6146
6147 namespace swig {
6148 template <> struct traits< SOLUTION > {
6149 typedef pointer_category category;
type_nameswig::traits6150 static const char* type_name() { return"SOLUTION"; }
6151 };
6152 }
6153
6154
6155 namespace swig {
6156 template <> struct traits<std::vector< SOLUTION, std::allocator< SOLUTION > > > {
6157 typedef pointer_category category;
type_nameswig::traits6158 static const char* type_name() {
6159 return "std::vector<" "SOLUTION" "," "std::allocator< SOLUTION >" " >";
6160 }
6161 };
6162 }
6163
std_vector_Sl_SOLUTION_Sg__iterator(std::vector<SOLUTION> * self,PyObject ** PYTHON_SELF)6164 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_SOLUTION_Sg__iterator(std::vector< SOLUTION > *self,PyObject **PYTHON_SELF){
6165 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6166 }
std_vector_Sl_SOLUTION_Sg____nonzero__(std::vector<SOLUTION> const * self)6167 SWIGINTERN bool std_vector_Sl_SOLUTION_Sg____nonzero__(std::vector< SOLUTION > const *self){
6168 return !(self->empty());
6169 }
std_vector_Sl_SOLUTION_Sg____bool__(std::vector<SOLUTION> const * self)6170 SWIGINTERN bool std_vector_Sl_SOLUTION_Sg____bool__(std::vector< SOLUTION > const *self){
6171 return !(self->empty());
6172 }
std_vector_Sl_SOLUTION_Sg____len__(std::vector<SOLUTION> const * self)6173 SWIGINTERN std::vector< SOLUTION >::size_type std_vector_Sl_SOLUTION_Sg____len__(std::vector< SOLUTION > const *self){
6174 return self->size();
6175 }
std_vector_Sl_SOLUTION_Sg____getslice__(std::vector<SOLUTION> * self,std::vector<SOLUTION>::difference_type i,std::vector<SOLUTION>::difference_type j)6176 SWIGINTERN std::vector< SOLUTION,std::allocator< SOLUTION > > *std_vector_Sl_SOLUTION_Sg____getslice__(std::vector< SOLUTION > *self,std::vector< SOLUTION >::difference_type i,std::vector< SOLUTION >::difference_type j){
6177 return swig::getslice(self, i, j, 1);
6178 }
std_vector_Sl_SOLUTION_Sg____setslice____SWIG_0(std::vector<SOLUTION> * self,std::vector<SOLUTION>::difference_type i,std::vector<SOLUTION>::difference_type j)6179 SWIGINTERN void std_vector_Sl_SOLUTION_Sg____setslice____SWIG_0(std::vector< SOLUTION > *self,std::vector< SOLUTION >::difference_type i,std::vector< SOLUTION >::difference_type j){
6180 swig::setslice(self, i, j, 1, std::vector< SOLUTION,std::allocator< SOLUTION > >());
6181 }
std_vector_Sl_SOLUTION_Sg____setslice____SWIG_1(std::vector<SOLUTION> * self,std::vector<SOLUTION>::difference_type i,std::vector<SOLUTION>::difference_type j,std::vector<SOLUTION,std::allocator<SOLUTION>> const & v)6182 SWIGINTERN void std_vector_Sl_SOLUTION_Sg____setslice____SWIG_1(std::vector< SOLUTION > *self,std::vector< SOLUTION >::difference_type i,std::vector< SOLUTION >::difference_type j,std::vector< SOLUTION,std::allocator< SOLUTION > > const &v){
6183 swig::setslice(self, i, j, 1, v);
6184 }
std_vector_Sl_SOLUTION_Sg____delslice__(std::vector<SOLUTION> * self,std::vector<SOLUTION>::difference_type i,std::vector<SOLUTION>::difference_type j)6185 SWIGINTERN void std_vector_Sl_SOLUTION_Sg____delslice__(std::vector< SOLUTION > *self,std::vector< SOLUTION >::difference_type i,std::vector< SOLUTION >::difference_type j){
6186 swig::delslice(self, i, j, 1);
6187 }
std_vector_Sl_SOLUTION_Sg____delitem____SWIG_0(std::vector<SOLUTION> * self,std::vector<SOLUTION>::difference_type i)6188 SWIGINTERN void std_vector_Sl_SOLUTION_Sg____delitem____SWIG_0(std::vector< SOLUTION > *self,std::vector< SOLUTION >::difference_type i){
6189 swig::erase(self, swig::getpos(self, i));
6190 }
std_vector_Sl_SOLUTION_Sg____getitem____SWIG_0(std::vector<SOLUTION> * self,PySliceObject * slice)6191 SWIGINTERN std::vector< SOLUTION,std::allocator< SOLUTION > > *std_vector_Sl_SOLUTION_Sg____getitem____SWIG_0(std::vector< SOLUTION > *self,PySliceObject *slice){
6192 Py_ssize_t i, j, step;
6193 if( !PySlice_Check(slice) ) {
6194 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6195 return NULL;
6196 }
6197 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6198 std::vector< SOLUTION,std::allocator< SOLUTION > >::difference_type id = i;
6199 std::vector< SOLUTION,std::allocator< SOLUTION > >::difference_type jd = j;
6200 return swig::getslice(self, id, jd, step);
6201 }
std_vector_Sl_SOLUTION_Sg____setitem____SWIG_0(std::vector<SOLUTION> * self,PySliceObject * slice,std::vector<SOLUTION,std::allocator<SOLUTION>> const & v)6202 SWIGINTERN void std_vector_Sl_SOLUTION_Sg____setitem____SWIG_0(std::vector< SOLUTION > *self,PySliceObject *slice,std::vector< SOLUTION,std::allocator< SOLUTION > > const &v){
6203 Py_ssize_t i, j, step;
6204 if( !PySlice_Check(slice) ) {
6205 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6206 return;
6207 }
6208 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6209 std::vector< SOLUTION,std::allocator< SOLUTION > >::difference_type id = i;
6210 std::vector< SOLUTION,std::allocator< SOLUTION > >::difference_type jd = j;
6211 swig::setslice(self, id, jd, step, v);
6212 }
std_vector_Sl_SOLUTION_Sg____setitem____SWIG_1(std::vector<SOLUTION> * self,PySliceObject * slice)6213 SWIGINTERN void std_vector_Sl_SOLUTION_Sg____setitem____SWIG_1(std::vector< SOLUTION > *self,PySliceObject *slice){
6214 Py_ssize_t i, j, step;
6215 if( !PySlice_Check(slice) ) {
6216 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6217 return;
6218 }
6219 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6220 std::vector< SOLUTION,std::allocator< SOLUTION > >::difference_type id = i;
6221 std::vector< SOLUTION,std::allocator< SOLUTION > >::difference_type jd = j;
6222 swig::delslice(self, id, jd, step);
6223 }
std_vector_Sl_SOLUTION_Sg____delitem____SWIG_1(std::vector<SOLUTION> * self,PySliceObject * slice)6224 SWIGINTERN void std_vector_Sl_SOLUTION_Sg____delitem____SWIG_1(std::vector< SOLUTION > *self,PySliceObject *slice){
6225 Py_ssize_t i, j, step;
6226 if( !PySlice_Check(slice) ) {
6227 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6228 return;
6229 }
6230 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6231 std::vector< SOLUTION,std::allocator< SOLUTION > >::difference_type id = i;
6232 std::vector< SOLUTION,std::allocator< SOLUTION > >::difference_type jd = j;
6233 swig::delslice(self, id, jd, step);
6234 }
std_vector_Sl_SOLUTION_Sg____getitem____SWIG_1(std::vector<SOLUTION> const * self,std::vector<SOLUTION>::difference_type i)6235 SWIGINTERN std::vector< SOLUTION >::value_type const &std_vector_Sl_SOLUTION_Sg____getitem____SWIG_1(std::vector< SOLUTION > const *self,std::vector< SOLUTION >::difference_type i){
6236 return *(swig::cgetpos(self, i));
6237 }
std_vector_Sl_SOLUTION_Sg____setitem____SWIG_2(std::vector<SOLUTION> * self,std::vector<SOLUTION>::difference_type i,std::vector<SOLUTION>::value_type const & x)6238 SWIGINTERN void std_vector_Sl_SOLUTION_Sg____setitem____SWIG_2(std::vector< SOLUTION > *self,std::vector< SOLUTION >::difference_type i,std::vector< SOLUTION >::value_type const &x){
6239 *(swig::getpos(self,i)) = x;
6240 }
std_vector_Sl_SOLUTION_Sg__pop(std::vector<SOLUTION> * self)6241 SWIGINTERN std::vector< SOLUTION >::value_type std_vector_Sl_SOLUTION_Sg__pop(std::vector< SOLUTION > *self){
6242 if (self->size() == 0)
6243 throw std::out_of_range("pop from empty container");
6244 std::vector< SOLUTION,std::allocator< SOLUTION > >::value_type x = self->back();
6245 self->pop_back();
6246 return x;
6247 }
std_vector_Sl_SOLUTION_Sg__append(std::vector<SOLUTION> * self,std::vector<SOLUTION>::value_type const & x)6248 SWIGINTERN void std_vector_Sl_SOLUTION_Sg__append(std::vector< SOLUTION > *self,std::vector< SOLUTION >::value_type const &x){
6249 self->push_back(x);
6250 }
std_vector_Sl_SOLUTION_Sg__erase__SWIG_0(std::vector<SOLUTION> * self,std::vector<SOLUTION>::iterator pos)6251 SWIGINTERN std::vector< SOLUTION >::iterator std_vector_Sl_SOLUTION_Sg__erase__SWIG_0(std::vector< SOLUTION > *self,std::vector< SOLUTION >::iterator pos){ return self->erase(pos); }
std_vector_Sl_SOLUTION_Sg__erase__SWIG_1(std::vector<SOLUTION> * self,std::vector<SOLUTION>::iterator first,std::vector<SOLUTION>::iterator last)6252 SWIGINTERN std::vector< SOLUTION >::iterator std_vector_Sl_SOLUTION_Sg__erase__SWIG_1(std::vector< SOLUTION > *self,std::vector< SOLUTION >::iterator first,std::vector< SOLUTION >::iterator last){ return self->erase(first, last); }
std_vector_Sl_SOLUTION_Sg__insert__SWIG_0(std::vector<SOLUTION> * self,std::vector<SOLUTION>::iterator pos,std::vector<SOLUTION>::value_type const & x)6253 SWIGINTERN std::vector< SOLUTION >::iterator std_vector_Sl_SOLUTION_Sg__insert__SWIG_0(std::vector< SOLUTION > *self,std::vector< SOLUTION >::iterator pos,std::vector< SOLUTION >::value_type const &x){ return self->insert(pos, x); }
std_vector_Sl_SOLUTION_Sg__insert__SWIG_1(std::vector<SOLUTION> * self,std::vector<SOLUTION>::iterator pos,std::vector<SOLUTION>::size_type n,std::vector<SOLUTION>::value_type const & x)6254 SWIGINTERN void std_vector_Sl_SOLUTION_Sg__insert__SWIG_1(std::vector< SOLUTION > *self,std::vector< SOLUTION >::iterator pos,std::vector< SOLUTION >::size_type n,std::vector< SOLUTION >::value_type const &x){ self->insert(pos, n, x); }
6255
6256 namespace swig {
6257 template <> struct traits< COORDINATE > {
6258 typedef pointer_category category;
type_nameswig::traits6259 static const char* type_name() { return"COORDINATE"; }
6260 };
6261 }
6262
6263
6264 namespace swig {
6265 template <> struct traits<std::vector< COORDINATE, std::allocator< COORDINATE > > > {
6266 typedef pointer_category category;
type_nameswig::traits6267 static const char* type_name() {
6268 return "std::vector<" "COORDINATE" "," "std::allocator< COORDINATE >" " >";
6269 }
6270 };
6271 }
6272
std_vector_Sl_COORDINATE_Sg__iterator(std::vector<COORDINATE> * self,PyObject ** PYTHON_SELF)6273 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_COORDINATE_Sg__iterator(std::vector< COORDINATE > *self,PyObject **PYTHON_SELF){
6274 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6275 }
std_vector_Sl_COORDINATE_Sg____nonzero__(std::vector<COORDINATE> const * self)6276 SWIGINTERN bool std_vector_Sl_COORDINATE_Sg____nonzero__(std::vector< COORDINATE > const *self){
6277 return !(self->empty());
6278 }
std_vector_Sl_COORDINATE_Sg____bool__(std::vector<COORDINATE> const * self)6279 SWIGINTERN bool std_vector_Sl_COORDINATE_Sg____bool__(std::vector< COORDINATE > const *self){
6280 return !(self->empty());
6281 }
std_vector_Sl_COORDINATE_Sg____len__(std::vector<COORDINATE> const * self)6282 SWIGINTERN std::vector< COORDINATE >::size_type std_vector_Sl_COORDINATE_Sg____len__(std::vector< COORDINATE > const *self){
6283 return self->size();
6284 }
std_vector_Sl_COORDINATE_Sg____getslice__(std::vector<COORDINATE> * self,std::vector<COORDINATE>::difference_type i,std::vector<COORDINATE>::difference_type j)6285 SWIGINTERN std::vector< COORDINATE,std::allocator< COORDINATE > > *std_vector_Sl_COORDINATE_Sg____getslice__(std::vector< COORDINATE > *self,std::vector< COORDINATE >::difference_type i,std::vector< COORDINATE >::difference_type j){
6286 return swig::getslice(self, i, j, 1);
6287 }
std_vector_Sl_COORDINATE_Sg____setslice____SWIG_0(std::vector<COORDINATE> * self,std::vector<COORDINATE>::difference_type i,std::vector<COORDINATE>::difference_type j)6288 SWIGINTERN void std_vector_Sl_COORDINATE_Sg____setslice____SWIG_0(std::vector< COORDINATE > *self,std::vector< COORDINATE >::difference_type i,std::vector< COORDINATE >::difference_type j){
6289 swig::setslice(self, i, j, 1, std::vector< COORDINATE,std::allocator< COORDINATE > >());
6290 }
std_vector_Sl_COORDINATE_Sg____setslice____SWIG_1(std::vector<COORDINATE> * self,std::vector<COORDINATE>::difference_type i,std::vector<COORDINATE>::difference_type j,std::vector<COORDINATE,std::allocator<COORDINATE>> const & v)6291 SWIGINTERN void std_vector_Sl_COORDINATE_Sg____setslice____SWIG_1(std::vector< COORDINATE > *self,std::vector< COORDINATE >::difference_type i,std::vector< COORDINATE >::difference_type j,std::vector< COORDINATE,std::allocator< COORDINATE > > const &v){
6292 swig::setslice(self, i, j, 1, v);
6293 }
std_vector_Sl_COORDINATE_Sg____delslice__(std::vector<COORDINATE> * self,std::vector<COORDINATE>::difference_type i,std::vector<COORDINATE>::difference_type j)6294 SWIGINTERN void std_vector_Sl_COORDINATE_Sg____delslice__(std::vector< COORDINATE > *self,std::vector< COORDINATE >::difference_type i,std::vector< COORDINATE >::difference_type j){
6295 swig::delslice(self, i, j, 1);
6296 }
std_vector_Sl_COORDINATE_Sg____delitem____SWIG_0(std::vector<COORDINATE> * self,std::vector<COORDINATE>::difference_type i)6297 SWIGINTERN void std_vector_Sl_COORDINATE_Sg____delitem____SWIG_0(std::vector< COORDINATE > *self,std::vector< COORDINATE >::difference_type i){
6298 swig::erase(self, swig::getpos(self, i));
6299 }
std_vector_Sl_COORDINATE_Sg____getitem____SWIG_0(std::vector<COORDINATE> * self,PySliceObject * slice)6300 SWIGINTERN std::vector< COORDINATE,std::allocator< COORDINATE > > *std_vector_Sl_COORDINATE_Sg____getitem____SWIG_0(std::vector< COORDINATE > *self,PySliceObject *slice){
6301 Py_ssize_t i, j, step;
6302 if( !PySlice_Check(slice) ) {
6303 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6304 return NULL;
6305 }
6306 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6307 std::vector< COORDINATE,std::allocator< COORDINATE > >::difference_type id = i;
6308 std::vector< COORDINATE,std::allocator< COORDINATE > >::difference_type jd = j;
6309 return swig::getslice(self, id, jd, step);
6310 }
std_vector_Sl_COORDINATE_Sg____setitem____SWIG_0(std::vector<COORDINATE> * self,PySliceObject * slice,std::vector<COORDINATE,std::allocator<COORDINATE>> const & v)6311 SWIGINTERN void std_vector_Sl_COORDINATE_Sg____setitem____SWIG_0(std::vector< COORDINATE > *self,PySliceObject *slice,std::vector< COORDINATE,std::allocator< COORDINATE > > const &v){
6312 Py_ssize_t i, j, step;
6313 if( !PySlice_Check(slice) ) {
6314 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6315 return;
6316 }
6317 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6318 std::vector< COORDINATE,std::allocator< COORDINATE > >::difference_type id = i;
6319 std::vector< COORDINATE,std::allocator< COORDINATE > >::difference_type jd = j;
6320 swig::setslice(self, id, jd, step, v);
6321 }
std_vector_Sl_COORDINATE_Sg____setitem____SWIG_1(std::vector<COORDINATE> * self,PySliceObject * slice)6322 SWIGINTERN void std_vector_Sl_COORDINATE_Sg____setitem____SWIG_1(std::vector< COORDINATE > *self,PySliceObject *slice){
6323 Py_ssize_t i, j, step;
6324 if( !PySlice_Check(slice) ) {
6325 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6326 return;
6327 }
6328 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6329 std::vector< COORDINATE,std::allocator< COORDINATE > >::difference_type id = i;
6330 std::vector< COORDINATE,std::allocator< COORDINATE > >::difference_type jd = j;
6331 swig::delslice(self, id, jd, step);
6332 }
std_vector_Sl_COORDINATE_Sg____delitem____SWIG_1(std::vector<COORDINATE> * self,PySliceObject * slice)6333 SWIGINTERN void std_vector_Sl_COORDINATE_Sg____delitem____SWIG_1(std::vector< COORDINATE > *self,PySliceObject *slice){
6334 Py_ssize_t i, j, step;
6335 if( !PySlice_Check(slice) ) {
6336 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6337 return;
6338 }
6339 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6340 std::vector< COORDINATE,std::allocator< COORDINATE > >::difference_type id = i;
6341 std::vector< COORDINATE,std::allocator< COORDINATE > >::difference_type jd = j;
6342 swig::delslice(self, id, jd, step);
6343 }
std_vector_Sl_COORDINATE_Sg____getitem____SWIG_1(std::vector<COORDINATE> const * self,std::vector<COORDINATE>::difference_type i)6344 SWIGINTERN std::vector< COORDINATE >::value_type const &std_vector_Sl_COORDINATE_Sg____getitem____SWIG_1(std::vector< COORDINATE > const *self,std::vector< COORDINATE >::difference_type i){
6345 return *(swig::cgetpos(self, i));
6346 }
std_vector_Sl_COORDINATE_Sg____setitem____SWIG_2(std::vector<COORDINATE> * self,std::vector<COORDINATE>::difference_type i,std::vector<COORDINATE>::value_type const & x)6347 SWIGINTERN void std_vector_Sl_COORDINATE_Sg____setitem____SWIG_2(std::vector< COORDINATE > *self,std::vector< COORDINATE >::difference_type i,std::vector< COORDINATE >::value_type const &x){
6348 *(swig::getpos(self,i)) = x;
6349 }
std_vector_Sl_COORDINATE_Sg__pop(std::vector<COORDINATE> * self)6350 SWIGINTERN std::vector< COORDINATE >::value_type std_vector_Sl_COORDINATE_Sg__pop(std::vector< COORDINATE > *self){
6351 if (self->size() == 0)
6352 throw std::out_of_range("pop from empty container");
6353 std::vector< COORDINATE,std::allocator< COORDINATE > >::value_type x = self->back();
6354 self->pop_back();
6355 return x;
6356 }
std_vector_Sl_COORDINATE_Sg__append(std::vector<COORDINATE> * self,std::vector<COORDINATE>::value_type const & x)6357 SWIGINTERN void std_vector_Sl_COORDINATE_Sg__append(std::vector< COORDINATE > *self,std::vector< COORDINATE >::value_type const &x){
6358 self->push_back(x);
6359 }
std_vector_Sl_COORDINATE_Sg__erase__SWIG_0(std::vector<COORDINATE> * self,std::vector<COORDINATE>::iterator pos)6360 SWIGINTERN std::vector< COORDINATE >::iterator std_vector_Sl_COORDINATE_Sg__erase__SWIG_0(std::vector< COORDINATE > *self,std::vector< COORDINATE >::iterator pos){ return self->erase(pos); }
std_vector_Sl_COORDINATE_Sg__erase__SWIG_1(std::vector<COORDINATE> * self,std::vector<COORDINATE>::iterator first,std::vector<COORDINATE>::iterator last)6361 SWIGINTERN std::vector< COORDINATE >::iterator std_vector_Sl_COORDINATE_Sg__erase__SWIG_1(std::vector< COORDINATE > *self,std::vector< COORDINATE >::iterator first,std::vector< COORDINATE >::iterator last){ return self->erase(first, last); }
std_vector_Sl_COORDINATE_Sg__insert__SWIG_0(std::vector<COORDINATE> * self,std::vector<COORDINATE>::iterator pos,std::vector<COORDINATE>::value_type const & x)6362 SWIGINTERN std::vector< COORDINATE >::iterator std_vector_Sl_COORDINATE_Sg__insert__SWIG_0(std::vector< COORDINATE > *self,std::vector< COORDINATE >::iterator pos,std::vector< COORDINATE >::value_type const &x){ return self->insert(pos, x); }
std_vector_Sl_COORDINATE_Sg__insert__SWIG_1(std::vector<COORDINATE> * self,std::vector<COORDINATE>::iterator pos,std::vector<COORDINATE>::size_type n,std::vector<COORDINATE>::value_type const & x)6363 SWIGINTERN void std_vector_Sl_COORDINATE_Sg__insert__SWIG_1(std::vector< COORDINATE > *self,std::vector< COORDINATE >::iterator pos,std::vector< COORDINATE >::size_type n,std::vector< COORDINATE >::value_type const &x){ self->insert(pos, n, x); }
6364
6365 namespace swig {
6366 template <> struct traits<std::vector< std::vector< double,std::allocator< double > >, std::allocator< std::vector< double,std::allocator< double > > > > > {
6367 typedef pointer_category category;
type_nameswig::traits6368 static const char* type_name() {
6369 return "std::vector<" "std::vector< double,std::allocator< double > >" "," "std::allocator< std::vector< double,std::allocator< double > > >" " >";
6370 }
6371 };
6372 }
6373
std_vector_Sl_std_vector_Sl_double_Sg__Sg__iterator(std::vector<std::vector<double>> * self,PyObject ** PYTHON_SELF)6374 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_vector_Sl_double_Sg__Sg__iterator(std::vector< std::vector< double > > *self,PyObject **PYTHON_SELF){
6375 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6376 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____nonzero__(std::vector<std::vector<double>> const * self)6377 SWIGINTERN bool std_vector_Sl_std_vector_Sl_double_Sg__Sg____nonzero__(std::vector< std::vector< double > > const *self){
6378 return !(self->empty());
6379 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____bool__(std::vector<std::vector<double>> const * self)6380 SWIGINTERN bool std_vector_Sl_std_vector_Sl_double_Sg__Sg____bool__(std::vector< std::vector< double > > const *self){
6381 return !(self->empty());
6382 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____len__(std::vector<std::vector<double>> const * self)6383 SWIGINTERN std::vector< std::vector< double > >::size_type std_vector_Sl_std_vector_Sl_double_Sg__Sg____len__(std::vector< std::vector< double > > const *self){
6384 return self->size();
6385 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____getslice__(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::difference_type i,std::vector<std::vector<double>>::difference_type j)6386 SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getslice__(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type j){
6387 return swig::getslice(self, i, j, 1);
6388 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____setslice____SWIG_0(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::difference_type i,std::vector<std::vector<double>>::difference_type j)6389 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setslice____SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type j){
6390 swig::setslice(self, i, j, 1, std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >());
6391 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____setslice____SWIG_1(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::difference_type i,std::vector<std::vector<double>>::difference_type j,std::vector<std::vector<double,std::allocator<double>>,std::allocator<std::vector<double,std::allocator<double>>>> const & v)6392 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setslice____SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type j,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){
6393 swig::setslice(self, i, j, 1, v);
6394 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____delslice__(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::difference_type i,std::vector<std::vector<double>>::difference_type j)6395 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delslice__(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::difference_type j){
6396 swig::delslice(self, i, j, 1);
6397 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::difference_type i)6398 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i){
6399 swig::erase(self, swig::getpos(self, i));
6400 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector<std::vector<double>> * self,PySliceObject * slice)6401 SWIGINTERN std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > *std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice){
6402 Py_ssize_t i, j, step;
6403 if( !PySlice_Check(slice) ) {
6404 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6405 return NULL;
6406 }
6407 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6408 std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i;
6409 std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j;
6410 return swig::getslice(self, id, jd, step);
6411 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector<std::vector<double>> * self,PySliceObject * slice,std::vector<std::vector<double,std::allocator<double>>,std::allocator<std::vector<double,std::allocator<double>>>> const & v)6412 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< double > > *self,PySliceObject *slice,std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > > const &v){
6413 Py_ssize_t i, j, step;
6414 if( !PySlice_Check(slice) ) {
6415 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6416 return;
6417 }
6418 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6419 std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i;
6420 std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j;
6421 swig::setslice(self, id, jd, step, v);
6422 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector<std::vector<double>> * self,PySliceObject * slice)6423 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){
6424 Py_ssize_t i, j, step;
6425 if( !PySlice_Check(slice) ) {
6426 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6427 return;
6428 }
6429 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6430 std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i;
6431 std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j;
6432 swig::delslice(self, id, jd, step);
6433 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector<std::vector<double>> * self,PySliceObject * slice)6434 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< double > > *self,PySliceObject *slice){
6435 Py_ssize_t i, j, step;
6436 if( !PySlice_Check(slice) ) {
6437 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6438 return;
6439 }
6440 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6441 std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type id = i;
6442 std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::difference_type jd = j;
6443 swig::delslice(self, id, jd, step);
6444 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_1(std::vector<std::vector<double>> const * self,std::vector<std::vector<double>>::difference_type i)6445 SWIGINTERN std::vector< std::vector< double > >::value_type const &std_vector_Sl_std_vector_Sl_double_Sg__Sg____getitem____SWIG_1(std::vector< std::vector< double > > const *self,std::vector< std::vector< double > >::difference_type i){
6446 return *(swig::cgetpos(self, i));
6447 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_2(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::difference_type i,std::vector<std::vector<double>>::value_type const & x)6448 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg____setitem____SWIG_2(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::difference_type i,std::vector< std::vector< double > >::value_type const &x){
6449 *(swig::getpos(self,i)) = x;
6450 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg__pop(std::vector<std::vector<double>> * self)6451 SWIGINTERN std::vector< std::vector< double > >::value_type std_vector_Sl_std_vector_Sl_double_Sg__Sg__pop(std::vector< std::vector< double > > *self){
6452 if (self->size() == 0)
6453 throw std::out_of_range("pop from empty container");
6454 std::vector< std::vector< double,std::allocator< double > >,std::allocator< std::vector< double,std::allocator< double > > > >::value_type x = self->back();
6455 self->pop_back();
6456 return x;
6457 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg__append(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::value_type const & x)6458 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg__append(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::value_type const &x){
6459 self->push_back(x);
6460 }
std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_0(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::iterator pos)6461 SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos){ return self->erase(pos); }
std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_1(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::iterator first,std::vector<std::vector<double>>::iterator last)6462 SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__erase__SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator first,std::vector< std::vector< double > >::iterator last){ return self->erase(first, last); }
std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_0(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::iterator pos,std::vector<std::vector<double>>::value_type const & x)6463 SWIGINTERN std::vector< std::vector< double > >::iterator std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_0(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos,std::vector< std::vector< double > >::value_type const &x){ return self->insert(pos, x); }
std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_1(std::vector<std::vector<double>> * self,std::vector<std::vector<double>>::iterator pos,std::vector<std::vector<double>>::size_type n,std::vector<std::vector<double>>::value_type const & x)6464 SWIGINTERN void std_vector_Sl_std_vector_Sl_double_Sg__Sg__insert__SWIG_1(std::vector< std::vector< double > > *self,std::vector< std::vector< double > >::iterator pos,std::vector< std::vector< double > >::size_type n,std::vector< std::vector< double > >::value_type const &x){ self->insert(pos, n, x); }
6465
6466 namespace swig {
6467 template <> struct traits<std::vector< std::vector< int,std::allocator< int > >, std::allocator< std::vector< int,std::allocator< int > > > > > {
6468 typedef pointer_category category;
type_nameswig::traits6469 static const char* type_name() {
6470 return "std::vector<" "std::vector< int,std::allocator< int > >" "," "std::allocator< std::vector< int,std::allocator< int > > >" " >";
6471 }
6472 };
6473 }
6474
std_vector_Sl_std_vector_Sl_int_Sg__Sg__iterator(std::vector<std::vector<int>> * self,PyObject ** PYTHON_SELF)6475 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_vector_Sl_int_Sg__Sg__iterator(std::vector< std::vector< int > > *self,PyObject **PYTHON_SELF){
6476 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6477 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____nonzero__(std::vector<std::vector<int>> const * self)6478 SWIGINTERN bool std_vector_Sl_std_vector_Sl_int_Sg__Sg____nonzero__(std::vector< std::vector< int > > const *self){
6479 return !(self->empty());
6480 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____bool__(std::vector<std::vector<int>> const * self)6481 SWIGINTERN bool std_vector_Sl_std_vector_Sl_int_Sg__Sg____bool__(std::vector< std::vector< int > > const *self){
6482 return !(self->empty());
6483 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____len__(std::vector<std::vector<int>> const * self)6484 SWIGINTERN std::vector< std::vector< int > >::size_type std_vector_Sl_std_vector_Sl_int_Sg__Sg____len__(std::vector< std::vector< int > > const *self){
6485 return self->size();
6486 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____getslice__(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::difference_type i,std::vector<std::vector<int>>::difference_type j)6487 SWIGINTERN std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *std_vector_Sl_std_vector_Sl_int_Sg__Sg____getslice__(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::difference_type i,std::vector< std::vector< int > >::difference_type j){
6488 return swig::getslice(self, i, j, 1);
6489 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____setslice____SWIG_0(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::difference_type i,std::vector<std::vector<int>>::difference_type j)6490 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setslice____SWIG_0(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::difference_type i,std::vector< std::vector< int > >::difference_type j){
6491 swig::setslice(self, i, j, 1, std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >());
6492 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____setslice____SWIG_1(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::difference_type i,std::vector<std::vector<int>>::difference_type j,std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> const & v)6493 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setslice____SWIG_1(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::difference_type i,std::vector< std::vector< int > >::difference_type j,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &v){
6494 swig::setslice(self, i, j, 1, v);
6495 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____delslice__(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::difference_type i,std::vector<std::vector<int>>::difference_type j)6496 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delslice__(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::difference_type i,std::vector< std::vector< int > >::difference_type j){
6497 swig::delslice(self, i, j, 1);
6498 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_0(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::difference_type i)6499 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_0(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::difference_type i){
6500 swig::erase(self, swig::getpos(self, i));
6501 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(std::vector<std::vector<int>> * self,PySliceObject * slice)6502 SWIGINTERN std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > *std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_0(std::vector< std::vector< int > > *self,PySliceObject *slice){
6503 Py_ssize_t i, j, step;
6504 if( !PySlice_Check(slice) ) {
6505 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6506 return NULL;
6507 }
6508 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6509 std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i;
6510 std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j;
6511 return swig::getslice(self, id, jd, step);
6512 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_0(std::vector<std::vector<int>> * self,PySliceObject * slice,std::vector<std::vector<int,std::allocator<int>>,std::allocator<std::vector<int,std::allocator<int>>>> const & v)6513 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_0(std::vector< std::vector< int > > *self,PySliceObject *slice,std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > > const &v){
6514 Py_ssize_t i, j, step;
6515 if( !PySlice_Check(slice) ) {
6516 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6517 return;
6518 }
6519 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6520 std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i;
6521 std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j;
6522 swig::setslice(self, id, jd, step, v);
6523 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(std::vector<std::vector<int>> * self,PySliceObject * slice)6524 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_1(std::vector< std::vector< int > > *self,PySliceObject *slice){
6525 Py_ssize_t i, j, step;
6526 if( !PySlice_Check(slice) ) {
6527 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6528 return;
6529 }
6530 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6531 std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i;
6532 std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j;
6533 swig::delslice(self, id, jd, step);
6534 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(std::vector<std::vector<int>> * self,PySliceObject * slice)6535 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____delitem____SWIG_1(std::vector< std::vector< int > > *self,PySliceObject *slice){
6536 Py_ssize_t i, j, step;
6537 if( !PySlice_Check(slice) ) {
6538 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6539 return;
6540 }
6541 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6542 std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type id = i;
6543 std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::difference_type jd = j;
6544 swig::delslice(self, id, jd, step);
6545 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_1(std::vector<std::vector<int>> const * self,std::vector<std::vector<int>>::difference_type i)6546 SWIGINTERN std::vector< std::vector< int > >::value_type const &std_vector_Sl_std_vector_Sl_int_Sg__Sg____getitem____SWIG_1(std::vector< std::vector< int > > const *self,std::vector< std::vector< int > >::difference_type i){
6547 return *(swig::cgetpos(self, i));
6548 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_2(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::difference_type i,std::vector<std::vector<int>>::value_type const & x)6549 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg____setitem____SWIG_2(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::difference_type i,std::vector< std::vector< int > >::value_type const &x){
6550 *(swig::getpos(self,i)) = x;
6551 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg__pop(std::vector<std::vector<int>> * self)6552 SWIGINTERN std::vector< std::vector< int > >::value_type std_vector_Sl_std_vector_Sl_int_Sg__Sg__pop(std::vector< std::vector< int > > *self){
6553 if (self->size() == 0)
6554 throw std::out_of_range("pop from empty container");
6555 std::vector< std::vector< int,std::allocator< int > >,std::allocator< std::vector< int,std::allocator< int > > > >::value_type x = self->back();
6556 self->pop_back();
6557 return x;
6558 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg__append(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::value_type const & x)6559 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg__append(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::value_type const &x){
6560 self->push_back(x);
6561 }
std_vector_Sl_std_vector_Sl_int_Sg__Sg__erase__SWIG_0(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::iterator pos)6562 SWIGINTERN std::vector< std::vector< int > >::iterator std_vector_Sl_std_vector_Sl_int_Sg__Sg__erase__SWIG_0(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::iterator pos){ return self->erase(pos); }
std_vector_Sl_std_vector_Sl_int_Sg__Sg__erase__SWIG_1(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::iterator first,std::vector<std::vector<int>>::iterator last)6563 SWIGINTERN std::vector< std::vector< int > >::iterator std_vector_Sl_std_vector_Sl_int_Sg__Sg__erase__SWIG_1(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::iterator first,std::vector< std::vector< int > >::iterator last){ return self->erase(first, last); }
std_vector_Sl_std_vector_Sl_int_Sg__Sg__insert__SWIG_0(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::iterator pos,std::vector<std::vector<int>>::value_type const & x)6564 SWIGINTERN std::vector< std::vector< int > >::iterator std_vector_Sl_std_vector_Sl_int_Sg__Sg__insert__SWIG_0(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::iterator pos,std::vector< std::vector< int > >::value_type const &x){ return self->insert(pos, x); }
std_vector_Sl_std_vector_Sl_int_Sg__Sg__insert__SWIG_1(std::vector<std::vector<int>> * self,std::vector<std::vector<int>>::iterator pos,std::vector<std::vector<int>>::size_type n,std::vector<std::vector<int>>::value_type const & x)6565 SWIGINTERN void std_vector_Sl_std_vector_Sl_int_Sg__Sg__insert__SWIG_1(std::vector< std::vector< int > > *self,std::vector< std::vector< int > >::iterator pos,std::vector< std::vector< int > >::size_type n,std::vector< std::vector< int > >::value_type const &x){ self->insert(pos, n, x); }
6566
6567 namespace swig {
6568 template <> struct traits< vrna_ep_t > {
6569 typedef pointer_category category;
type_nameswig::traits6570 static const char* type_name() { return"vrna_ep_t"; }
6571 };
6572 }
6573
6574
6575 namespace swig {
6576 template <> struct traits<std::vector< vrna_ep_t, std::allocator< vrna_ep_t > > > {
6577 typedef pointer_category category;
type_nameswig::traits6578 static const char* type_name() {
6579 return "std::vector<" "vrna_ep_t" "," "std::allocator< vrna_ep_t >" " >";
6580 }
6581 };
6582 }
6583
std_vector_Sl_vrna_ep_t_Sg__iterator(std::vector<vrna_ep_t> * self,PyObject ** PYTHON_SELF)6584 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_vrna_ep_t_Sg__iterator(std::vector< vrna_ep_t > *self,PyObject **PYTHON_SELF){
6585 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6586 }
std_vector_Sl_vrna_ep_t_Sg____nonzero__(std::vector<vrna_ep_t> const * self)6587 SWIGINTERN bool std_vector_Sl_vrna_ep_t_Sg____nonzero__(std::vector< vrna_ep_t > const *self){
6588 return !(self->empty());
6589 }
std_vector_Sl_vrna_ep_t_Sg____bool__(std::vector<vrna_ep_t> const * self)6590 SWIGINTERN bool std_vector_Sl_vrna_ep_t_Sg____bool__(std::vector< vrna_ep_t > const *self){
6591 return !(self->empty());
6592 }
std_vector_Sl_vrna_ep_t_Sg____len__(std::vector<vrna_ep_t> const * self)6593 SWIGINTERN std::vector< vrna_ep_t >::size_type std_vector_Sl_vrna_ep_t_Sg____len__(std::vector< vrna_ep_t > const *self){
6594 return self->size();
6595 }
std_vector_Sl_vrna_ep_t_Sg____getslice__(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::difference_type i,std::vector<vrna_ep_t>::difference_type j)6596 SWIGINTERN std::vector< vrna_ep_t,std::allocator< vrna_ep_t > > *std_vector_Sl_vrna_ep_t_Sg____getslice__(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::difference_type i,std::vector< vrna_ep_t >::difference_type j){
6597 return swig::getslice(self, i, j, 1);
6598 }
std_vector_Sl_vrna_ep_t_Sg____setslice____SWIG_0(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::difference_type i,std::vector<vrna_ep_t>::difference_type j)6599 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg____setslice____SWIG_0(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::difference_type i,std::vector< vrna_ep_t >::difference_type j){
6600 swig::setslice(self, i, j, 1, std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >());
6601 }
std_vector_Sl_vrna_ep_t_Sg____setslice____SWIG_1(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::difference_type i,std::vector<vrna_ep_t>::difference_type j,std::vector<vrna_ep_t,std::allocator<vrna_ep_t>> const & v)6602 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg____setslice____SWIG_1(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::difference_type i,std::vector< vrna_ep_t >::difference_type j,std::vector< vrna_ep_t,std::allocator< vrna_ep_t > > const &v){
6603 swig::setslice(self, i, j, 1, v);
6604 }
std_vector_Sl_vrna_ep_t_Sg____delslice__(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::difference_type i,std::vector<vrna_ep_t>::difference_type j)6605 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg____delslice__(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::difference_type i,std::vector< vrna_ep_t >::difference_type j){
6606 swig::delslice(self, i, j, 1);
6607 }
std_vector_Sl_vrna_ep_t_Sg____delitem____SWIG_0(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::difference_type i)6608 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg____delitem____SWIG_0(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::difference_type i){
6609 swig::erase(self, swig::getpos(self, i));
6610 }
std_vector_Sl_vrna_ep_t_Sg____getitem____SWIG_0(std::vector<vrna_ep_t> * self,PySliceObject * slice)6611 SWIGINTERN std::vector< vrna_ep_t,std::allocator< vrna_ep_t > > *std_vector_Sl_vrna_ep_t_Sg____getitem____SWIG_0(std::vector< vrna_ep_t > *self,PySliceObject *slice){
6612 Py_ssize_t i, j, step;
6613 if( !PySlice_Check(slice) ) {
6614 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6615 return NULL;
6616 }
6617 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6618 std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >::difference_type id = i;
6619 std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >::difference_type jd = j;
6620 return swig::getslice(self, id, jd, step);
6621 }
std_vector_Sl_vrna_ep_t_Sg____setitem____SWIG_0(std::vector<vrna_ep_t> * self,PySliceObject * slice,std::vector<vrna_ep_t,std::allocator<vrna_ep_t>> const & v)6622 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg____setitem____SWIG_0(std::vector< vrna_ep_t > *self,PySliceObject *slice,std::vector< vrna_ep_t,std::allocator< vrna_ep_t > > const &v){
6623 Py_ssize_t i, j, step;
6624 if( !PySlice_Check(slice) ) {
6625 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6626 return;
6627 }
6628 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6629 std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >::difference_type id = i;
6630 std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >::difference_type jd = j;
6631 swig::setslice(self, id, jd, step, v);
6632 }
std_vector_Sl_vrna_ep_t_Sg____setitem____SWIG_1(std::vector<vrna_ep_t> * self,PySliceObject * slice)6633 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg____setitem____SWIG_1(std::vector< vrna_ep_t > *self,PySliceObject *slice){
6634 Py_ssize_t i, j, step;
6635 if( !PySlice_Check(slice) ) {
6636 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6637 return;
6638 }
6639 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6640 std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >::difference_type id = i;
6641 std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >::difference_type jd = j;
6642 swig::delslice(self, id, jd, step);
6643 }
std_vector_Sl_vrna_ep_t_Sg____delitem____SWIG_1(std::vector<vrna_ep_t> * self,PySliceObject * slice)6644 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg____delitem____SWIG_1(std::vector< vrna_ep_t > *self,PySliceObject *slice){
6645 Py_ssize_t i, j, step;
6646 if( !PySlice_Check(slice) ) {
6647 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6648 return;
6649 }
6650 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6651 std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >::difference_type id = i;
6652 std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >::difference_type jd = j;
6653 swig::delslice(self, id, jd, step);
6654 }
std_vector_Sl_vrna_ep_t_Sg____getitem____SWIG_1(std::vector<vrna_ep_t> const * self,std::vector<vrna_ep_t>::difference_type i)6655 SWIGINTERN std::vector< vrna_ep_t >::value_type const &std_vector_Sl_vrna_ep_t_Sg____getitem____SWIG_1(std::vector< vrna_ep_t > const *self,std::vector< vrna_ep_t >::difference_type i){
6656 return *(swig::cgetpos(self, i));
6657 }
std_vector_Sl_vrna_ep_t_Sg____setitem____SWIG_2(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::difference_type i,std::vector<vrna_ep_t>::value_type const & x)6658 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg____setitem____SWIG_2(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::difference_type i,std::vector< vrna_ep_t >::value_type const &x){
6659 *(swig::getpos(self,i)) = x;
6660 }
std_vector_Sl_vrna_ep_t_Sg__pop(std::vector<vrna_ep_t> * self)6661 SWIGINTERN std::vector< vrna_ep_t >::value_type std_vector_Sl_vrna_ep_t_Sg__pop(std::vector< vrna_ep_t > *self){
6662 if (self->size() == 0)
6663 throw std::out_of_range("pop from empty container");
6664 std::vector< vrna_ep_t,std::allocator< vrna_ep_t > >::value_type x = self->back();
6665 self->pop_back();
6666 return x;
6667 }
std_vector_Sl_vrna_ep_t_Sg__append(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::value_type const & x)6668 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg__append(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::value_type const &x){
6669 self->push_back(x);
6670 }
std_vector_Sl_vrna_ep_t_Sg__erase__SWIG_0(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::iterator pos)6671 SWIGINTERN std::vector< vrna_ep_t >::iterator std_vector_Sl_vrna_ep_t_Sg__erase__SWIG_0(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::iterator pos){ return self->erase(pos); }
std_vector_Sl_vrna_ep_t_Sg__erase__SWIG_1(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::iterator first,std::vector<vrna_ep_t>::iterator last)6672 SWIGINTERN std::vector< vrna_ep_t >::iterator std_vector_Sl_vrna_ep_t_Sg__erase__SWIG_1(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::iterator first,std::vector< vrna_ep_t >::iterator last){ return self->erase(first, last); }
std_vector_Sl_vrna_ep_t_Sg__insert__SWIG_0(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::iterator pos,std::vector<vrna_ep_t>::value_type const & x)6673 SWIGINTERN std::vector< vrna_ep_t >::iterator std_vector_Sl_vrna_ep_t_Sg__insert__SWIG_0(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::iterator pos,std::vector< vrna_ep_t >::value_type const &x){ return self->insert(pos, x); }
std_vector_Sl_vrna_ep_t_Sg__insert__SWIG_1(std::vector<vrna_ep_t> * self,std::vector<vrna_ep_t>::iterator pos,std::vector<vrna_ep_t>::size_type n,std::vector<vrna_ep_t>::value_type const & x)6674 SWIGINTERN void std_vector_Sl_vrna_ep_t_Sg__insert__SWIG_1(std::vector< vrna_ep_t > *self,std::vector< vrna_ep_t >::iterator pos,std::vector< vrna_ep_t >::size_type n,std::vector< vrna_ep_t >::value_type const &x){ self->insert(pos, n, x); }
6675
6676 namespace swig {
6677 template <> struct traits< vrna_path_t > {
6678 typedef pointer_category category;
type_nameswig::traits6679 static const char* type_name() { return"vrna_path_t"; }
6680 };
6681 }
6682
6683
6684 namespace swig {
6685 template <> struct traits<std::vector< vrna_path_t, std::allocator< vrna_path_t > > > {
6686 typedef pointer_category category;
type_nameswig::traits6687 static const char* type_name() {
6688 return "std::vector<" "vrna_path_t" "," "std::allocator< vrna_path_t >" " >";
6689 }
6690 };
6691 }
6692
std_vector_Sl_vrna_path_t_Sg__iterator(std::vector<vrna_path_t> * self,PyObject ** PYTHON_SELF)6693 SWIGINTERN swig::SwigPyIterator *std_vector_Sl_vrna_path_t_Sg__iterator(std::vector< vrna_path_t > *self,PyObject **PYTHON_SELF){
6694 return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
6695 }
std_vector_Sl_vrna_path_t_Sg____nonzero__(std::vector<vrna_path_t> const * self)6696 SWIGINTERN bool std_vector_Sl_vrna_path_t_Sg____nonzero__(std::vector< vrna_path_t > const *self){
6697 return !(self->empty());
6698 }
std_vector_Sl_vrna_path_t_Sg____bool__(std::vector<vrna_path_t> const * self)6699 SWIGINTERN bool std_vector_Sl_vrna_path_t_Sg____bool__(std::vector< vrna_path_t > const *self){
6700 return !(self->empty());
6701 }
std_vector_Sl_vrna_path_t_Sg____len__(std::vector<vrna_path_t> const * self)6702 SWIGINTERN std::vector< vrna_path_t >::size_type std_vector_Sl_vrna_path_t_Sg____len__(std::vector< vrna_path_t > const *self){
6703 return self->size();
6704 }
std_vector_Sl_vrna_path_t_Sg____getslice__(std::vector<vrna_path_t> * self,std::vector<vrna_path_t>::difference_type i,std::vector<vrna_path_t>::difference_type j)6705 SWIGINTERN std::vector< vrna_path_t,std::allocator< vrna_path_t > > *std_vector_Sl_vrna_path_t_Sg____getslice__(std::vector< vrna_path_t > *self,std::vector< vrna_path_t >::difference_type i,std::vector< vrna_path_t >::difference_type j){
6706 return swig::getslice(self, i, j, 1);
6707 }
std_vector_Sl_vrna_path_t_Sg____setslice____SWIG_0(std::vector<vrna_path_t> * self,std::vector<vrna_path_t>::difference_type i,std::vector<vrna_path_t>::difference_type j)6708 SWIGINTERN void std_vector_Sl_vrna_path_t_Sg____setslice____SWIG_0(std::vector< vrna_path_t > *self,std::vector< vrna_path_t >::difference_type i,std::vector< vrna_path_t >::difference_type j){
6709 swig::setslice(self, i, j, 1, std::vector< vrna_path_t,std::allocator< vrna_path_t > >());
6710 }
std_vector_Sl_vrna_path_t_Sg____setslice____SWIG_1(std::vector<vrna_path_t> * self,std::vector<vrna_path_t>::difference_type i,std::vector<vrna_path_t>::difference_type j,std::vector<vrna_path_t,std::allocator<vrna_path_t>> const & v)6711 SWIGINTERN void std_vector_Sl_vrna_path_t_Sg____setslice____SWIG_1(std::vector< vrna_path_t > *self,std::vector< vrna_path_t >::difference_type i,std::vector< vrna_path_t >::difference_type j,std::vector< vrna_path_t,std::allocator< vrna_path_t > > const &v){
6712 swig::setslice(self, i, j, 1, v);
6713 }
std_vector_Sl_vrna_path_t_Sg____delslice__(std::vector<vrna_path_t> * self,std::vector<vrna_path_t>::difference_type i,std::vector<vrna_path_t>::difference_type j)6714 SWIGINTERN void std_vector_Sl_vrna_path_t_Sg____delslice__(std::vector< vrna_path_t > *self,std::vector< vrna_path_t >::difference_type i,std::vector< vrna_path_t >::difference_type j){
6715 swig::delslice(self, i, j, 1);
6716 }
std_vector_Sl_vrna_path_t_Sg____delitem____SWIG_0(std::vector<vrna_path_t> * self,std::vector<vrna_path_t>::difference_type i)6717 SWIGINTERN void std_vector_Sl_vrna_path_t_Sg____delitem____SWIG_0(std::vector< vrna_path_t > *self,std::vector< vrna_path_t >::difference_type i){
6718 swig::erase(self, swig::getpos(self, i));
6719 }
std_vector_Sl_vrna_path_t_Sg____getitem____SWIG_0(std::vector<vrna_path_t> * self,PySliceObject * slice)6720 SWIGINTERN std::vector< vrna_path_t,std::allocator< vrna_path_t > > *std_vector_Sl_vrna_path_t_Sg____getitem____SWIG_0(std::vector< vrna_path_t > *self,PySliceObject *slice){
6721 Py_ssize_t i, j, step;
6722 if( !PySlice_Check(slice) ) {
6723 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6724 return NULL;
6725 }
6726 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6727 std::vector< vrna_path_t,std::allocator< vrna_path_t > >::difference_type id = i;
6728 std::vector< vrna_path_t,std::allocator< vrna_path_t > >::difference_type jd = j;
6729 return swig::getslice(self, id, jd, step);
6730 }
std_vector_Sl_vrna_path_t_Sg____setitem____SWIG_0(std::vector<vrna_path_t> * self,PySliceObject * slice,std::vector<vrna_path_t,std::allocator<vrna_path_t>> const & v)6731 SWIGINTERN void std_vector_Sl_vrna_path_t_Sg____setitem____SWIG_0(std::vector< vrna_path_t > *self,PySliceObject *slice,std::vector< vrna_path_t,std::allocator< vrna_path_t > > const &v){
6732 Py_ssize_t i, j, step;
6733 if( !PySlice_Check(slice) ) {
6734 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6735 return;
6736 }
6737 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6738 std::vector< vrna_path_t,std::allocator< vrna_path_t > >::difference_type id = i;
6739 std::vector< vrna_path_t,std::allocator< vrna_path_t > >::difference_type jd = j;
6740 swig::setslice(self, id, jd, step, v);
6741 }
std_vector_Sl_vrna_path_t_Sg____setitem____SWIG_1(std::vector<vrna_path_t> * self,PySliceObject * slice)6742 SWIGINTERN void std_vector_Sl_vrna_path_t_Sg____setitem____SWIG_1(std::vector< vrna_path_t > *self,PySliceObject *slice){
6743 Py_ssize_t i, j, step;
6744 if( !PySlice_Check(slice) ) {
6745 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6746 return;
6747 }
6748 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6749 std::vector< vrna_path_t,std::allocator< vrna_path_t > >::difference_type id = i;
6750 std::vector< vrna_path_t,std::allocator< vrna_path_t > >::difference_type jd = j;
6751 swig::delslice(self, id, jd, step);
6752 }
std_vector_Sl_vrna_path_t_Sg____delitem____SWIG_1(std::vector<vrna_path_t> * self,PySliceObject * slice)6753 SWIGINTERN void std_vector_Sl_vrna_path_t_Sg____delitem____SWIG_1(std::vector< vrna_path_t > *self,PySliceObject *slice){
6754 Py_ssize_t i, j, step;
6755 if( !PySlice_Check(slice) ) {
6756 SWIG_Error(SWIG_TypeError, "Slice object expected.");
6757 return;
6758 }
6759 PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
6760 std::vector< vrna_path_t,std::allocator< vrna_path_t > >::difference_type id = i;
6761 std::vector< vrna_path_t,std::allocator< vrna_path_t > >::difference_type jd = j;
6762 swig::delslice(self, id, jd, step);
6763 }
std_vector_Sl_vrna_path_t_Sg____getitem____SWIG_1(std::vector<vrna_path_t> const * self,std::vector<vrna_path_t>::difference_type i)6764 SWIGINTERN std::vector< vrna_path_t >::value_type const &std_vector_Sl_vrna_path_t_Sg____getitem____SWIG_1(std::vector< vrna_path_t > const *self,std::vector< vrna_path_t >::difference_type i){
6765 return *(swig::cgetpos(self, i));
6766 }
std_vector_Sl_vrna_path_t_Sg____setitem____SWIG_2(std::vector<vrna_path_t> * self,std::vector<vrna_path_t>::difference_type i,std::vector<vrna_path_t>::value_type const & x)6767 SWIGINTERN void std_vector_Sl_vrna_path_t_Sg____setitem____SWIG_2(std::vector< vrna_path_t > *self,std::vector< vrna_path_t >::difference_type i,std::vector< vrna_path_t >::value_type const &x){
6768 *(swig::getpos(self,i)) = x;
6769 }
std_vector_Sl_vrna_path_t_Sg__pop(std::vector<vrna_path_t> * self)6770 SWIGINTERN std::vector< vrna_path_t >::value_type std_vector_Sl_vrna_path_t_Sg__pop(std::vector< vrna_path_t > *self){
6771 if (self->size() == 0)
6772 throw std::out_of_range("pop from empty container");
6773 std::vector< vrna_path_t,std::allocator< vrna_path_t > >::value_type x = self->back();
6774 self->pop_back();
6775 return x;
6776 }
std_vector_Sl_vrna_path_t_Sg__append(std::vector<vrna_path_t> * self,std::vector<vrna_path_t>::value_type const & x)6777 SWIGINTERN void std_vector_Sl_vrna_path_t_Sg__append(std::vector< vrna_path_t > *self,std::vector< vrna_path_t >::value_type const &x){
6778 self->push_back(x);
6779 }
std_vector_Sl_vrna_path_t_Sg__erase__SWIG_0(std::vector<vrna_path_t> * self,std::vector<vrna_path_t>::iterator pos)6780