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