1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 3.0.12
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_NO_BUILD_NONE
17 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
18 #define SWIGPYTHON_BUILTIN
19
20 /* -----------------------------------------------------------------------------
21 * This section contains generic SWIG labels for method/variable
22 * declarations/attributes, and other compiler dependent labels.
23 * ----------------------------------------------------------------------------- */
24
25 /* template workaround for compilers that cannot correctly implement the C++ standard */
26 #ifndef SWIGTEMPLATEDISAMBIGUATOR
27 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
28 # define SWIGTEMPLATEDISAMBIGUATOR template
29 # elif defined(__HP_aCC)
30 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
31 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
32 # define SWIGTEMPLATEDISAMBIGUATOR template
33 # else
34 # define SWIGTEMPLATEDISAMBIGUATOR
35 # endif
36 #endif
37
38 /* inline attribute */
39 #ifndef SWIGINLINE
40 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
41 # define SWIGINLINE inline
42 # else
43 # define SWIGINLINE
44 # endif
45 #endif
46
47 /* attribute recognised by some compilers to avoid 'unused' warnings */
48 #ifndef SWIGUNUSED
49 # if defined(__GNUC__)
50 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
51 # define SWIGUNUSED __attribute__ ((__unused__))
52 # else
53 # define SWIGUNUSED
54 # endif
55 # elif defined(__ICC)
56 # define SWIGUNUSED __attribute__ ((__unused__))
57 # else
58 # define SWIGUNUSED
59 # endif
60 #endif
61
62 #ifndef SWIG_MSC_UNSUPPRESS_4505
63 # if defined(_MSC_VER)
64 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
65 # endif
66 #endif
67
68 #ifndef SWIGUNUSEDPARM
69 # ifdef __cplusplus
70 # define SWIGUNUSEDPARM(p)
71 # else
72 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
73 # endif
74 #endif
75
76 /* internal SWIG method */
77 #ifndef SWIGINTERN
78 # define SWIGINTERN static SWIGUNUSED
79 #endif
80
81 /* internal inline SWIG method */
82 #ifndef SWIGINTERNINLINE
83 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
84 #endif
85
86 /* exporting methods */
87 #if defined(__GNUC__)
88 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
89 # ifndef GCC_HASCLASSVISIBILITY
90 # define GCC_HASCLASSVISIBILITY
91 # endif
92 # endif
93 #endif
94
95 #ifndef SWIGEXPORT
96 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
97 # if defined(STATIC_LINKED)
98 # define SWIGEXPORT
99 # else
100 # define SWIGEXPORT __declspec(dllexport)
101 # endif
102 # else
103 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
104 # define SWIGEXPORT __attribute__ ((visibility("default")))
105 # else
106 # define SWIGEXPORT
107 # endif
108 # endif
109 #endif
110
111 /* calling conventions for Windows */
112 #ifndef SWIGSTDCALL
113 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
114 # define SWIGSTDCALL __stdcall
115 # else
116 # define SWIGSTDCALL
117 # endif
118 #endif
119
120 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
121 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
122 # define _CRT_SECURE_NO_DEPRECATE
123 #endif
124
125 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
126 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
127 # define _SCL_SECURE_NO_DEPRECATE
128 #endif
129
130 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
131 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
132 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
133 #endif
134
135 /* Intel's compiler complains if a variable which was never initialised is
136 * cast to void, which is a common idiom which we use to indicate that we
137 * are aware a variable isn't used. So we just silence that warning.
138 * See: https://github.com/swig/swig/issues/192 for more discussion.
139 */
140 #ifdef __INTEL_COMPILER
141 # pragma warning disable 592
142 #endif
143
144
145 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
146 /* Use debug wrappers with the Python release dll */
147 # undef _DEBUG
148 # include <Python.h>
149 # define _DEBUG
150 #else
151 # include <Python.h>
152 #endif
153
154 /* -----------------------------------------------------------------------------
155 * swigrun.swg
156 *
157 * This file contains generic C API SWIG runtime support for pointer
158 * type checking.
159 * ----------------------------------------------------------------------------- */
160
161 /* This should only be incremented when either the layout of swig_type_info changes,
162 or for whatever reason, the runtime changes incompatibly */
163 #define SWIG_RUNTIME_VERSION "4"
164
165 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
166 #ifdef SWIG_TYPE_TABLE
167 # define SWIG_QUOTE_STRING(x) #x
168 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
169 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
170 #else
171 # define SWIG_TYPE_TABLE_NAME
172 #endif
173
174 /*
175 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
176 creating a static or dynamic library from the SWIG runtime code.
177 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
178
179 But only do this if strictly necessary, ie, if you have problems
180 with your compiler or suchlike.
181 */
182
183 #ifndef SWIGRUNTIME
184 # define SWIGRUNTIME SWIGINTERN
185 #endif
186
187 #ifndef SWIGRUNTIMEINLINE
188 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
189 #endif
190
191 /* Generic buffer size */
192 #ifndef SWIG_BUFFER_SIZE
193 # define SWIG_BUFFER_SIZE 1024
194 #endif
195
196 /* Flags for pointer conversions */
197 #define SWIG_POINTER_DISOWN 0x1
198 #define SWIG_CAST_NEW_MEMORY 0x2
199
200 /* Flags for new pointer objects */
201 #define SWIG_POINTER_OWN 0x1
202
203
204 /*
205 Flags/methods for returning states.
206
207 The SWIG conversion methods, as ConvertPtr, return an integer
208 that tells if the conversion was successful or not. And if not,
209 an error code can be returned (see swigerrors.swg for the codes).
210
211 Use the following macros/flags to set or process the returning
212 states.
213
214 In old versions of SWIG, code such as the following was usually written:
215
216 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
217 // success code
218 } else {
219 //fail code
220 }
221
222 Now you can be more explicit:
223
224 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
225 if (SWIG_IsOK(res)) {
226 // success code
227 } else {
228 // fail code
229 }
230
231 which is the same really, but now you can also do
232
233 Type *ptr;
234 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
235 if (SWIG_IsOK(res)) {
236 // success code
237 if (SWIG_IsNewObj(res) {
238 ...
239 delete *ptr;
240 } else {
241 ...
242 }
243 } else {
244 // fail code
245 }
246
247 I.e., now SWIG_ConvertPtr can return new objects and you can
248 identify the case and take care of the deallocation. Of course that
249 also requires SWIG_ConvertPtr to return new result values, such as
250
251 int SWIG_ConvertPtr(obj, ptr,...) {
252 if (<obj is ok>) {
253 if (<need new object>) {
254 *ptr = <ptr to new allocated object>;
255 return SWIG_NEWOBJ;
256 } else {
257 *ptr = <ptr to old object>;
258 return SWIG_OLDOBJ;
259 }
260 } else {
261 return SWIG_BADOBJ;
262 }
263 }
264
265 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
266 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
267 SWIG errors code.
268
269 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
270 allows to return the 'cast rank', for example, if you have this
271
272 int food(double)
273 int fooi(int);
274
275 and you call
276
277 food(1) // cast rank '1' (1 -> 1.0)
278 fooi(1) // cast rank '0'
279
280 just use the SWIG_AddCast()/SWIG_CheckState()
281 */
282
283 #define SWIG_OK (0)
284 #define SWIG_ERROR (-1)
285 #define SWIG_IsOK(r) (r >= 0)
286 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
287
288 /* The CastRankLimit says how many bits are used for the cast rank */
289 #define SWIG_CASTRANKLIMIT (1 << 8)
290 /* The NewMask denotes the object was created (using new/malloc) */
291 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
292 /* The TmpMask is for in/out typemaps that use temporal objects */
293 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
294 /* Simple returning values */
295 #define SWIG_BADOBJ (SWIG_ERROR)
296 #define SWIG_OLDOBJ (SWIG_OK)
297 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
298 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
299 /* Check, add and del mask methods */
300 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
301 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
302 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
303 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
304 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
305 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
306
307 /* Cast-Rank Mode */
308 #if defined(SWIG_CASTRANK_MODE)
309 # ifndef SWIG_TypeRank
310 # define SWIG_TypeRank unsigned long
311 # endif
312 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
313 # define SWIG_MAXCASTRANK (2)
314 # endif
315 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
316 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)317 SWIGINTERNINLINE int SWIG_AddCast(int r) {
318 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
319 }
SWIG_CheckState(int r)320 SWIGINTERNINLINE int SWIG_CheckState(int r) {
321 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
322 }
323 #else /* no cast-rank mode */
324 # define SWIG_AddCast(r) (r)
325 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
326 #endif
327
328
329 #include <string.h>
330
331 #ifdef __cplusplus
332 extern "C" {
333 #endif
334
335 typedef void *(*swig_converter_func)(void *, int *);
336 typedef struct swig_type_info *(*swig_dycast_func)(void **);
337
338 /* Structure to store information on one type */
339 typedef struct swig_type_info {
340 const char *name; /* mangled name of this type */
341 const char *str; /* human readable name of this type */
342 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
343 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
344 void *clientdata; /* language specific type data */
345 int owndata; /* flag if the structure owns the clientdata */
346 } swig_type_info;
347
348 /* Structure to store a type and conversion function used for casting */
349 typedef struct swig_cast_info {
350 swig_type_info *type; /* pointer to type that is equivalent to this type */
351 swig_converter_func converter; /* function to cast the void pointers */
352 struct swig_cast_info *next; /* pointer to next cast in linked list */
353 struct swig_cast_info *prev; /* pointer to the previous cast */
354 } swig_cast_info;
355
356 /* Structure used to store module information
357 * Each module generates one structure like this, and the runtime collects
358 * all of these structures and stores them in a circularly linked list.*/
359 typedef struct swig_module_info {
360 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
361 size_t size; /* Number of types in this module */
362 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
363 swig_type_info **type_initial; /* Array of initially generated type structures */
364 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
365 void *clientdata; /* Language specific module data */
366 } swig_module_info;
367
368 /*
369 Compare two type names skipping the space characters, therefore
370 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
371
372 Return 0 when the two name types are equivalent, as in
373 strncmp, but skipping ' '.
374 */
375 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)376 SWIG_TypeNameComp(const char *f1, const char *l1,
377 const char *f2, const char *l2) {
378 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
379 while ((*f1 == ' ') && (f1 != l1)) ++f1;
380 while ((*f2 == ' ') && (f2 != l2)) ++f2;
381 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
382 }
383 return (int)((l1 - f1) - (l2 - f2));
384 }
385
386 /*
387 Check type equivalence in a name list like <name1>|<name2>|...
388 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
389 */
390 SWIGRUNTIME int
SWIG_TypeCmp(const char * nb,const char * tb)391 SWIG_TypeCmp(const char *nb, const char *tb) {
392 int equiv = 1;
393 const char* te = tb + strlen(tb);
394 const char* ne = nb;
395 while (equiv != 0 && *ne) {
396 for (nb = ne; *ne; ++ne) {
397 if (*ne == '|') break;
398 }
399 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
400 if (*ne) ++ne;
401 }
402 return equiv;
403 }
404
405 /*
406 Check type equivalence in a name list like <name1>|<name2>|...
407 Return 0 if not equal, 1 if equal
408 */
409 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)410 SWIG_TypeEquiv(const char *nb, const char *tb) {
411 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
412 }
413
414 /*
415 Check the typename
416 */
417 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)418 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
419 if (ty) {
420 swig_cast_info *iter = ty->cast;
421 while (iter) {
422 if (strcmp(iter->type->name, c) == 0) {
423 if (iter == ty->cast)
424 return iter;
425 /* Move iter to the top of the linked list */
426 iter->prev->next = iter->next;
427 if (iter->next)
428 iter->next->prev = iter->prev;
429 iter->next = ty->cast;
430 iter->prev = 0;
431 if (ty->cast) ty->cast->prev = iter;
432 ty->cast = iter;
433 return iter;
434 }
435 iter = iter->next;
436 }
437 }
438 return 0;
439 }
440
441 /*
442 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
443 */
444 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)445 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
446 if (ty) {
447 swig_cast_info *iter = ty->cast;
448 while (iter) {
449 if (iter->type == from) {
450 if (iter == ty->cast)
451 return iter;
452 /* Move iter to the top of the linked list */
453 iter->prev->next = iter->next;
454 if (iter->next)
455 iter->next->prev = iter->prev;
456 iter->next = ty->cast;
457 iter->prev = 0;
458 if (ty->cast) ty->cast->prev = iter;
459 ty->cast = iter;
460 return iter;
461 }
462 iter = iter->next;
463 }
464 }
465 return 0;
466 }
467
468 /*
469 Cast a pointer up an inheritance hierarchy
470 */
471 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)472 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
473 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
474 }
475
476 /*
477 Dynamic pointer casting. Down an inheritance hierarchy
478 */
479 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)480 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
481 swig_type_info *lastty = ty;
482 if (!ty || !ty->dcast) return ty;
483 while (ty && (ty->dcast)) {
484 ty = (*ty->dcast)(ptr);
485 if (ty) lastty = ty;
486 }
487 return lastty;
488 }
489
490 /*
491 Return the name associated with this type
492 */
493 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)494 SWIG_TypeName(const swig_type_info *ty) {
495 return ty->name;
496 }
497
498 /*
499 Return the pretty name associated with this type,
500 that is an unmangled type name in a form presentable to the user.
501 */
502 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)503 SWIG_TypePrettyName(const swig_type_info *type) {
504 /* The "str" field contains the equivalent pretty names of the
505 type, separated by vertical-bar characters. We choose
506 to print the last name, as it is often (?) the most
507 specific. */
508 if (!type) return NULL;
509 if (type->str != NULL) {
510 const char *last_name = type->str;
511 const char *s;
512 for (s = type->str; *s; s++)
513 if (*s == '|') last_name = s+1;
514 return last_name;
515 }
516 else
517 return type->name;
518 }
519
520 /*
521 Set the clientdata field for a type
522 */
523 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)524 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
525 swig_cast_info *cast = ti->cast;
526 /* if (ti->clientdata == clientdata) return; */
527 ti->clientdata = clientdata;
528
529 while (cast) {
530 if (!cast->converter) {
531 swig_type_info *tc = cast->type;
532 if (!tc->clientdata) {
533 SWIG_TypeClientData(tc, clientdata);
534 }
535 }
536 cast = cast->next;
537 }
538 }
539 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)540 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
541 SWIG_TypeClientData(ti, clientdata);
542 ti->owndata = 1;
543 }
544
545 /*
546 Search for a swig_type_info structure only by mangled name
547 Search is a O(log #types)
548
549 We start searching at module start, and finish searching when start == end.
550 Note: if start == end at the beginning of the function, we go all the way around
551 the circular list.
552 */
553 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)554 SWIG_MangledTypeQueryModule(swig_module_info *start,
555 swig_module_info *end,
556 const char *name) {
557 swig_module_info *iter = start;
558 do {
559 if (iter->size) {
560 size_t l = 0;
561 size_t r = iter->size - 1;
562 do {
563 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
564 size_t i = (l + r) >> 1;
565 const char *iname = iter->types[i]->name;
566 if (iname) {
567 int compare = strcmp(name, iname);
568 if (compare == 0) {
569 return iter->types[i];
570 } else if (compare < 0) {
571 if (i) {
572 r = i - 1;
573 } else {
574 break;
575 }
576 } else if (compare > 0) {
577 l = i + 1;
578 }
579 } else {
580 break; /* should never happen */
581 }
582 } while (l <= r);
583 }
584 iter = iter->next;
585 } while (iter != end);
586 return 0;
587 }
588
589 /*
590 Search for a swig_type_info structure for either a mangled name or a human readable name.
591 It first searches the mangled names of the types, which is a O(log #types)
592 If a type is not found it then searches the human readable names, which is O(#types).
593
594 We start searching at module start, and finish searching when start == end.
595 Note: if start == end at the beginning of the function, we go all the way around
596 the circular list.
597 */
598 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)599 SWIG_TypeQueryModule(swig_module_info *start,
600 swig_module_info *end,
601 const char *name) {
602 /* STEP 1: Search the name field using binary search */
603 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
604 if (ret) {
605 return ret;
606 } else {
607 /* STEP 2: If the type hasn't been found, do a complete search
608 of the str field (the human readable name) */
609 swig_module_info *iter = start;
610 do {
611 size_t i = 0;
612 for (; i < iter->size; ++i) {
613 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
614 return iter->types[i];
615 }
616 iter = iter->next;
617 } while (iter != end);
618 }
619
620 /* neither found a match */
621 return 0;
622 }
623
624 /*
625 Pack binary data into a string
626 */
627 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)628 SWIG_PackData(char *c, void *ptr, size_t sz) {
629 static const char hex[17] = "0123456789abcdef";
630 const unsigned char *u = (unsigned char *) ptr;
631 const unsigned char *eu = u + sz;
632 for (; u != eu; ++u) {
633 unsigned char uu = *u;
634 *(c++) = hex[(uu & 0xf0) >> 4];
635 *(c++) = hex[uu & 0xf];
636 }
637 return c;
638 }
639
640 /*
641 Unpack binary data from a string
642 */
643 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)644 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
645 unsigned char *u = (unsigned char *) ptr;
646 const unsigned char *eu = u + sz;
647 for (; u != eu; ++u) {
648 char d = *(c++);
649 unsigned char uu;
650 if ((d >= '0') && (d <= '9'))
651 uu = (unsigned char)((d - '0') << 4);
652 else if ((d >= 'a') && (d <= 'f'))
653 uu = (unsigned char)((d - ('a'-10)) << 4);
654 else
655 return (char *) 0;
656 d = *(c++);
657 if ((d >= '0') && (d <= '9'))
658 uu |= (unsigned char)(d - '0');
659 else if ((d >= 'a') && (d <= 'f'))
660 uu |= (unsigned char)(d - ('a'-10));
661 else
662 return (char *) 0;
663 *u = uu;
664 }
665 return c;
666 }
667
668 /*
669 Pack 'void *' into a string buffer.
670 */
671 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)672 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
673 char *r = buff;
674 if ((2*sizeof(void *) + 2) > bsz) return 0;
675 *(r++) = '_';
676 r = SWIG_PackData(r,&ptr,sizeof(void *));
677 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
678 strcpy(r,name);
679 return buff;
680 }
681
682 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)683 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
684 if (*c != '_') {
685 if (strcmp(c,"NULL") == 0) {
686 *ptr = (void *) 0;
687 return name;
688 } else {
689 return 0;
690 }
691 }
692 return SWIG_UnpackData(++c,ptr,sizeof(void *));
693 }
694
695 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)696 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
697 char *r = buff;
698 size_t lname = (name ? strlen(name) : 0);
699 if ((2*sz + 2 + lname) > bsz) return 0;
700 *(r++) = '_';
701 r = SWIG_PackData(r,ptr,sz);
702 if (lname) {
703 strncpy(r,name,lname+1);
704 } else {
705 *r = 0;
706 }
707 return buff;
708 }
709
710 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)711 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
712 if (*c != '_') {
713 if (strcmp(c,"NULL") == 0) {
714 memset(ptr,0,sz);
715 return name;
716 } else {
717 return 0;
718 }
719 }
720 return SWIG_UnpackData(++c,ptr,sz);
721 }
722
723 #ifdef __cplusplus
724 }
725 #endif
726
727 /* Errors in SWIG */
728 #define SWIG_UnknownError -1
729 #define SWIG_IOError -2
730 #define SWIG_RuntimeError -3
731 #define SWIG_IndexError -4
732 #define SWIG_TypeError -5
733 #define SWIG_DivisionByZero -6
734 #define SWIG_OverflowError -7
735 #define SWIG_SyntaxError -8
736 #define SWIG_ValueError -9
737 #define SWIG_SystemError -10
738 #define SWIG_AttributeError -11
739 #define SWIG_MemoryError -12
740 #define SWIG_NullReferenceError -13
741
742
743
744 /* Compatibility macros for Python 3 */
745 #if PY_VERSION_HEX >= 0x03000000
746
747 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
748 #define PyInt_Check(x) PyLong_Check(x)
749 #define PyInt_AsLong(x) PyLong_AsLong(x)
750 #define PyInt_FromLong(x) PyLong_FromLong(x)
751 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
752 #define PyString_Check(name) PyBytes_Check(name)
753 #define PyString_FromString(x) PyUnicode_FromString(x)
754 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
755 #define PyString_AsString(str) PyBytes_AsString(str)
756 #define PyString_Size(str) PyBytes_Size(str)
757 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
758 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
759 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
760 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
761
762 #endif
763
764 #ifndef Py_TYPE
765 # define Py_TYPE(op) ((op)->ob_type)
766 #endif
767
768 /* SWIG APIs for compatibility of both Python 2 & 3 */
769
770 #if PY_VERSION_HEX >= 0x03000000
771 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
772 #else
773 # define SWIG_Python_str_FromFormat PyString_FromFormat
774 #endif
775
776
777 /* Warning: This function will allocate a new string in Python 3,
778 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
779 */
780 SWIGINTERN char*
SWIG_Python_str_AsChar(PyObject * str)781 SWIG_Python_str_AsChar(PyObject *str)
782 {
783 #if PY_VERSION_HEX >= 0x03000000
784 char *cstr;
785 char *newstr;
786 Py_ssize_t len;
787 str = PyUnicode_AsUTF8String(str);
788 PyBytes_AsStringAndSize(str, &cstr, &len);
789 newstr = (char *) malloc(len+1);
790 memcpy(newstr, cstr, len+1);
791 Py_XDECREF(str);
792 return newstr;
793 #else
794 return PyString_AsString(str);
795 #endif
796 }
797
798 #if PY_VERSION_HEX >= 0x03000000
799 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
800 #else
801 # define SWIG_Python_str_DelForPy3(x)
802 #endif
803
804
805 SWIGINTERN PyObject*
SWIG_Python_str_FromChar(const char * c)806 SWIG_Python_str_FromChar(const char *c)
807 {
808 #if PY_VERSION_HEX >= 0x03000000
809 return PyUnicode_FromString(c);
810 #else
811 return PyString_FromString(c);
812 #endif
813 }
814
815 /* Add PyOS_snprintf for old Pythons */
816 #if PY_VERSION_HEX < 0x02020000
817 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
818 # define PyOS_snprintf _snprintf
819 # else
820 # define PyOS_snprintf snprintf
821 # endif
822 #endif
823
824 /* A crude PyString_FromFormat implementation for old Pythons */
825 #if PY_VERSION_HEX < 0x02020000
826
827 #ifndef SWIG_PYBUFFER_SIZE
828 # define SWIG_PYBUFFER_SIZE 1024
829 #endif
830
831 static PyObject *
PyString_FromFormat(const char * fmt,...)832 PyString_FromFormat(const char *fmt, ...) {
833 va_list ap;
834 char buf[SWIG_PYBUFFER_SIZE * 2];
835 int res;
836 va_start(ap, fmt);
837 res = vsnprintf(buf, sizeof(buf), fmt, ap);
838 va_end(ap);
839 return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
840 }
841 #endif
842
843 #ifndef PyObject_DEL
844 # define PyObject_DEL PyObject_Del
845 #endif
846
847 /* A crude PyExc_StopIteration exception for old Pythons */
848 #if PY_VERSION_HEX < 0x02020000
849 # ifndef PyExc_StopIteration
850 # define PyExc_StopIteration PyExc_RuntimeError
851 # endif
852 # ifndef PyObject_GenericGetAttr
853 # define PyObject_GenericGetAttr 0
854 # endif
855 #endif
856
857 /* Py_NotImplemented is defined in 2.1 and up. */
858 #if PY_VERSION_HEX < 0x02010000
859 # ifndef Py_NotImplemented
860 # define Py_NotImplemented PyExc_RuntimeError
861 # endif
862 #endif
863
864 /* A crude PyString_AsStringAndSize implementation for old Pythons */
865 #if PY_VERSION_HEX < 0x02010000
866 # ifndef PyString_AsStringAndSize
867 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
868 # endif
869 #endif
870
871 /* PySequence_Size for old Pythons */
872 #if PY_VERSION_HEX < 0x02000000
873 # ifndef PySequence_Size
874 # define PySequence_Size PySequence_Length
875 # endif
876 #endif
877
878 /* PyBool_FromLong for old Pythons */
879 #if PY_VERSION_HEX < 0x02030000
880 static
PyBool_FromLong(long ok)881 PyObject *PyBool_FromLong(long ok)
882 {
883 PyObject *result = ok ? Py_True : Py_False;
884 Py_INCREF(result);
885 return result;
886 }
887 #endif
888
889 /* Py_ssize_t for old Pythons */
890 /* This code is as recommended by: */
891 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
892 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
893 typedef int Py_ssize_t;
894 # define PY_SSIZE_T_MAX INT_MAX
895 # define PY_SSIZE_T_MIN INT_MIN
896 typedef inquiry lenfunc;
897 typedef intargfunc ssizeargfunc;
898 typedef intintargfunc ssizessizeargfunc;
899 typedef intobjargproc ssizeobjargproc;
900 typedef intintobjargproc ssizessizeobjargproc;
901 typedef getreadbufferproc readbufferproc;
902 typedef getwritebufferproc writebufferproc;
903 typedef getsegcountproc segcountproc;
904 typedef getcharbufferproc charbufferproc;
PyNumber_AsSsize_t(PyObject * x,void * SWIGUNUSEDPARM (exc))905 static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
906 {
907 long result = 0;
908 PyObject *i = PyNumber_Int(x);
909 if (i) {
910 result = PyInt_AsLong(i);
911 Py_DECREF(i);
912 }
913 return result;
914 }
915 #endif
916
917 #if PY_VERSION_HEX < 0x02050000
918 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
919 #endif
920
921 #if PY_VERSION_HEX < 0x02040000
922 #define Py_VISIT(op) \
923 do { \
924 if (op) { \
925 int vret = visit((op), arg); \
926 if (vret) \
927 return vret; \
928 } \
929 } while (0)
930 #endif
931
932 #if PY_VERSION_HEX < 0x02030000
933 typedef struct {
934 PyTypeObject type;
935 PyNumberMethods as_number;
936 PyMappingMethods as_mapping;
937 PySequenceMethods as_sequence;
938 PyBufferProcs as_buffer;
939 PyObject *name, *slots;
940 } PyHeapTypeObject;
941 #endif
942
943 #if PY_VERSION_HEX < 0x02030000
944 typedef destructor freefunc;
945 #endif
946
947 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
948 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
949 (PY_MAJOR_VERSION > 3))
950 # define SWIGPY_USE_CAPSULE
951 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
952 #endif
953
954 #if PY_VERSION_HEX < 0x03020000
955 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
956 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
957 #define Py_hash_t long
958 #endif
959
960 /* -----------------------------------------------------------------------------
961 * error manipulation
962 * ----------------------------------------------------------------------------- */
963
964 SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code)965 SWIG_Python_ErrorType(int code) {
966 PyObject* type = 0;
967 switch(code) {
968 case SWIG_MemoryError:
969 type = PyExc_MemoryError;
970 break;
971 case SWIG_IOError:
972 type = PyExc_IOError;
973 break;
974 case SWIG_RuntimeError:
975 type = PyExc_RuntimeError;
976 break;
977 case SWIG_IndexError:
978 type = PyExc_IndexError;
979 break;
980 case SWIG_TypeError:
981 type = PyExc_TypeError;
982 break;
983 case SWIG_DivisionByZero:
984 type = PyExc_ZeroDivisionError;
985 break;
986 case SWIG_OverflowError:
987 type = PyExc_OverflowError;
988 break;
989 case SWIG_SyntaxError:
990 type = PyExc_SyntaxError;
991 break;
992 case SWIG_ValueError:
993 type = PyExc_ValueError;
994 break;
995 case SWIG_SystemError:
996 type = PyExc_SystemError;
997 break;
998 case SWIG_AttributeError:
999 type = PyExc_AttributeError;
1000 break;
1001 default:
1002 type = PyExc_RuntimeError;
1003 }
1004 return type;
1005 }
1006
1007
1008 SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char * mesg)1009 SWIG_Python_AddErrorMsg(const char* mesg)
1010 {
1011 PyObject *type = 0;
1012 PyObject *value = 0;
1013 PyObject *traceback = 0;
1014
1015 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
1016 if (value) {
1017 char *tmp;
1018 PyObject *old_str = PyObject_Str(value);
1019 PyErr_Clear();
1020 Py_XINCREF(type);
1021
1022 PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
1023 SWIG_Python_str_DelForPy3(tmp);
1024 Py_DECREF(old_str);
1025 Py_DECREF(value);
1026 } else {
1027 PyErr_SetString(PyExc_RuntimeError, mesg);
1028 }
1029 }
1030
1031 #if defined(SWIG_PYTHON_NO_THREADS)
1032 # if defined(SWIG_PYTHON_THREADS)
1033 # undef SWIG_PYTHON_THREADS
1034 # endif
1035 #endif
1036 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1037 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1038 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
1039 # define SWIG_PYTHON_USE_GIL
1040 # endif
1041 # endif
1042 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1043 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
1044 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1045 # endif
1046 # ifdef __cplusplus /* C++ code */
1047 class SWIG_Python_Thread_Block {
1048 bool status;
1049 PyGILState_STATE state;
1050 public:
end()1051 void end() { if (status) { PyGILState_Release(state); status = false;} }
SWIG_Python_Thread_Block()1052 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
~SWIG_Python_Thread_Block()1053 ~SWIG_Python_Thread_Block() { end(); }
1054 };
1055 class SWIG_Python_Thread_Allow {
1056 bool status;
1057 PyThreadState *save;
1058 public:
end()1059 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
SWIG_Python_Thread_Allow()1060 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
~SWIG_Python_Thread_Allow()1061 ~SWIG_Python_Thread_Allow() { end(); }
1062 };
1063 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1064 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1065 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1066 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1067 # else /* C code */
1068 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1069 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1070 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1071 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1072 # endif
1073 # else /* Old thread way, not implemented, user must provide it */
1074 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1075 # define SWIG_PYTHON_INITIALIZE_THREADS
1076 # endif
1077 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1078 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1079 # endif
1080 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1081 # define SWIG_PYTHON_THREAD_END_BLOCK
1082 # endif
1083 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1084 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1085 # endif
1086 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1087 # define SWIG_PYTHON_THREAD_END_ALLOW
1088 # endif
1089 # endif
1090 #else /* No thread support */
1091 # define SWIG_PYTHON_INITIALIZE_THREADS
1092 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1093 # define SWIG_PYTHON_THREAD_END_BLOCK
1094 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1095 # define SWIG_PYTHON_THREAD_END_ALLOW
1096 #endif
1097
1098 /* -----------------------------------------------------------------------------
1099 * Python API portion that goes into the runtime
1100 * ----------------------------------------------------------------------------- */
1101
1102 #ifdef __cplusplus
1103 extern "C" {
1104 #endif
1105
1106 /* -----------------------------------------------------------------------------
1107 * Constant declarations
1108 * ----------------------------------------------------------------------------- */
1109
1110 /* Constant Types */
1111 #define SWIG_PY_POINTER 4
1112 #define SWIG_PY_BINARY 5
1113
1114 /* Constant information structure */
1115 typedef struct swig_const_info {
1116 int type;
1117 char *name;
1118 long lvalue;
1119 double dvalue;
1120 void *pvalue;
1121 swig_type_info **ptype;
1122 } swig_const_info;
1123
1124
1125 /* -----------------------------------------------------------------------------
1126 * Wrapper of PyInstanceMethod_New() used in Python 3
1127 * It is exported to the generated module, used for -fastproxy
1128 * ----------------------------------------------------------------------------- */
1129 #if PY_VERSION_HEX >= 0x03000000
SWIG_PyInstanceMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * func)1130 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
1131 {
1132 return PyInstanceMethod_New(func);
1133 }
1134 #else
SWIG_PyInstanceMethod_New(PyObject * SWIGUNUSEDPARM (self),PyObject * SWIGUNUSEDPARM (func))1135 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
1136 {
1137 return NULL;
1138 }
1139 #endif
1140
1141 #ifdef __cplusplus
1142 }
1143 #endif
1144
1145
1146 /* -----------------------------------------------------------------------------
1147 * pyrun.swg
1148 *
1149 * This file contains the runtime support for Python modules
1150 * and includes code for managing global variables and pointer
1151 * type checking.
1152 *
1153 * ----------------------------------------------------------------------------- */
1154
1155 /* Common SWIG API */
1156
1157 /* for raw pointers */
1158 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1159 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1160 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1161
1162 #ifdef SWIGPYTHON_BUILTIN
1163 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1164 #else
1165 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1166 #endif
1167
1168 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1169
1170 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1171 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1172 #define swig_owntype int
1173
1174 /* for raw packed data */
1175 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1176 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1177
1178 /* for class or struct pointers */
1179 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1180 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1181
1182 /* for C or C++ function pointers */
1183 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1184 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1185
1186 /* for C++ member pointers, ie, member methods */
1187 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1188 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1189
1190
1191 /* Runtime API */
1192
1193 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1194 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1195 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1196
1197 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1198 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1199 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1200 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1201 #define SWIG_fail goto fail
1202
1203
1204 /* Runtime API implementation */
1205
1206 /* Error manipulation */
1207
1208 SWIGINTERN void
SWIG_Python_SetErrorObj(PyObject * errtype,PyObject * obj)1209 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1210 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1211 PyErr_SetObject(errtype, obj);
1212 Py_DECREF(obj);
1213 SWIG_PYTHON_THREAD_END_BLOCK;
1214 }
1215
1216 SWIGINTERN void
SWIG_Python_SetErrorMsg(PyObject * errtype,const char * msg)1217 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1218 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1219 PyErr_SetString(errtype, msg);
1220 SWIG_PYTHON_THREAD_END_BLOCK;
1221 }
1222
1223 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1224
1225 /* Set a constant value */
1226
1227 #if defined(SWIGPYTHON_BUILTIN)
1228
1229 SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject * seq,const char * key)1230 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1231 PyObject *s = PyString_InternFromString(key);
1232 PyList_Append(seq, s);
1233 Py_DECREF(s);
1234 }
1235
1236 SWIGINTERN void
SWIG_Python_SetConstant(PyObject * d,PyObject * public_interface,const char * name,PyObject * obj)1237 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1238 #if PY_VERSION_HEX < 0x02030000
1239 PyDict_SetItemString(d, (char *)name, obj);
1240 #else
1241 PyDict_SetItemString(d, name, obj);
1242 #endif
1243 Py_DECREF(obj);
1244 if (public_interface)
1245 SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1246 }
1247
1248 #else
1249
1250 SWIGINTERN void
SWIG_Python_SetConstant(PyObject * d,const char * name,PyObject * obj)1251 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1252 #if PY_VERSION_HEX < 0x02030000
1253 PyDict_SetItemString(d, (char *)name, obj);
1254 #else
1255 PyDict_SetItemString(d, name, obj);
1256 #endif
1257 Py_DECREF(obj);
1258 }
1259
1260 #endif
1261
1262 /* Append a value to the result obj */
1263
1264 SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject * result,PyObject * obj)1265 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1266 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1267 if (!result) {
1268 result = obj;
1269 } else if (result == Py_None) {
1270 Py_DECREF(result);
1271 result = obj;
1272 } else {
1273 if (!PyList_Check(result)) {
1274 PyObject *o2 = result;
1275 result = PyList_New(1);
1276 PyList_SetItem(result, 0, o2);
1277 }
1278 PyList_Append(result,obj);
1279 Py_DECREF(obj);
1280 }
1281 return result;
1282 #else
1283 PyObject* o2;
1284 PyObject* o3;
1285 if (!result) {
1286 result = obj;
1287 } else if (result == Py_None) {
1288 Py_DECREF(result);
1289 result = obj;
1290 } else {
1291 if (!PyTuple_Check(result)) {
1292 o2 = result;
1293 result = PyTuple_New(1);
1294 PyTuple_SET_ITEM(result, 0, o2);
1295 }
1296 o3 = PyTuple_New(1);
1297 PyTuple_SET_ITEM(o3, 0, obj);
1298 o2 = result;
1299 result = PySequence_Concat(o2, o3);
1300 Py_DECREF(o2);
1301 Py_DECREF(o3);
1302 }
1303 return result;
1304 #endif
1305 }
1306
1307 /* Unpack the argument tuple */
1308
1309 SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject * args,const char * name,Py_ssize_t min,Py_ssize_t max,PyObject ** objs)1310 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1311 {
1312 if (!args) {
1313 if (!min && !max) {
1314 return 1;
1315 } else {
1316 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1317 name, (min == max ? "" : "at least "), (int)min);
1318 return 0;
1319 }
1320 }
1321 if (!PyTuple_Check(args)) {
1322 if (min <= 1 && max >= 1) {
1323 Py_ssize_t i;
1324 objs[0] = args;
1325 for (i = 1; i < max; ++i) {
1326 objs[i] = 0;
1327 }
1328 return 2;
1329 }
1330 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1331 return 0;
1332 } else {
1333 Py_ssize_t l = PyTuple_GET_SIZE(args);
1334 if (l < min) {
1335 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1336 name, (min == max ? "" : "at least "), (int)min, (int)l);
1337 return 0;
1338 } else if (l > max) {
1339 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1340 name, (min == max ? "" : "at most "), (int)max, (int)l);
1341 return 0;
1342 } else {
1343 Py_ssize_t i;
1344 for (i = 0; i < l; ++i) {
1345 objs[i] = PyTuple_GET_ITEM(args, i);
1346 }
1347 for (; l < max; ++l) {
1348 objs[l] = 0;
1349 }
1350 return i + 1;
1351 }
1352 }
1353 }
1354
1355 /* A functor is a function object with one single object argument */
1356 #if PY_VERSION_HEX >= 0x02020000
1357 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1358 #else
1359 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1360 #endif
1361
1362 /*
1363 Helper for static pointer initialization for both C and C++ code, for example
1364 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1365 */
1366 #ifdef __cplusplus
1367 #define SWIG_STATIC_POINTER(var) var
1368 #else
1369 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1370 #endif
1371
1372 /* -----------------------------------------------------------------------------
1373 * Pointer declarations
1374 * ----------------------------------------------------------------------------- */
1375
1376 /* Flags for new pointer objects */
1377 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1378 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1379
1380 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1381
1382 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1383 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1384
1385 #ifdef __cplusplus
1386 extern "C" {
1387 #endif
1388
1389 /* How to access Py_None */
1390 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1391 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1392 # ifndef SWIG_PYTHON_BUILD_NONE
1393 # define SWIG_PYTHON_BUILD_NONE
1394 # endif
1395 # endif
1396 #endif
1397
1398 #ifdef SWIG_PYTHON_BUILD_NONE
1399 # ifdef Py_None
1400 # undef Py_None
1401 # define Py_None SWIG_Py_None()
1402 # endif
1403 SWIGRUNTIMEINLINE PyObject *
_SWIG_Py_None(void)1404 _SWIG_Py_None(void)
1405 {
1406 PyObject *none = Py_BuildValue((char*)"");
1407 Py_DECREF(none);
1408 return none;
1409 }
1410 SWIGRUNTIME PyObject *
SWIG_Py_None(void)1411 SWIG_Py_None(void)
1412 {
1413 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1414 return none;
1415 }
1416 #endif
1417
1418 /* The python void return value */
1419
1420 SWIGRUNTIMEINLINE PyObject *
SWIG_Py_Void(void)1421 SWIG_Py_Void(void)
1422 {
1423 PyObject *none = Py_None;
1424 Py_INCREF(none);
1425 return none;
1426 }
1427
1428 /* SwigPyClientData */
1429
1430 typedef struct {
1431 PyObject *klass;
1432 PyObject *newraw;
1433 PyObject *newargs;
1434 PyObject *destroy;
1435 int delargs;
1436 int implicitconv;
1437 PyTypeObject *pytype;
1438 } SwigPyClientData;
1439
1440 SWIGRUNTIMEINLINE int
SWIG_Python_CheckImplicit(swig_type_info * ty)1441 SWIG_Python_CheckImplicit(swig_type_info *ty)
1442 {
1443 SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1444 return data ? data->implicitconv : 0;
1445 }
1446
1447 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info * desc)1448 SWIG_Python_ExceptionType(swig_type_info *desc) {
1449 SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1450 PyObject *klass = data ? data->klass : 0;
1451 return (klass ? klass : PyExc_RuntimeError);
1452 }
1453
1454
1455 SWIGRUNTIME SwigPyClientData *
SwigPyClientData_New(PyObject * obj)1456 SwigPyClientData_New(PyObject* obj)
1457 {
1458 if (!obj) {
1459 return 0;
1460 } else {
1461 SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1462 /* the klass element */
1463 data->klass = obj;
1464 Py_INCREF(data->klass);
1465 /* the newraw method and newargs arguments used to create a new raw instance */
1466 if (PyClass_Check(obj)) {
1467 data->newraw = 0;
1468 data->newargs = obj;
1469 Py_INCREF(obj);
1470 } else {
1471 #if (PY_VERSION_HEX < 0x02020000)
1472 data->newraw = 0;
1473 #else
1474 data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1475 #endif
1476 if (data->newraw) {
1477 Py_INCREF(data->newraw);
1478 data->newargs = PyTuple_New(1);
1479 PyTuple_SetItem(data->newargs, 0, obj);
1480 } else {
1481 data->newargs = obj;
1482 }
1483 Py_INCREF(data->newargs);
1484 }
1485 /* the destroy method, aka as the C++ delete method */
1486 data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1487 if (PyErr_Occurred()) {
1488 PyErr_Clear();
1489 data->destroy = 0;
1490 }
1491 if (data->destroy) {
1492 int flags;
1493 Py_INCREF(data->destroy);
1494 flags = PyCFunction_GET_FLAGS(data->destroy);
1495 #ifdef METH_O
1496 data->delargs = !(flags & (METH_O));
1497 #else
1498 data->delargs = 0;
1499 #endif
1500 } else {
1501 data->delargs = 0;
1502 }
1503 data->implicitconv = 0;
1504 data->pytype = 0;
1505 return data;
1506 }
1507 }
1508
1509 SWIGRUNTIME void
SwigPyClientData_Del(SwigPyClientData * data)1510 SwigPyClientData_Del(SwigPyClientData *data) {
1511 Py_XDECREF(data->newraw);
1512 Py_XDECREF(data->newargs);
1513 Py_XDECREF(data->destroy);
1514 }
1515
1516 /* =============== SwigPyObject =====================*/
1517
1518 typedef struct {
1519 PyObject_HEAD
1520 void *ptr;
1521 swig_type_info *ty;
1522 int own;
1523 PyObject *next;
1524 #ifdef SWIGPYTHON_BUILTIN
1525 PyObject *dict;
1526 #endif
1527 } SwigPyObject;
1528
1529
1530 #ifdef SWIGPYTHON_BUILTIN
1531
1532 SWIGRUNTIME PyObject *
SwigPyObject_get___dict__(PyObject * v,PyObject * SWIGUNUSEDPARM (args))1533 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1534 {
1535 SwigPyObject *sobj = (SwigPyObject *)v;
1536
1537 if (!sobj->dict)
1538 sobj->dict = PyDict_New();
1539
1540 Py_INCREF(sobj->dict);
1541 return sobj->dict;
1542 }
1543
1544 #endif
1545
1546 SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject * v)1547 SwigPyObject_long(SwigPyObject *v)
1548 {
1549 return PyLong_FromVoidPtr(v->ptr);
1550 }
1551
1552 SWIGRUNTIME PyObject *
SwigPyObject_format(const char * fmt,SwigPyObject * v)1553 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1554 {
1555 PyObject *res = NULL;
1556 PyObject *args = PyTuple_New(1);
1557 if (args) {
1558 if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1559 PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1560 if (ofmt) {
1561 #if PY_VERSION_HEX >= 0x03000000
1562 res = PyUnicode_Format(ofmt,args);
1563 #else
1564 res = PyString_Format(ofmt,args);
1565 #endif
1566 Py_DECREF(ofmt);
1567 }
1568 Py_DECREF(args);
1569 }
1570 }
1571 return res;
1572 }
1573
1574 SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject * v)1575 SwigPyObject_oct(SwigPyObject *v)
1576 {
1577 return SwigPyObject_format("%o",v);
1578 }
1579
1580 SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject * v)1581 SwigPyObject_hex(SwigPyObject *v)
1582 {
1583 return SwigPyObject_format("%x",v);
1584 }
1585
1586 SWIGRUNTIME PyObject *
1587 #ifdef METH_NOARGS
SwigPyObject_repr(SwigPyObject * v)1588 SwigPyObject_repr(SwigPyObject *v)
1589 #else
1590 SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1591 #endif
1592 {
1593 const char *name = SWIG_TypePrettyName(v->ty);
1594 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1595 if (v->next) {
1596 # ifdef METH_NOARGS
1597 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1598 # else
1599 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1600 # endif
1601 # if PY_VERSION_HEX >= 0x03000000
1602 PyObject *joined = PyUnicode_Concat(repr, nrep);
1603 Py_DecRef(repr);
1604 Py_DecRef(nrep);
1605 repr = joined;
1606 # else
1607 PyString_ConcatAndDel(&repr,nrep);
1608 # endif
1609 }
1610 return repr;
1611 }
1612
1613 SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject * v,SwigPyObject * w)1614 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1615 {
1616 void *i = v->ptr;
1617 void *j = w->ptr;
1618 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1619 }
1620
1621 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1622 SWIGRUNTIME PyObject*
SwigPyObject_richcompare(SwigPyObject * v,SwigPyObject * w,int op)1623 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1624 {
1625 PyObject* res;
1626 if( op != Py_EQ && op != Py_NE ) {
1627 Py_INCREF(Py_NotImplemented);
1628 return Py_NotImplemented;
1629 }
1630 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1631 return res;
1632 }
1633
1634
1635 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1636
1637 #ifdef SWIGPYTHON_BUILTIN
1638 static swig_type_info *SwigPyObject_stype = 0;
1639 SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void)1640 SwigPyObject_type(void) {
1641 SwigPyClientData *cd;
1642 assert(SwigPyObject_stype);
1643 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1644 assert(cd);
1645 assert(cd->pytype);
1646 return cd->pytype;
1647 }
1648 #else
1649 SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void)1650 SwigPyObject_type(void) {
1651 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1652 return type;
1653 }
1654 #endif
1655
1656 SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject * op)1657 SwigPyObject_Check(PyObject *op) {
1658 #ifdef SWIGPYTHON_BUILTIN
1659 PyTypeObject *target_tp = SwigPyObject_type();
1660 if (PyType_IsSubtype(op->ob_type, target_tp))
1661 return 1;
1662 return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1663 #else
1664 return (Py_TYPE(op) == SwigPyObject_type())
1665 || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1666 #endif
1667 }
1668
1669 SWIGRUNTIME PyObject *
1670 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1671
1672 SWIGRUNTIME void
SwigPyObject_dealloc(PyObject * v)1673 SwigPyObject_dealloc(PyObject *v)
1674 {
1675 SwigPyObject *sobj = (SwigPyObject *) v;
1676 PyObject *next = sobj->next;
1677 if (sobj->own == SWIG_POINTER_OWN) {
1678 swig_type_info *ty = sobj->ty;
1679 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1680 PyObject *destroy = data ? data->destroy : 0;
1681 if (destroy) {
1682 /* destroy is always a VARARGS method */
1683 PyObject *res;
1684
1685 /* PyObject_CallFunction() has the potential to silently drop
1686 the active active exception. In cases of unnamed temporary
1687 variable or where we just finished iterating over a generator
1688 StopIteration will be active right now, and this needs to
1689 remain true upon return from SwigPyObject_dealloc. So save
1690 and restore. */
1691
1692 PyObject *val = NULL, *type = NULL, *tb = NULL;
1693 PyErr_Fetch(&val, &type, &tb);
1694
1695 if (data->delargs) {
1696 /* we need to create a temporary object to carry the destroy operation */
1697 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1698 res = SWIG_Python_CallFunctor(destroy, tmp);
1699 Py_DECREF(tmp);
1700 } else {
1701 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1702 PyObject *mself = PyCFunction_GET_SELF(destroy);
1703 res = ((*meth)(mself, v));
1704 }
1705 if (!res)
1706 PyErr_WriteUnraisable(destroy);
1707
1708 PyErr_Restore(val, type, tb);
1709
1710 Py_XDECREF(res);
1711 }
1712 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1713 else {
1714 const char *name = SWIG_TypePrettyName(ty);
1715 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1716 }
1717 #endif
1718 }
1719 Py_XDECREF(next);
1720 PyObject_DEL(v);
1721 }
1722
1723 SWIGRUNTIME PyObject*
SwigPyObject_append(PyObject * v,PyObject * next)1724 SwigPyObject_append(PyObject* v, PyObject* next)
1725 {
1726 SwigPyObject *sobj = (SwigPyObject *) v;
1727 #ifndef METH_O
1728 PyObject *tmp = 0;
1729 if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1730 next = tmp;
1731 #endif
1732 if (!SwigPyObject_Check(next)) {
1733 PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1734 return NULL;
1735 }
1736 sobj->next = next;
1737 Py_INCREF(next);
1738 return SWIG_Py_Void();
1739 }
1740
1741 SWIGRUNTIME PyObject*
1742 #ifdef METH_NOARGS
SwigPyObject_next(PyObject * v)1743 SwigPyObject_next(PyObject* v)
1744 #else
1745 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1746 #endif
1747 {
1748 SwigPyObject *sobj = (SwigPyObject *) v;
1749 if (sobj->next) {
1750 Py_INCREF(sobj->next);
1751 return sobj->next;
1752 } else {
1753 return SWIG_Py_Void();
1754 }
1755 }
1756
1757 SWIGINTERN PyObject*
1758 #ifdef METH_NOARGS
SwigPyObject_disown(PyObject * v)1759 SwigPyObject_disown(PyObject *v)
1760 #else
1761 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1762 #endif
1763 {
1764 SwigPyObject *sobj = (SwigPyObject *)v;
1765 sobj->own = 0;
1766 return SWIG_Py_Void();
1767 }
1768
1769 SWIGINTERN PyObject*
1770 #ifdef METH_NOARGS
SwigPyObject_acquire(PyObject * v)1771 SwigPyObject_acquire(PyObject *v)
1772 #else
1773 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1774 #endif
1775 {
1776 SwigPyObject *sobj = (SwigPyObject *)v;
1777 sobj->own = SWIG_POINTER_OWN;
1778 return SWIG_Py_Void();
1779 }
1780
1781 SWIGINTERN PyObject*
SwigPyObject_own(PyObject * v,PyObject * args)1782 SwigPyObject_own(PyObject *v, PyObject *args)
1783 {
1784 PyObject *val = 0;
1785 #if (PY_VERSION_HEX < 0x02020000)
1786 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1787 #elif (PY_VERSION_HEX < 0x02050000)
1788 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1789 #else
1790 if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
1791 #endif
1792 {
1793 return NULL;
1794 }
1795 else
1796 {
1797 SwigPyObject *sobj = (SwigPyObject *)v;
1798 PyObject *obj = PyBool_FromLong(sobj->own);
1799 if (val) {
1800 #ifdef METH_NOARGS
1801 if (PyObject_IsTrue(val)) {
1802 SwigPyObject_acquire(v);
1803 } else {
1804 SwigPyObject_disown(v);
1805 }
1806 #else
1807 if (PyObject_IsTrue(val)) {
1808 SwigPyObject_acquire(v,args);
1809 } else {
1810 SwigPyObject_disown(v,args);
1811 }
1812 #endif
1813 }
1814 return obj;
1815 }
1816 }
1817
1818 #ifdef METH_O
1819 static PyMethodDef
1820 swigobject_methods[] = {
1821 {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1822 {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
1823 {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1824 {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
1825 {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1826 {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
1827 {0, 0, 0, 0}
1828 };
1829 #else
1830 static PyMethodDef
1831 swigobject_methods[] = {
1832 {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1833 {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"},
1834 {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1835 {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1836 {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1837 {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
1838 {0, 0, 0, 0}
1839 };
1840 #endif
1841
1842 #if PY_VERSION_HEX < 0x02020000
1843 SWIGINTERN PyObject *
SwigPyObject_getattr(SwigPyObject * sobj,char * name)1844 SwigPyObject_getattr(SwigPyObject *sobj,char *name)
1845 {
1846 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1847 }
1848 #endif
1849
1850 SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void)1851 SwigPyObject_TypeOnce(void) {
1852 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1853
1854 static PyNumberMethods SwigPyObject_as_number = {
1855 (binaryfunc)0, /*nb_add*/
1856 (binaryfunc)0, /*nb_subtract*/
1857 (binaryfunc)0, /*nb_multiply*/
1858 /* nb_divide removed in Python 3 */
1859 #if PY_VERSION_HEX < 0x03000000
1860 (binaryfunc)0, /*nb_divide*/
1861 #endif
1862 (binaryfunc)0, /*nb_remainder*/
1863 (binaryfunc)0, /*nb_divmod*/
1864 (ternaryfunc)0,/*nb_power*/
1865 (unaryfunc)0, /*nb_negative*/
1866 (unaryfunc)0, /*nb_positive*/
1867 (unaryfunc)0, /*nb_absolute*/
1868 (inquiry)0, /*nb_nonzero*/
1869 0, /*nb_invert*/
1870 0, /*nb_lshift*/
1871 0, /*nb_rshift*/
1872 0, /*nb_and*/
1873 0, /*nb_xor*/
1874 0, /*nb_or*/
1875 #if PY_VERSION_HEX < 0x03000000
1876 0, /*nb_coerce*/
1877 #endif
1878 (unaryfunc)SwigPyObject_long, /*nb_int*/
1879 #if PY_VERSION_HEX < 0x03000000
1880 (unaryfunc)SwigPyObject_long, /*nb_long*/
1881 #else
1882 0, /*nb_reserved*/
1883 #endif
1884 (unaryfunc)0, /*nb_float*/
1885 #if PY_VERSION_HEX < 0x03000000
1886 (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1887 (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1888 #endif
1889 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1890 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1891 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1892 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1893 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1894 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1895 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1896 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1897 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1898 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1899 #endif
1900 };
1901
1902 static PyTypeObject swigpyobject_type;
1903 static int type_init = 0;
1904 if (!type_init) {
1905 const PyTypeObject tmp = {
1906 #if PY_VERSION_HEX >= 0x03000000
1907 PyVarObject_HEAD_INIT(NULL, 0)
1908 #else
1909 PyObject_HEAD_INIT(NULL)
1910 0, /* ob_size */
1911 #endif
1912 (char *)"SwigPyObject", /* tp_name */
1913 sizeof(SwigPyObject), /* tp_basicsize */
1914 0, /* tp_itemsize */
1915 (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1916 0, /* tp_print */
1917 #if PY_VERSION_HEX < 0x02020000
1918 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
1919 #else
1920 (getattrfunc)0, /* tp_getattr */
1921 #endif
1922 (setattrfunc)0, /* tp_setattr */
1923 #if PY_VERSION_HEX >= 0x03000000
1924 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1925 #else
1926 (cmpfunc)SwigPyObject_compare, /* tp_compare */
1927 #endif
1928 (reprfunc)SwigPyObject_repr, /* tp_repr */
1929 &SwigPyObject_as_number, /* tp_as_number */
1930 0, /* tp_as_sequence */
1931 0, /* tp_as_mapping */
1932 (hashfunc)0, /* tp_hash */
1933 (ternaryfunc)0, /* tp_call */
1934 0, /* tp_str */
1935 PyObject_GenericGetAttr, /* tp_getattro */
1936 0, /* tp_setattro */
1937 0, /* tp_as_buffer */
1938 Py_TPFLAGS_DEFAULT, /* tp_flags */
1939 swigobject_doc, /* tp_doc */
1940 0, /* tp_traverse */
1941 0, /* tp_clear */
1942 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1943 0, /* tp_weaklistoffset */
1944 #if PY_VERSION_HEX >= 0x02020000
1945 0, /* tp_iter */
1946 0, /* tp_iternext */
1947 swigobject_methods, /* tp_methods */
1948 0, /* tp_members */
1949 0, /* tp_getset */
1950 0, /* tp_base */
1951 0, /* tp_dict */
1952 0, /* tp_descr_get */
1953 0, /* tp_descr_set */
1954 0, /* tp_dictoffset */
1955 0, /* tp_init */
1956 0, /* tp_alloc */
1957 0, /* tp_new */
1958 0, /* tp_free */
1959 0, /* tp_is_gc */
1960 0, /* tp_bases */
1961 0, /* tp_mro */
1962 0, /* tp_cache */
1963 0, /* tp_subclasses */
1964 0, /* tp_weaklist */
1965 #endif
1966 #if PY_VERSION_HEX >= 0x02030000
1967 0, /* tp_del */
1968 #endif
1969 #if PY_VERSION_HEX >= 0x02060000
1970 0, /* tp_version_tag */
1971 #endif
1972 #if PY_VERSION_HEX >= 0x03040000
1973 0, /* tp_finalize */
1974 #endif
1975 #ifdef COUNT_ALLOCS
1976 0, /* tp_allocs */
1977 0, /* tp_frees */
1978 0, /* tp_maxalloc */
1979 #if PY_VERSION_HEX >= 0x02050000
1980 0, /* tp_prev */
1981 #endif
1982 0 /* tp_next */
1983 #endif
1984 };
1985 swigpyobject_type = tmp;
1986 type_init = 1;
1987 #if PY_VERSION_HEX < 0x02020000
1988 swigpyobject_type.ob_type = &PyType_Type;
1989 #else
1990 if (PyType_Ready(&swigpyobject_type) < 0)
1991 return NULL;
1992 #endif
1993 }
1994 return &swigpyobject_type;
1995 }
1996
1997 SWIGRUNTIME PyObject *
SwigPyObject_New(void * ptr,swig_type_info * ty,int own)1998 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1999 {
2000 SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
2001 if (sobj) {
2002 sobj->ptr = ptr;
2003 sobj->ty = ty;
2004 sobj->own = own;
2005 sobj->next = 0;
2006 }
2007 return (PyObject *)sobj;
2008 }
2009
2010 /* -----------------------------------------------------------------------------
2011 * Implements a simple Swig Packed type, and use it instead of string
2012 * ----------------------------------------------------------------------------- */
2013
2014 typedef struct {
2015 PyObject_HEAD
2016 void *pack;
2017 swig_type_info *ty;
2018 size_t size;
2019 } SwigPyPacked;
2020
2021 SWIGRUNTIME int
SwigPyPacked_print(SwigPyPacked * v,FILE * fp,int SWIGUNUSEDPARM (flags))2022 SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
2023 {
2024 char result[SWIG_BUFFER_SIZE];
2025 fputs("<Swig Packed ", fp);
2026 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2027 fputs("at ", fp);
2028 fputs(result, fp);
2029 }
2030 fputs(v->ty->name,fp);
2031 fputs(">", fp);
2032 return 0;
2033 }
2034
2035 SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked * v)2036 SwigPyPacked_repr(SwigPyPacked *v)
2037 {
2038 char result[SWIG_BUFFER_SIZE];
2039 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2040 return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
2041 } else {
2042 return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
2043 }
2044 }
2045
2046 SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked * v)2047 SwigPyPacked_str(SwigPyPacked *v)
2048 {
2049 char result[SWIG_BUFFER_SIZE];
2050 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
2051 return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
2052 } else {
2053 return SWIG_Python_str_FromChar(v->ty->name);
2054 }
2055 }
2056
2057 SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked * v,SwigPyPacked * w)2058 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
2059 {
2060 size_t i = v->size;
2061 size_t j = w->size;
2062 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2063 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
2064 }
2065
2066 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2067
2068 SWIGRUNTIME PyTypeObject*
SwigPyPacked_type(void)2069 SwigPyPacked_type(void) {
2070 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2071 return type;
2072 }
2073
2074 SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject * op)2075 SwigPyPacked_Check(PyObject *op) {
2076 return ((op)->ob_type == SwigPyPacked_TypeOnce())
2077 || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
2078 }
2079
2080 SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject * v)2081 SwigPyPacked_dealloc(PyObject *v)
2082 {
2083 if (SwigPyPacked_Check(v)) {
2084 SwigPyPacked *sobj = (SwigPyPacked *) v;
2085 free(sobj->pack);
2086 }
2087 PyObject_DEL(v);
2088 }
2089
2090 SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void)2091 SwigPyPacked_TypeOnce(void) {
2092 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2093 static PyTypeObject swigpypacked_type;
2094 static int type_init = 0;
2095 if (!type_init) {
2096 const PyTypeObject tmp = {
2097 #if PY_VERSION_HEX>=0x03000000
2098 PyVarObject_HEAD_INIT(NULL, 0)
2099 #else
2100 PyObject_HEAD_INIT(NULL)
2101 0, /* ob_size */
2102 #endif
2103 (char *)"SwigPyPacked", /* tp_name */
2104 sizeof(SwigPyPacked), /* tp_basicsize */
2105 0, /* tp_itemsize */
2106 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
2107 (printfunc)SwigPyPacked_print, /* tp_print */
2108 (getattrfunc)0, /* tp_getattr */
2109 (setattrfunc)0, /* tp_setattr */
2110 #if PY_VERSION_HEX>=0x03000000
2111 0, /* tp_reserved in 3.0.1 */
2112 #else
2113 (cmpfunc)SwigPyPacked_compare, /* tp_compare */
2114 #endif
2115 (reprfunc)SwigPyPacked_repr, /* tp_repr */
2116 0, /* tp_as_number */
2117 0, /* tp_as_sequence */
2118 0, /* tp_as_mapping */
2119 (hashfunc)0, /* tp_hash */
2120 (ternaryfunc)0, /* tp_call */
2121 (reprfunc)SwigPyPacked_str, /* tp_str */
2122 PyObject_GenericGetAttr, /* tp_getattro */
2123 0, /* tp_setattro */
2124 0, /* tp_as_buffer */
2125 Py_TPFLAGS_DEFAULT, /* tp_flags */
2126 swigpacked_doc, /* tp_doc */
2127 0, /* tp_traverse */
2128 0, /* tp_clear */
2129 0, /* tp_richcompare */
2130 0, /* tp_weaklistoffset */
2131 #if PY_VERSION_HEX >= 0x02020000
2132 0, /* tp_iter */
2133 0, /* tp_iternext */
2134 0, /* tp_methods */
2135 0, /* tp_members */
2136 0, /* tp_getset */
2137 0, /* tp_base */
2138 0, /* tp_dict */
2139 0, /* tp_descr_get */
2140 0, /* tp_descr_set */
2141 0, /* tp_dictoffset */
2142 0, /* tp_init */
2143 0, /* tp_alloc */
2144 0, /* tp_new */
2145 0, /* tp_free */
2146 0, /* tp_is_gc */
2147 0, /* tp_bases */
2148 0, /* tp_mro */
2149 0, /* tp_cache */
2150 0, /* tp_subclasses */
2151 0, /* tp_weaklist */
2152 #endif
2153 #if PY_VERSION_HEX >= 0x02030000
2154 0, /* tp_del */
2155 #endif
2156 #if PY_VERSION_HEX >= 0x02060000
2157 0, /* tp_version_tag */
2158 #endif
2159 #if PY_VERSION_HEX >= 0x03040000
2160 0, /* tp_finalize */
2161 #endif
2162 #ifdef COUNT_ALLOCS
2163 0, /* tp_allocs */
2164 0, /* tp_frees */
2165 0, /* tp_maxalloc */
2166 #if PY_VERSION_HEX >= 0x02050000
2167 0, /* tp_prev */
2168 #endif
2169 0 /* tp_next */
2170 #endif
2171 };
2172 swigpypacked_type = tmp;
2173 type_init = 1;
2174 #if PY_VERSION_HEX < 0x02020000
2175 swigpypacked_type.ob_type = &PyType_Type;
2176 #else
2177 if (PyType_Ready(&swigpypacked_type) < 0)
2178 return NULL;
2179 #endif
2180 }
2181 return &swigpypacked_type;
2182 }
2183
2184 SWIGRUNTIME PyObject *
SwigPyPacked_New(void * ptr,size_t size,swig_type_info * ty)2185 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2186 {
2187 SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2188 if (sobj) {
2189 void *pack = malloc(size);
2190 if (pack) {
2191 memcpy(pack, ptr, size);
2192 sobj->pack = pack;
2193 sobj->ty = ty;
2194 sobj->size = size;
2195 } else {
2196 PyObject_DEL((PyObject *) sobj);
2197 sobj = 0;
2198 }
2199 }
2200 return (PyObject *) sobj;
2201 }
2202
2203 SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject * obj,void * ptr,size_t size)2204 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2205 {
2206 if (SwigPyPacked_Check(obj)) {
2207 SwigPyPacked *sobj = (SwigPyPacked *)obj;
2208 if (sobj->size != size) return 0;
2209 memcpy(ptr, sobj->pack, size);
2210 return sobj->ty;
2211 } else {
2212 return 0;
2213 }
2214 }
2215
2216 /* -----------------------------------------------------------------------------
2217 * pointers/data manipulation
2218 * ----------------------------------------------------------------------------- */
2219
2220 SWIGRUNTIMEINLINE PyObject *
_SWIG_This(void)2221 _SWIG_This(void)
2222 {
2223 return SWIG_Python_str_FromChar("this");
2224 }
2225
2226 static PyObject *swig_this = NULL;
2227
2228 SWIGRUNTIME PyObject *
SWIG_This(void)2229 SWIG_This(void)
2230 {
2231 if (swig_this == NULL)
2232 swig_this = _SWIG_This();
2233 return swig_this;
2234 }
2235
2236 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2237
2238 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2239 #if PY_VERSION_HEX>=0x03000000
2240 #define SWIG_PYTHON_SLOW_GETSET_THIS
2241 #endif
2242
2243 SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject * pyobj)2244 SWIG_Python_GetSwigThis(PyObject *pyobj)
2245 {
2246 PyObject *obj;
2247
2248 if (SwigPyObject_Check(pyobj))
2249 return (SwigPyObject *) pyobj;
2250
2251 #ifdef SWIGPYTHON_BUILTIN
2252 (void)obj;
2253 # ifdef PyWeakref_CheckProxy
2254 if (PyWeakref_CheckProxy(pyobj)) {
2255 pyobj = PyWeakref_GET_OBJECT(pyobj);
2256 if (pyobj && SwigPyObject_Check(pyobj))
2257 return (SwigPyObject*) pyobj;
2258 }
2259 # endif
2260 return NULL;
2261 #else
2262
2263 obj = 0;
2264
2265 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2266 if (PyInstance_Check(pyobj)) {
2267 obj = _PyInstance_Lookup(pyobj, SWIG_This());
2268 } else {
2269 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2270 if (dictptr != NULL) {
2271 PyObject *dict = *dictptr;
2272 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2273 } else {
2274 #ifdef PyWeakref_CheckProxy
2275 if (PyWeakref_CheckProxy(pyobj)) {
2276 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2277 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2278 }
2279 #endif
2280 obj = PyObject_GetAttr(pyobj,SWIG_This());
2281 if (obj) {
2282 Py_DECREF(obj);
2283 } else {
2284 if (PyErr_Occurred()) PyErr_Clear();
2285 return 0;
2286 }
2287 }
2288 }
2289 #else
2290 obj = PyObject_GetAttr(pyobj,SWIG_This());
2291 if (obj) {
2292 Py_DECREF(obj);
2293 } else {
2294 if (PyErr_Occurred()) PyErr_Clear();
2295 return 0;
2296 }
2297 #endif
2298 if (obj && !SwigPyObject_Check(obj)) {
2299 /* a PyObject is called 'this', try to get the 'real this'
2300 SwigPyObject from it */
2301 return SWIG_Python_GetSwigThis(obj);
2302 }
2303 return (SwigPyObject *)obj;
2304 #endif
2305 }
2306
2307 /* Acquire a pointer value */
2308
2309 SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject * obj,int own)2310 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2311 if (own == SWIG_POINTER_OWN) {
2312 SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2313 if (sobj) {
2314 int oldown = sobj->own;
2315 sobj->own = own;
2316 return oldown;
2317 }
2318 }
2319 return 0;
2320 }
2321
2322 /* Convert a pointer value */
2323
2324 SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject * obj,void ** ptr,swig_type_info * ty,int flags,int * own)2325 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2326 int res;
2327 SwigPyObject *sobj;
2328 int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2329
2330 if (!obj)
2331 return SWIG_ERROR;
2332 if (obj == Py_None && !implicit_conv) {
2333 if (ptr)
2334 *ptr = 0;
2335 return SWIG_OK;
2336 }
2337
2338 res = SWIG_ERROR;
2339
2340 sobj = SWIG_Python_GetSwigThis(obj);
2341 if (own)
2342 *own = 0;
2343 while (sobj) {
2344 void *vptr = sobj->ptr;
2345 if (ty) {
2346 swig_type_info *to = sobj->ty;
2347 if (to == ty) {
2348 /* no type cast needed */
2349 if (ptr) *ptr = vptr;
2350 break;
2351 } else {
2352 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2353 if (!tc) {
2354 sobj = (SwigPyObject *)sobj->next;
2355 } else {
2356 if (ptr) {
2357 int newmemory = 0;
2358 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2359 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2360 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2361 if (own)
2362 *own = *own | SWIG_CAST_NEW_MEMORY;
2363 }
2364 }
2365 break;
2366 }
2367 }
2368 } else {
2369 if (ptr) *ptr = vptr;
2370 break;
2371 }
2372 }
2373 if (sobj) {
2374 if (own)
2375 *own = *own | sobj->own;
2376 if (flags & SWIG_POINTER_DISOWN) {
2377 sobj->own = 0;
2378 }
2379 res = SWIG_OK;
2380 } else {
2381 if (implicit_conv) {
2382 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2383 if (data && !data->implicitconv) {
2384 PyObject *klass = data->klass;
2385 if (klass) {
2386 PyObject *impconv;
2387 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2388 impconv = SWIG_Python_CallFunctor(klass, obj);
2389 data->implicitconv = 0;
2390 if (PyErr_Occurred()) {
2391 PyErr_Clear();
2392 impconv = 0;
2393 }
2394 if (impconv) {
2395 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2396 if (iobj) {
2397 void *vptr;
2398 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2399 if (SWIG_IsOK(res)) {
2400 if (ptr) {
2401 *ptr = vptr;
2402 /* transfer the ownership to 'ptr' */
2403 iobj->own = 0;
2404 res = SWIG_AddCast(res);
2405 res = SWIG_AddNewMask(res);
2406 } else {
2407 res = SWIG_AddCast(res);
2408 }
2409 }
2410 }
2411 Py_DECREF(impconv);
2412 }
2413 }
2414 }
2415 }
2416 if (!SWIG_IsOK(res) && obj == Py_None) {
2417 if (ptr)
2418 *ptr = 0;
2419 if (PyErr_Occurred())
2420 PyErr_Clear();
2421 res = SWIG_OK;
2422 }
2423 }
2424 return res;
2425 }
2426
2427 /* Convert a function ptr value */
2428
2429 SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject * obj,void ** ptr,swig_type_info * ty)2430 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2431 if (!PyCFunction_Check(obj)) {
2432 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2433 } else {
2434 void *vptr = 0;
2435
2436 /* here we get the method pointer for callbacks */
2437 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2438 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2439 if (desc)
2440 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2441 if (!desc)
2442 return SWIG_ERROR;
2443 if (ty) {
2444 swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2445 if (tc) {
2446 int newmemory = 0;
2447 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2448 assert(!newmemory); /* newmemory handling not yet implemented */
2449 } else {
2450 return SWIG_ERROR;
2451 }
2452 } else {
2453 *ptr = vptr;
2454 }
2455 return SWIG_OK;
2456 }
2457 }
2458
2459 /* Convert a packed value value */
2460
2461 SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject * obj,void * ptr,size_t sz,swig_type_info * ty)2462 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2463 swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2464 if (!to) return SWIG_ERROR;
2465 if (ty) {
2466 if (to != ty) {
2467 /* check type cast? */
2468 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2469 if (!tc) return SWIG_ERROR;
2470 }
2471 }
2472 return SWIG_OK;
2473 }
2474
2475 /* -----------------------------------------------------------------------------
2476 * Create a new pointer object
2477 * ----------------------------------------------------------------------------- */
2478
2479 /*
2480 Create a new instance object, without calling __init__, and set the
2481 'this' attribute.
2482 */
2483
2484 SWIGRUNTIME PyObject*
SWIG_Python_NewShadowInstance(SwigPyClientData * data,PyObject * swig_this)2485 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2486 {
2487 #if (PY_VERSION_HEX >= 0x02020000)
2488 PyObject *inst = 0;
2489 PyObject *newraw = data->newraw;
2490 if (newraw) {
2491 inst = PyObject_Call(newraw, data->newargs, NULL);
2492 if (inst) {
2493 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2494 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2495 if (dictptr != NULL) {
2496 PyObject *dict = *dictptr;
2497 if (dict == NULL) {
2498 dict = PyDict_New();
2499 *dictptr = dict;
2500 PyDict_SetItem(dict, SWIG_This(), swig_this);
2501 }
2502 }
2503 #else
2504 PyObject *key = SWIG_This();
2505 PyObject_SetAttr(inst, key, swig_this);
2506 #endif
2507 }
2508 } else {
2509 #if PY_VERSION_HEX >= 0x03000000
2510 inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2511 if (inst) {
2512 PyObject_SetAttr(inst, SWIG_This(), swig_this);
2513 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2514 }
2515 #else
2516 PyObject *dict = PyDict_New();
2517 if (dict) {
2518 PyDict_SetItem(dict, SWIG_This(), swig_this);
2519 inst = PyInstance_NewRaw(data->newargs, dict);
2520 Py_DECREF(dict);
2521 }
2522 #endif
2523 }
2524 return inst;
2525 #else
2526 #if (PY_VERSION_HEX >= 0x02010000)
2527 PyObject *inst = 0;
2528 PyObject *dict = PyDict_New();
2529 if (dict) {
2530 PyDict_SetItem(dict, SWIG_This(), swig_this);
2531 inst = PyInstance_NewRaw(data->newargs, dict);
2532 Py_DECREF(dict);
2533 }
2534 return (PyObject *) inst;
2535 #else
2536 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2537 if (inst == NULL) {
2538 return NULL;
2539 }
2540 inst->in_class = (PyClassObject *)data->newargs;
2541 Py_INCREF(inst->in_class);
2542 inst->in_dict = PyDict_New();
2543 if (inst->in_dict == NULL) {
2544 Py_DECREF(inst);
2545 return NULL;
2546 }
2547 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2548 inst->in_weakreflist = NULL;
2549 #endif
2550 #ifdef Py_TPFLAGS_GC
2551 PyObject_GC_Init(inst);
2552 #endif
2553 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2554 return (PyObject *) inst;
2555 #endif
2556 #endif
2557 }
2558
2559 SWIGRUNTIME void
SWIG_Python_SetSwigThis(PyObject * inst,PyObject * swig_this)2560 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2561 {
2562 PyObject *dict;
2563 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2564 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2565 if (dictptr != NULL) {
2566 dict = *dictptr;
2567 if (dict == NULL) {
2568 dict = PyDict_New();
2569 *dictptr = dict;
2570 }
2571 PyDict_SetItem(dict, SWIG_This(), swig_this);
2572 return;
2573 }
2574 #endif
2575 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2576 PyDict_SetItem(dict, SWIG_This(), swig_this);
2577 Py_DECREF(dict);
2578 }
2579
2580
2581 SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject * args)2582 SWIG_Python_InitShadowInstance(PyObject *args) {
2583 PyObject *obj[2];
2584 if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2585 return NULL;
2586 } else {
2587 SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2588 if (sthis) {
2589 SwigPyObject_append((PyObject*) sthis, obj[1]);
2590 } else {
2591 SWIG_Python_SetSwigThis(obj[0], obj[1]);
2592 }
2593 return SWIG_Py_Void();
2594 }
2595 }
2596
2597 /* Create a new pointer object */
2598
2599 SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject * self,void * ptr,swig_type_info * type,int flags)2600 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2601 SwigPyClientData *clientdata;
2602 PyObject * robj;
2603 int own;
2604
2605 if (!ptr)
2606 return SWIG_Py_Void();
2607
2608 clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2609 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2610 if (clientdata && clientdata->pytype) {
2611 SwigPyObject *newobj;
2612 if (flags & SWIG_BUILTIN_TP_INIT) {
2613 newobj = (SwigPyObject*) self;
2614 if (newobj->ptr) {
2615 PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2616 while (newobj->next)
2617 newobj = (SwigPyObject *) newobj->next;
2618 newobj->next = next_self;
2619 newobj = (SwigPyObject *)next_self;
2620 #ifdef SWIGPYTHON_BUILTIN
2621 newobj->dict = 0;
2622 #endif
2623 }
2624 } else {
2625 newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2626 #ifdef SWIGPYTHON_BUILTIN
2627 newobj->dict = 0;
2628 #endif
2629 }
2630 if (newobj) {
2631 newobj->ptr = ptr;
2632 newobj->ty = type;
2633 newobj->own = own;
2634 newobj->next = 0;
2635 return (PyObject*) newobj;
2636 }
2637 return SWIG_Py_Void();
2638 }
2639
2640 assert(!(flags & SWIG_BUILTIN_TP_INIT));
2641
2642 robj = SwigPyObject_New(ptr, type, own);
2643 if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2644 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2645 Py_DECREF(robj);
2646 robj = inst;
2647 }
2648 return robj;
2649 }
2650
2651 /* Create a new packed object */
2652
2653 SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void * ptr,size_t sz,swig_type_info * type)2654 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2655 return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2656 }
2657
2658 /* -----------------------------------------------------------------------------*
2659 * Get type list
2660 * -----------------------------------------------------------------------------*/
2661
2662 #ifdef SWIG_LINK_RUNTIME
2663 void *SWIG_ReturnGlobalTypeList(void *);
2664 #endif
2665
2666 SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void * SWIGUNUSEDPARM (clientdata))2667 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2668 static void *type_pointer = (void *)0;
2669 /* first check if module already created */
2670 if (!type_pointer) {
2671 #ifdef SWIG_LINK_RUNTIME
2672 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2673 #else
2674 # ifdef SWIGPY_USE_CAPSULE
2675 type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2676 # else
2677 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2678 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2679 # endif
2680 if (PyErr_Occurred()) {
2681 PyErr_Clear();
2682 type_pointer = (void *)0;
2683 }
2684 #endif
2685 }
2686 return (swig_module_info *) type_pointer;
2687 }
2688
2689 #if PY_MAJOR_VERSION < 2
2690 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2691 is copied out of Python/modsupport.c in python version 2.3.4 */
2692 SWIGINTERN int
PyModule_AddObject(PyObject * m,char * name,PyObject * o)2693 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2694 {
2695 PyObject *dict;
2696 if (!PyModule_Check(m)) {
2697 PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
2698 return SWIG_ERROR;
2699 }
2700 if (!o) {
2701 PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
2702 return SWIG_ERROR;
2703 }
2704
2705 dict = PyModule_GetDict(m);
2706 if (dict == NULL) {
2707 /* Internal error -- modules must have a dict! */
2708 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2709 PyModule_GetName(m));
2710 return SWIG_ERROR;
2711 }
2712 if (PyDict_SetItemString(dict, name, o))
2713 return SWIG_ERROR;
2714 Py_DECREF(o);
2715 return SWIG_OK;
2716 }
2717 #endif
2718
2719 SWIGRUNTIME void
2720 #ifdef SWIGPY_USE_CAPSULE
SWIG_Python_DestroyModule(PyObject * obj)2721 SWIG_Python_DestroyModule(PyObject *obj)
2722 #else
2723 SWIG_Python_DestroyModule(void *vptr)
2724 #endif
2725 {
2726 #ifdef SWIGPY_USE_CAPSULE
2727 swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2728 #else
2729 swig_module_info *swig_module = (swig_module_info *) vptr;
2730 #endif
2731 swig_type_info **types = swig_module->types;
2732 size_t i;
2733 for (i =0; i < swig_module->size; ++i) {
2734 swig_type_info *ty = types[i];
2735 if (ty->owndata) {
2736 SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2737 if (data) SwigPyClientData_Del(data);
2738 }
2739 }
2740 Py_DECREF(SWIG_This());
2741 swig_this = NULL;
2742 }
2743
2744 SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info * swig_module)2745 SWIG_Python_SetModule(swig_module_info *swig_module) {
2746 #if PY_VERSION_HEX >= 0x03000000
2747 /* Add a dummy module object into sys.modules */
2748 PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2749 #else
2750 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2751 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2752 #endif
2753 #ifdef SWIGPY_USE_CAPSULE
2754 PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2755 if (pointer && module) {
2756 PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2757 } else {
2758 Py_XDECREF(pointer);
2759 }
2760 #else
2761 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2762 if (pointer && module) {
2763 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2764 } else {
2765 Py_XDECREF(pointer);
2766 }
2767 #endif
2768 }
2769
2770 /* The python cached type query */
2771 SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void)2772 SWIG_Python_TypeCache(void) {
2773 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2774 return cache;
2775 }
2776
2777 SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char * type)2778 SWIG_Python_TypeQuery(const char *type)
2779 {
2780 PyObject *cache = SWIG_Python_TypeCache();
2781 PyObject *key = SWIG_Python_str_FromChar(type);
2782 PyObject *obj = PyDict_GetItem(cache, key);
2783 swig_type_info *descriptor;
2784 if (obj) {
2785 #ifdef SWIGPY_USE_CAPSULE
2786 descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2787 #else
2788 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2789 #endif
2790 } else {
2791 swig_module_info *swig_module = SWIG_GetModule(0);
2792 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2793 if (descriptor) {
2794 #ifdef SWIGPY_USE_CAPSULE
2795 obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2796 #else
2797 obj = PyCObject_FromVoidPtr(descriptor, NULL);
2798 #endif
2799 PyDict_SetItem(cache, key, obj);
2800 Py_DECREF(obj);
2801 }
2802 }
2803 Py_DECREF(key);
2804 return descriptor;
2805 }
2806
2807 /*
2808 For backward compatibility only
2809 */
2810 #define SWIG_POINTER_EXCEPTION 0
2811 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2812 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2813
2814 SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char * mesg,int infront)2815 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2816 {
2817 if (PyErr_Occurred()) {
2818 PyObject *type = 0;
2819 PyObject *value = 0;
2820 PyObject *traceback = 0;
2821 PyErr_Fetch(&type, &value, &traceback);
2822 if (value) {
2823 char *tmp;
2824 PyObject *old_str = PyObject_Str(value);
2825 Py_XINCREF(type);
2826 PyErr_Clear();
2827 if (infront) {
2828 PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2829 } else {
2830 PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2831 }
2832 SWIG_Python_str_DelForPy3(tmp);
2833 Py_DECREF(old_str);
2834 }
2835 return 1;
2836 } else {
2837 return 0;
2838 }
2839 }
2840
2841 SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)2842 SWIG_Python_ArgFail(int argnum)
2843 {
2844 if (PyErr_Occurred()) {
2845 /* add information about failing argument */
2846 char mesg[256];
2847 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2848 return SWIG_Python_AddErrMesg(mesg, 1);
2849 } else {
2850 return 0;
2851 }
2852 }
2853
2854 SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject * self)2855 SwigPyObject_GetDesc(PyObject *self)
2856 {
2857 SwigPyObject *v = (SwigPyObject *)self;
2858 swig_type_info *ty = v ? v->ty : 0;
2859 return ty ? ty->str : "";
2860 }
2861
2862 SWIGRUNTIME void
SWIG_Python_TypeError(const char * type,PyObject * obj)2863 SWIG_Python_TypeError(const char *type, PyObject *obj)
2864 {
2865 if (type) {
2866 #if defined(SWIG_COBJECT_TYPES)
2867 if (obj && SwigPyObject_Check(obj)) {
2868 const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2869 if (otype) {
2870 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2871 type, otype);
2872 return;
2873 }
2874 } else
2875 #endif
2876 {
2877 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2878 if (otype) {
2879 PyObject *str = PyObject_Str(obj);
2880 const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2881 if (cstr) {
2882 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2883 type, otype, cstr);
2884 SWIG_Python_str_DelForPy3(cstr);
2885 } else {
2886 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2887 type, otype);
2888 }
2889 Py_XDECREF(str);
2890 return;
2891 }
2892 }
2893 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2894 } else {
2895 PyErr_Format(PyExc_TypeError, "unexpected type is received");
2896 }
2897 }
2898
2899
2900 /* Convert a pointer value, signal an exception on a type mismatch */
2901 SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject * obj,swig_type_info * ty,int SWIGUNUSEDPARM (argnum),int flags)2902 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2903 void *result;
2904 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2905 PyErr_Clear();
2906 #if SWIG_POINTER_EXCEPTION
2907 if (flags) {
2908 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2909 SWIG_Python_ArgFail(argnum);
2910 }
2911 #endif
2912 }
2913 return result;
2914 }
2915
2916 #ifdef SWIGPYTHON_BUILTIN
2917 SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject * obj,PyObject * name,PyObject * value)2918 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2919 PyTypeObject *tp = obj->ob_type;
2920 PyObject *descr;
2921 PyObject *encoded_name;
2922 descrsetfunc f;
2923 int res = -1;
2924
2925 # ifdef Py_USING_UNICODE
2926 if (PyString_Check(name)) {
2927 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2928 if (!name)
2929 return -1;
2930 } else if (!PyUnicode_Check(name))
2931 # else
2932 if (!PyString_Check(name))
2933 # endif
2934 {
2935 PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2936 return -1;
2937 } else {
2938 Py_INCREF(name);
2939 }
2940
2941 if (!tp->tp_dict) {
2942 if (PyType_Ready(tp) < 0)
2943 goto done;
2944 }
2945
2946 descr = _PyType_Lookup(tp, name);
2947 f = NULL;
2948 if (descr != NULL)
2949 f = descr->ob_type->tp_descr_set;
2950 if (!f) {
2951 if (PyString_Check(name)) {
2952 encoded_name = name;
2953 Py_INCREF(name);
2954 } else {
2955 encoded_name = PyUnicode_AsUTF8String(name);
2956 }
2957 PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2958 Py_DECREF(encoded_name);
2959 } else {
2960 res = f(descr, obj, value);
2961 }
2962
2963 done:
2964 Py_DECREF(name);
2965 return res;
2966 }
2967 #endif
2968
2969
2970 #ifdef __cplusplus
2971 }
2972 #endif
2973
2974 #ifdef __cplusplus
2975 extern "C" {
2976 #endif
2977
2978 SWIGINTERN Py_hash_t
SwigPyObject_hash(PyObject * obj)2979 SwigPyObject_hash(PyObject *obj) {
2980 SwigPyObject *sobj = (SwigPyObject *)obj;
2981 void *ptr = sobj->ptr;
2982 return (Py_hash_t)ptr;
2983 }
2984
2985 SWIGINTERN Py_hash_t
SWIG_PyNumber_AsPyHash(PyObject * obj)2986 SWIG_PyNumber_AsPyHash(PyObject *obj) {
2987 Py_hash_t result = -1;
2988 #if PY_VERSION_HEX < 0x03020000
2989 #if PY_VERSION_HEX < 0x03000000
2990 if (PyInt_Check(obj))
2991 result = PyInt_AsLong(obj);
2992 else
2993 #endif
2994 if (PyLong_Check(obj))
2995 result = PyLong_AsLong(obj);
2996 #else
2997 if (PyNumber_Check(obj))
2998 result = PyNumber_AsSsize_t(obj, NULL);
2999 #endif
3000 else
3001 PyErr_Format(PyExc_TypeError, "Wrong type for hash function");
3002 return PyErr_Occurred() ? -1 : result;
3003 }
3004
3005 SWIGINTERN int
SwigPyBuiltin_BadInit(PyObject * self,PyObject * SWIGUNUSEDPARM (args),PyObject * SWIGUNUSEDPARM (kwds))3006 SwigPyBuiltin_BadInit(PyObject *self, PyObject *SWIGUNUSEDPARM(args), PyObject *SWIGUNUSEDPARM(kwds)) {
3007 PyErr_Format(PyExc_TypeError, "Cannot create new instances of type '%.300s'", self->ob_type->tp_name);
3008 return -1;
3009 }
3010
3011 SWIGINTERN void
SwigPyBuiltin_BadDealloc(PyObject * obj)3012 SwigPyBuiltin_BadDealloc(PyObject *obj) {
3013 SwigPyObject *sobj = (SwigPyObject *)obj;
3014 if (sobj->own) {
3015 PyErr_Format(PyExc_TypeError, "Swig detected a memory leak in type '%.300s': no callable destructor found.", obj->ob_type->tp_name);
3016 }
3017 }
3018
3019 typedef struct {
3020 PyCFunction get;
3021 PyCFunction set;
3022 } SwigPyGetSet;
3023
3024 SWIGINTERN PyObject *
SwigPyBuiltin_GetterClosure(PyObject * obj,void * closure)3025 SwigPyBuiltin_GetterClosure (PyObject *obj, void *closure) {
3026 SwigPyGetSet *getset;
3027 PyObject *tuple, *result;
3028 if (!closure)
3029 return SWIG_Py_Void();
3030 getset = (SwigPyGetSet *)closure;
3031 if (!getset->get)
3032 return SWIG_Py_Void();
3033 tuple = PyTuple_New(0);
3034 assert(tuple);
3035 result = (*getset->get)(obj, tuple);
3036 Py_DECREF(tuple);
3037 return result;
3038 }
3039
3040 SWIGINTERN PyObject *
SwigPyBuiltin_FunpackGetterClosure(PyObject * obj,void * closure)3041 SwigPyBuiltin_FunpackGetterClosure (PyObject *obj, void *closure) {
3042 SwigPyGetSet *getset;
3043 PyObject *result;
3044 if (!closure)
3045 return SWIG_Py_Void();
3046 getset = (SwigPyGetSet *)closure;
3047 if (!getset->get)
3048 return SWIG_Py_Void();
3049 result = (*getset->get)(obj, NULL);
3050 return result;
3051 }
3052
3053 SWIGINTERN int
SwigPyBuiltin_SetterClosure(PyObject * obj,PyObject * val,void * closure)3054 SwigPyBuiltin_SetterClosure (PyObject *obj, PyObject *val, void *closure) {
3055 SwigPyGetSet *getset;
3056 PyObject *tuple, *result;
3057 if (!closure) {
3058 PyErr_Format(PyExc_TypeError, "Missing getset closure");
3059 return -1;
3060 }
3061 getset = (SwigPyGetSet *)closure;
3062 if (!getset->set) {
3063 PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
3064 return -1;
3065 }
3066 tuple = PyTuple_New(1);
3067 assert(tuple);
3068 PyTuple_SET_ITEM(tuple, 0, val);
3069 Py_XINCREF(val);
3070 result = (*getset->set)(obj, tuple);
3071 Py_DECREF(tuple);
3072 Py_XDECREF(result);
3073 return result ? 0 : -1;
3074 }
3075
3076 SWIGINTERN int
SwigPyBuiltin_FunpackSetterClosure(PyObject * obj,PyObject * val,void * closure)3077 SwigPyBuiltin_FunpackSetterClosure (PyObject *obj, PyObject *val, void *closure) {
3078 SwigPyGetSet *getset;
3079 PyObject *result;
3080 if (!closure) {
3081 PyErr_Format(PyExc_TypeError, "Missing getset closure");
3082 return -1;
3083 }
3084 getset = (SwigPyGetSet *)closure;
3085 if (!getset->set) {
3086 PyErr_Format(PyExc_TypeError, "Illegal member variable assignment in type '%.300s'", obj->ob_type->tp_name);
3087 return -1;
3088 }
3089 result = (*getset->set)(obj, val);
3090 Py_XDECREF(result);
3091 return result ? 0 : -1;
3092 }
3093
3094 SWIGINTERN void
SwigPyStaticVar_dealloc(PyDescrObject * descr)3095 SwigPyStaticVar_dealloc(PyDescrObject *descr) {
3096 _PyObject_GC_UNTRACK(descr);
3097 Py_XDECREF(PyDescr_TYPE(descr));
3098 Py_XDECREF(PyDescr_NAME(descr));
3099 PyObject_GC_Del(descr);
3100 }
3101
3102 SWIGINTERN PyObject *
SwigPyStaticVar_repr(PyGetSetDescrObject * descr)3103 SwigPyStaticVar_repr(PyGetSetDescrObject *descr) {
3104 #if PY_VERSION_HEX >= 0x03000000
3105
3106 return PyUnicode_FromFormat("<class attribute '%S' of type '%s'>", PyDescr_NAME(descr), PyDescr_TYPE(descr)->tp_name);
3107 #else
3108 return PyString_FromFormat("<class attribute '%s' of type '%s'>", PyString_AsString(PyDescr_NAME(descr)), PyDescr_TYPE(descr)->tp_name);
3109 #endif
3110 }
3111
3112 SWIGINTERN int
SwigPyStaticVar_traverse(PyObject * self,visitproc visit,void * arg)3113 SwigPyStaticVar_traverse(PyObject *self, visitproc visit, void *arg) {
3114 PyDescrObject *descr;
3115 descr = (PyDescrObject *)self;
3116 Py_VISIT((PyObject*) PyDescr_TYPE(descr));
3117 return 0;
3118 }
3119
3120 SWIGINTERN PyObject *
SwigPyStaticVar_get(PyGetSetDescrObject * descr,PyObject * obj,PyObject * SWIGUNUSEDPARM (type))3121 SwigPyStaticVar_get(PyGetSetDescrObject *descr, PyObject *obj, PyObject *SWIGUNUSEDPARM(type)) {
3122 if (descr->d_getset->get != NULL)
3123 return descr->d_getset->get(obj, descr->d_getset->closure);
3124 #if PY_VERSION_HEX >= 0x03000000
3125 PyErr_Format(PyExc_AttributeError, "attribute '%.300S' of '%.100s' objects is not readable", PyDescr_NAME(descr), PyDescr_TYPE(descr)->tp_name);
3126 #else
3127 PyErr_Format(PyExc_AttributeError, "attribute '%.300s' of '%.100s' objects is not readable", PyString_AsString(PyDescr_NAME(descr)), PyDescr_TYPE(descr)->tp_name);
3128 #endif
3129 return NULL;
3130 }
3131
3132 SWIGINTERN int
SwigPyStaticVar_set(PyGetSetDescrObject * descr,PyObject * obj,PyObject * value)3133 SwigPyStaticVar_set(PyGetSetDescrObject *descr, PyObject *obj, PyObject *value) {
3134 if (descr->d_getset->set != NULL)
3135 return descr->d_getset->set(obj, value, descr->d_getset->closure);
3136 #if PY_VERSION_HEX >= 0x03000000
3137 PyErr_Format(PyExc_AttributeError, "attribute '%.300S' of '%.100s' objects is not writable", PyDescr_NAME(descr), PyDescr_TYPE(descr)->tp_name);
3138 #else
3139 PyErr_Format(PyExc_AttributeError, "attribute '%.300s' of '%.100s' objects is not writable", PyString_AsString(PyDescr_NAME(descr)), PyDescr_TYPE(descr)->tp_name);
3140 #endif
3141 return -1;
3142 }
3143
3144 SWIGINTERN int
SwigPyObjectType_setattro(PyObject * typeobject,PyObject * name,PyObject * value)3145 SwigPyObjectType_setattro(PyObject *typeobject, PyObject *name, PyObject *value) {
3146 PyObject *attribute;
3147 PyTypeObject *type;
3148 descrsetfunc local_set;
3149
3150 assert(PyType_Check(typeobject));
3151 type = (PyTypeObject *)typeobject;
3152 attribute = _PyType_Lookup(type, name);
3153 if (attribute != NULL) {
3154 /* Implement descriptor functionality, if any */
3155 local_set = attribute->ob_type->tp_descr_set;
3156 if (local_set != NULL)
3157 return local_set(attribute, (PyObject *)type, value);
3158 #if PY_VERSION_HEX >= 0x03000000
3159 PyErr_Format(PyExc_AttributeError, "cannot modify read-only attribute '%.50s.%.400S'", type->tp_name, name);
3160 #else
3161 PyErr_Format(PyExc_AttributeError, "cannot modify read-only attribute '%.50s.%.400s'", type->tp_name, PyString_AS_STRING(name));
3162 #endif
3163 } else {
3164 #if PY_VERSION_HEX >= 0x03000000
3165 PyErr_Format(PyExc_AttributeError, "type '%.50s' has no attribute '%.400S'", type->tp_name, name);
3166 #else
3167 PyErr_Format(PyExc_AttributeError, "type '%.50s' has no attribute '%.400s'", type->tp_name, PyString_AS_STRING(name));
3168 #endif
3169 }
3170
3171 return -1;
3172 }
3173
3174 SWIGINTERN PyTypeObject*
SwigPyStaticVar_Type(void)3175 SwigPyStaticVar_Type(void) {
3176 static PyTypeObject staticvar_type;
3177 static int type_init = 0;
3178 if (!type_init) {
3179 const PyTypeObject tmp = {
3180 #if PY_VERSION_HEX >= 0x03000000
3181 PyVarObject_HEAD_INIT(&PyType_Type, 0)
3182 #else
3183 PyObject_HEAD_INIT(&PyType_Type)
3184 0, /* ob_size */
3185 #endif
3186 "swig_static_var_getset_descriptor", /* tp_name */
3187 sizeof(PyGetSetDescrObject), /* tp_basicsize */
3188 0, /* tp_itemsize */
3189 (destructor)SwigPyStaticVar_dealloc, /* tp_dealloc */
3190 0, /* tp_print */
3191 0, /* tp_getattr */
3192 0, /* tp_setattr */
3193 0, /* tp_compare */
3194 (reprfunc)SwigPyStaticVar_repr, /* tp_repr */
3195 0, /* tp_as_number */
3196 0, /* tp_as_sequence */
3197 0, /* tp_as_mapping */
3198 0, /* tp_hash */
3199 0, /* tp_call */
3200 0, /* tp_str */
3201 PyObject_GenericGetAttr, /* tp_getattro */
3202 0, /* tp_setattro */
3203 0, /* tp_as_buffer */
3204 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_CLASS, /* tp_flags */
3205 0, /* tp_doc */
3206 SwigPyStaticVar_traverse, /* tp_traverse */
3207 0, /* tp_clear */
3208 0, /* tp_richcompare */
3209 0, /* tp_weaklistoffset */
3210 0, /* tp_iter */
3211 0, /* tp_iternext */
3212 0, /* tp_methods */
3213 0, /* tp_members */
3214 0, /* tp_getset */
3215 0, /* tp_base */
3216 0, /* tp_dict */
3217 (descrgetfunc)SwigPyStaticVar_get, /* tp_descr_get */
3218 (descrsetfunc)SwigPyStaticVar_set, /* tp_descr_set */
3219 0, /* tp_dictoffset */
3220 0, /* tp_init */
3221 0, /* tp_alloc */
3222 0, /* tp_new */
3223 0, /* tp_free */
3224 0, /* tp_is_gc */
3225 0, /* tp_bases */
3226 0, /* tp_mro */
3227 0, /* tp_cache */
3228 0, /* tp_subclasses */
3229 0, /* tp_weaklist */
3230 #if PY_VERSION_HEX >= 0x02030000
3231 0, /* tp_del */
3232 #endif
3233 #if PY_VERSION_HEX >= 0x02060000
3234 0, /* tp_version_tag */
3235 #endif
3236 #if PY_VERSION_HEX >= 0x03040000
3237 0, /* tp_finalize */
3238 #endif
3239 #ifdef COUNT_ALLOCS
3240 0, /* tp_allocs */
3241 0, /* tp_frees */
3242 0, /* tp_maxalloc */
3243 #if PY_VERSION_HEX >= 0x02050000
3244 0, /* tp_prev */
3245 #endif
3246 0 /* tp_next */
3247 #endif
3248 };
3249 staticvar_type = tmp;
3250 type_init = 1;
3251 #if PY_VERSION_HEX < 0x02020000
3252 staticvar_type.ob_type = &PyType_Type;
3253 #else
3254 if (PyType_Ready(&staticvar_type) < 0)
3255 return NULL;
3256 #endif
3257 }
3258 return &staticvar_type;
3259 }
3260
3261 SWIGINTERN PyTypeObject*
SwigPyObjectType(void)3262 SwigPyObjectType(void) {
3263 static char swigpyobjecttype_doc[] = "Metaclass for SWIG wrapped types";
3264 static PyTypeObject swigpyobjecttype_type;
3265 static int type_init = 0;
3266 if (!type_init) {
3267 const PyTypeObject tmp = {
3268 #if PY_VERSION_HEX >= 0x03000000
3269 PyVarObject_HEAD_INIT(&PyType_Type, 0)
3270 #else
3271 PyObject_HEAD_INIT(&PyType_Type)
3272 0, /* ob_size */
3273 #endif
3274 "SwigPyObjectType", /* tp_name */
3275 PyType_Type.tp_basicsize, /* tp_basicsize */
3276 0, /* tp_itemsize */
3277 0, /* tp_dealloc */
3278 0, /* tp_print */
3279 0, /* tp_getattr */
3280 0, /* tp_setattr */
3281 0, /* tp_compare */
3282 0, /* tp_repr */
3283 0, /* tp_as_number */
3284 0, /* tp_as_sequence */
3285 0, /* tp_as_mapping */
3286 0, /* tp_hash */
3287 0, /* tp_call */
3288 0, /* tp_str */
3289 0, /* tp_getattro */
3290 SwigPyObjectType_setattro, /* tp_setattro */
3291 0, /* tp_as_buffer */
3292 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_CLASS, /* tp_flags */
3293 swigpyobjecttype_doc, /* tp_doc */
3294 0, /* tp_traverse */
3295 0, /* tp_clear */
3296 0, /* tp_richcompare */
3297 0, /* tp_weaklistoffset */
3298 0, /* tp_iter */
3299 0, /* tp_iternext */
3300 0, /* tp_methods */
3301 0, /* tp_members */
3302 0, /* tp_getset */
3303 0, /* tp_base */
3304 0, /* tp_dict */
3305 0, /* tp_descr_get */
3306 0, /* tp_descr_set */
3307 0, /* tp_dictoffset */
3308 0, /* tp_init */
3309 0, /* tp_alloc */
3310 0, /* tp_new */
3311 0, /* tp_free */
3312 0, /* tp_is_gc */
3313 0, /* tp_bases */
3314 0, /* tp_mro */
3315 0, /* tp_cache */
3316 0, /* tp_subclasses */
3317 0, /* tp_weaklist */
3318 #if PY_VERSION_HEX >= 0x02030000
3319 0, /* tp_del */
3320 #endif
3321 #if PY_VERSION_HEX >= 0x02060000
3322 0, /* tp_version_tag */
3323 #endif
3324 #if PY_VERSION_HEX >= 0x03040000
3325 0, /* tp_finalize */
3326 #endif
3327 #ifdef COUNT_ALLOCS
3328 0, /* tp_allocs */
3329 0, /* tp_frees */
3330 0, /* tp_maxalloc */
3331 #if PY_VERSION_HEX >= 0x02050000
3332 0, /* tp_prev */
3333 #endif
3334 0 /* tp_next */
3335 #endif
3336 };
3337 swigpyobjecttype_type = tmp;
3338 type_init = 1;
3339 swigpyobjecttype_type.tp_base = &PyType_Type;
3340 #if PY_VERSION_HEX < 0x02020000
3341 swigpyobjecttype_type.ob_type = &PyType_Type;
3342 #else
3343 if (PyType_Ready(&swigpyobjecttype_type) < 0)
3344 return NULL;
3345 #endif
3346 }
3347 return &swigpyobjecttype_type;
3348 }
3349
3350 SWIGINTERN PyGetSetDescrObject *
SwigPyStaticVar_new_getset(PyTypeObject * type,PyGetSetDef * getset)3351 SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) {
3352
3353 PyGetSetDescrObject *descr;
3354 descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0);
3355 assert(descr);
3356 Py_XINCREF(type);
3357 PyDescr_TYPE(descr) = type;
3358 PyDescr_NAME(descr) = PyString_InternFromString(getset->name);
3359 descr->d_getset = getset;
3360 if (PyDescr_NAME(descr) == NULL) {
3361 Py_DECREF(descr);
3362 descr = NULL;
3363 }
3364 return descr;
3365 }
3366
3367 SWIGINTERN void
SwigPyBuiltin_InitBases(PyTypeObject * type,PyTypeObject ** bases)3368 SwigPyBuiltin_InitBases (PyTypeObject *type, PyTypeObject **bases) {
3369 int base_count = 0;
3370 PyTypeObject **b;
3371 PyObject *tuple;
3372 int i;
3373
3374 if (!bases[0]) {
3375 bases[0] = SwigPyObject_type();
3376 bases[1] = NULL;
3377 }
3378 type->tp_base = bases[0];
3379 Py_INCREF((PyObject *)bases[0]);
3380 for (b = bases; *b != NULL; ++b)
3381 ++base_count;
3382 tuple = PyTuple_New(base_count);
3383 for (i = 0; i < base_count; ++i) {
3384 PyTuple_SET_ITEM(tuple, i, (PyObject *)bases[i]);
3385 Py_INCREF((PyObject *)bases[i]);
3386 }
3387 type->tp_bases = tuple;
3388 }
3389
3390 SWIGINTERN PyObject *
SwigPyBuiltin_ThisClosure(PyObject * self,void * SWIGUNUSEDPARM (closure))3391 SwigPyBuiltin_ThisClosure (PyObject *self, void *SWIGUNUSEDPARM(closure)) {
3392 PyObject *result;
3393 result = (PyObject *)SWIG_Python_GetSwigThis(self);
3394 Py_XINCREF(result);
3395 return result;
3396 }
3397
3398 SWIGINTERN void
SwigPyBuiltin_SetMetaType(PyTypeObject * type,PyTypeObject * metatype)3399 SwigPyBuiltin_SetMetaType (PyTypeObject *type, PyTypeObject *metatype)
3400 {
3401 #if PY_VERSION_HEX >= 0x03000000
3402 type->ob_base.ob_base.ob_type = metatype;
3403 #else
3404 type->ob_type = metatype;
3405 #endif
3406 }
3407
3408
3409 /* Start of callback function macros for use in PyTypeObject */
3410
3411 typedef PyObject *(*SwigPyWrapperFunction)(PyObject *, PyObject *);
3412
3413 #define SWIGPY_UNARYFUNC_CLOSURE(wrapper) \
3414 SWIGINTERN PyObject * \
3415 wrapper##_unaryfunc_closure(PyObject *a) { \
3416 return SwigPyBuiltin_unaryfunc_closure(wrapper, a); \
3417 }
3418 SWIGINTERN PyObject *
SwigPyBuiltin_unaryfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3419 SwigPyBuiltin_unaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3420 return wrapper(a, NULL);
3421 }
3422
3423 #define SWIGPY_DESTRUCTOR_CLOSURE(wrapper) \
3424 SWIGINTERN void \
3425 wrapper##_destructor_closure(PyObject *a) { \
3426 SwigPyBuiltin_destructor_closure(wrapper, #wrapper, a); \
3427 }
3428 SWIGINTERN void
SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper,const char * wrappername,PyObject * a)3429 SwigPyBuiltin_destructor_closure(SwigPyWrapperFunction wrapper, const char *wrappername, PyObject *a) {
3430 SwigPyObject *sobj;
3431 sobj = (SwigPyObject *)a;
3432 Py_XDECREF(sobj->dict);
3433 if (sobj->own) {
3434 PyObject *o;
3435 PyObject *val = 0, *type = 0, *tb = 0;
3436 PyErr_Fetch(&val, &type, &tb);
3437 o = wrapper(a, NULL);
3438 if (!o) {
3439 PyObject *deallocname = PyString_FromString(wrappername);
3440 PyErr_WriteUnraisable(deallocname);
3441 Py_DECREF(deallocname);
3442 }
3443 PyErr_Restore(val, type, tb);
3444 Py_XDECREF(o);
3445 }
3446 if (PyType_IS_GC(a->ob_type)) {
3447 PyObject_GC_Del(a);
3448 } else {
3449 PyObject_Del(a);
3450 }
3451 }
3452
3453 #define SWIGPY_INQUIRY_CLOSURE(wrapper) \
3454 SWIGINTERN int \
3455 wrapper##_inquiry_closure(PyObject *a) { \
3456 return SwigPyBuiltin_inquiry_closure(wrapper, a); \
3457 }
3458 SWIGINTERN int
SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper,PyObject * a)3459 SwigPyBuiltin_inquiry_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3460 PyObject *pyresult;
3461 int result;
3462 pyresult = wrapper(a, NULL);
3463 result = pyresult && PyObject_IsTrue(pyresult) ? 1 : 0;
3464 Py_XDECREF(pyresult);
3465 return result;
3466 }
3467
3468 #define SWIGPY_GETITERFUNC_CLOSURE(wrapper) \
3469 SWIGINTERN PyObject * \
3470 wrapper##_getiterfunc_closure(PyObject *a) { \
3471 return SwigPyBuiltin_getiterfunc_closure(wrapper, a); \
3472 }
3473 SWIGINTERN PyObject *
SwigPyBuiltin_getiterfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3474 SwigPyBuiltin_getiterfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3475 return wrapper(a, NULL);
3476 }
3477
3478 #define SWIGPY_BINARYFUNC_CLOSURE(wrapper) \
3479 SWIGINTERN PyObject * \
3480 wrapper##_binaryfunc_closure(PyObject *a, PyObject *b) { \
3481 return SwigPyBuiltin_binaryfunc_closure(wrapper, a, b); \
3482 }
3483 SWIGINTERN PyObject *
SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b)3484 SwigPyBuiltin_binaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b) {
3485 PyObject *tuple, *result;
3486 tuple = PyTuple_New(1);
3487 assert(tuple);
3488 PyTuple_SET_ITEM(tuple, 0, b);
3489 Py_XINCREF(b);
3490 result = wrapper(a, tuple);
3491 Py_DECREF(tuple);
3492 return result;
3493 }
3494
3495 typedef ternaryfunc ternarycallfunc;
3496
3497 #define SWIGPY_TERNARYFUNC_CLOSURE(wrapper) \
3498 SWIGINTERN PyObject * \
3499 wrapper##_ternaryfunc_closure(PyObject *a, PyObject *b, PyObject *c) { \
3500 return SwigPyBuiltin_ternaryfunc_closure(wrapper, a, b, c); \
3501 }
3502 SWIGINTERN PyObject *
SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b,PyObject * c)3503 SwigPyBuiltin_ternaryfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) {
3504 PyObject *tuple, *result;
3505 tuple = PyTuple_New(2);
3506 assert(tuple);
3507 PyTuple_SET_ITEM(tuple, 0, b);
3508 PyTuple_SET_ITEM(tuple, 1, c);
3509 Py_XINCREF(b);
3510 Py_XINCREF(c);
3511 result = wrapper(a, tuple);
3512 Py_DECREF(tuple);
3513 return result;
3514 }
3515
3516 #define SWIGPY_TERNARYCALLFUNC_CLOSURE(wrapper) \
3517 SWIGINTERN PyObject * \
3518 wrapper##_ternarycallfunc_closure(PyObject *a, PyObject *b, PyObject *c) { \
3519 return SwigPyBuiltin_ternarycallfunc_closure(wrapper, a, b, c); \
3520 }
3521 SWIGINTERN PyObject *
SwigPyBuiltin_ternarycallfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b,PyObject * c)3522 SwigPyBuiltin_ternarycallfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) {
3523 (void) c;
3524 return wrapper(a, b);
3525 }
3526
3527 #define SWIGPY_LENFUNC_CLOSURE(wrapper) \
3528 SWIGINTERN Py_ssize_t \
3529 wrapper##_lenfunc_closure(PyObject *a) { \
3530 return SwigPyBuiltin_lenfunc_closure(wrapper, a); \
3531 }
3532 SWIGINTERN Py_ssize_t
SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3533 SwigPyBuiltin_lenfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3534 PyObject *resultobj;
3535 Py_ssize_t result;
3536 resultobj = wrapper(a, NULL);
3537 result = PyNumber_AsSsize_t(resultobj, NULL);
3538 Py_DECREF(resultobj);
3539 return result;
3540 }
3541
3542 #define SWIGPY_SSIZESSIZEARGFUNC_CLOSURE(wrapper) \
3543 SWIGINTERN PyObject * \
3544 wrapper##_ssizessizeargfunc_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c) { \
3545 return SwigPyBuiltin_ssizessizeargfunc_closure(wrapper, a, b, c); \
3546 }
3547 SWIGINTERN PyObject *
SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b,Py_ssize_t c)3548 SwigPyBuiltin_ssizessizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, Py_ssize_t c) {
3549 PyObject *tuple, *result;
3550 tuple = PyTuple_New(2);
3551 assert(tuple);
3552 PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3553 PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c));
3554 result = wrapper(a, tuple);
3555 Py_DECREF(tuple);
3556 return result;
3557 }
3558
3559 #define SWIGPY_SSIZESSIZEOBJARGPROC_CLOSURE(wrapper) \
3560 SWIGINTERN int \
3561 wrapper##_ssizessizeobjargproc_closure(PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) { \
3562 return SwigPyBuiltin_ssizessizeobjargproc_closure(wrapper, a, b, c, d); \
3563 }
3564 SWIGINTERN int
SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b,Py_ssize_t c,PyObject * d)3565 SwigPyBuiltin_ssizessizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, Py_ssize_t c, PyObject *d) {
3566 PyObject *tuple, *resultobj;
3567 int result;
3568 tuple = PyTuple_New(d ? 3 : 2);
3569 assert(tuple);
3570 PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3571 PyTuple_SET_ITEM(tuple, 1, _PyLong_FromSsize_t(c));
3572 if (d) {
3573 PyTuple_SET_ITEM(tuple, 2, d);
3574 Py_INCREF(d);
3575 }
3576 resultobj = wrapper(a, tuple);
3577 result = resultobj ? 0 : -1;
3578 Py_DECREF(tuple);
3579 Py_XDECREF(resultobj);
3580 return result;
3581 }
3582
3583 #define SWIGPY_SSIZEARGFUNC_CLOSURE(wrapper) \
3584 SWIGINTERN PyObject * \
3585 wrapper##_ssizeargfunc_closure(PyObject *a, Py_ssize_t b) { \
3586 return SwigPyBuiltin_funpack_ssizeargfunc_closure(wrapper, a, b); \
3587 }
3588 SWIGINTERN PyObject *
SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b)3589 SwigPyBuiltin_funpack_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b) {
3590 PyObject *tuple, *result;
3591 tuple = PyTuple_New(1);
3592 assert(tuple);
3593 PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3594 result = wrapper(a, tuple);
3595 Py_DECREF(tuple);
3596 return result;
3597 }
3598
3599 #define SWIGPY_FUNPACK_SSIZEARGFUNC_CLOSURE(wrapper) \
3600 SWIGINTERN PyObject * \
3601 wrapper##_ssizeargfunc_closure(PyObject *a, Py_ssize_t b) { \
3602 return SwigPyBuiltin_ssizeargfunc_closure(wrapper, a, b); \
3603 }
3604 SWIGINTERN PyObject *
SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b)3605 SwigPyBuiltin_ssizeargfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b) {
3606 PyObject *arg, *result;
3607 arg = _PyLong_FromSsize_t(b);
3608 result = wrapper(a, arg);
3609 Py_DECREF(arg);
3610 return result;
3611 }
3612
3613 #define SWIGPY_SSIZEOBJARGPROC_CLOSURE(wrapper) \
3614 SWIGINTERN int \
3615 wrapper##_ssizeobjargproc_closure(PyObject *a, Py_ssize_t b, PyObject *c) { \
3616 return SwigPyBuiltin_ssizeobjargproc_closure(wrapper, a, b, c); \
3617 }
3618 SWIGINTERN int
SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,Py_ssize_t b,PyObject * c)3619 SwigPyBuiltin_ssizeobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, Py_ssize_t b, PyObject *c) {
3620 PyObject *tuple, *resultobj;
3621 int result;
3622 tuple = PyTuple_New(2);
3623 assert(tuple);
3624 PyTuple_SET_ITEM(tuple, 0, _PyLong_FromSsize_t(b));
3625 PyTuple_SET_ITEM(tuple, 1, c);
3626 Py_XINCREF(c);
3627 resultobj = wrapper(a, tuple);
3628 result = resultobj ? 0 : -1;
3629 Py_XDECREF(resultobj);
3630 Py_DECREF(tuple);
3631 return result;
3632 }
3633
3634 #define SWIGPY_OBJOBJARGPROC_CLOSURE(wrapper) \
3635 SWIGINTERN int \
3636 wrapper##_objobjargproc_closure(PyObject *a, PyObject *b, PyObject *c) { \
3637 return SwigPyBuiltin_objobjargproc_closure(wrapper, a, b, c); \
3638 }
3639 SWIGINTERN int
SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper,PyObject * a,PyObject * b,PyObject * c)3640 SwigPyBuiltin_objobjargproc_closure(SwigPyWrapperFunction wrapper, PyObject *a, PyObject *b, PyObject *c) {
3641 PyObject *tuple, *resultobj;
3642 int result;
3643 tuple = PyTuple_New(c ? 2 : 1);
3644 assert(tuple);
3645 PyTuple_SET_ITEM(tuple, 0, b);
3646 Py_XINCREF(b);
3647 if (c) {
3648 PyTuple_SET_ITEM(tuple, 1, c);
3649 Py_XINCREF(c);
3650 }
3651 resultobj = wrapper(a, tuple);
3652 result = resultobj ? 0 : -1;
3653 Py_XDECREF(resultobj);
3654 Py_DECREF(tuple);
3655 return result;
3656 }
3657
3658 #define SWIGPY_REPRFUNC_CLOSURE(wrapper) \
3659 SWIGINTERN PyObject * \
3660 wrapper##_reprfunc_closure(PyObject *a) { \
3661 return SwigPyBuiltin_reprfunc_closure(wrapper, a); \
3662 }
3663 SWIGINTERN PyObject *
SwigPyBuiltin_reprfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3664 SwigPyBuiltin_reprfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3665 return wrapper(a, NULL);
3666 }
3667
3668 #define SWIGPY_HASHFUNC_CLOSURE(wrapper) \
3669 SWIGINTERN Py_hash_t \
3670 wrapper##_hashfunc_closure(PyObject *a) { \
3671 return SwigPyBuiltin_hashfunc_closure(wrapper, a); \
3672 }
3673 SWIGINTERN Py_hash_t
SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3674 SwigPyBuiltin_hashfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3675 PyObject *pyresult;
3676 Py_hash_t result;
3677 pyresult = wrapper(a, NULL);
3678 if (!pyresult)
3679 return -1;
3680 result = SWIG_PyNumber_AsPyHash(pyresult);
3681 Py_DECREF(pyresult);
3682 return result;
3683 }
3684
3685 #define SWIGPY_ITERNEXTFUNC_CLOSURE(wrapper) \
3686 SWIGINTERN PyObject * \
3687 wrapper##_iternextfunc_closure(PyObject *a) { \
3688 return SwigPyBuiltin_iternextfunc_closure(wrapper, a);\
3689 }
3690 SWIGINTERN PyObject *
SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper,PyObject * a)3691 SwigPyBuiltin_iternextfunc_closure(SwigPyWrapperFunction wrapper, PyObject *a) {
3692 return wrapper(a, NULL);
3693 }
3694
3695 /* End of callback function macros for use in PyTypeObject */
3696
3697 #ifdef __cplusplus
3698 }
3699 #endif
3700
3701
3702
3703
3704 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
3705
3706 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
3707
3708
3709
3710 /* -------- TYPES TABLE (BEGIN) -------- */
3711
3712 #define SWIGTYPE_p_SwigPyObject swig_types[0]
3713 #define SWIGTYPE_p_char swig_types[1]
3714 #define SWIGTYPE_p_double swig_types[2]
3715 #define SWIGTYPE_p_gsl_interp2d_type swig_types[3]
3716 #define SWIGTYPE_p_pygsl_interp2d swig_types[4]
3717 #define SWIGTYPE_p_pygsl_spline2d swig_types[5]
3718 #define SWIGTYPE_p_void swig_types[6]
3719 static swig_type_info *swig_types[8];
3720 static swig_module_info swig_module = {swig_types, 7, 0, 0, 0, 0};
3721 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3722 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3723
3724 /* -------- TYPES TABLE (END) -------- */
3725
3726 #if (PY_VERSION_HEX <= 0x02000000)
3727 # if !defined(SWIG_PYTHON_CLASSIC)
3728 # error "This python version requires swig to be run with the '-classic' option"
3729 # endif
3730 #endif
3731 #if (PY_VERSION_HEX <= 0x02020000)
3732 # error "This python version requires swig to be run with the '-nomodern' option"
3733 #endif
3734 #if (PY_VERSION_HEX <= 0x02020000)
3735 # error "This python version requires swig to be run with the '-nomodernargs' option"
3736 #endif
3737 #ifndef METH_O
3738 # error "This python version requires swig to be run with the '-nofastunpack' option"
3739 #endif
3740 #ifdef SWIG_TypeQuery
3741 # undef SWIG_TypeQuery
3742 #endif
3743 #define SWIG_TypeQuery SWIG_Python_TypeQuery
3744
3745 /*-----------------------------------------------
3746 @(target):= _interpolation2d_wrap.so
3747 ------------------------------------------------*/
3748 #if PY_VERSION_HEX >= 0x03000000
3749 # define SWIG_init PyInit__interpolation2d_wrap
3750
3751 #else
3752 # define SWIG_init init_interpolation2d_wrap
3753
3754 #endif
3755 #define SWIG_name "_interpolation2d_wrap"
3756
3757 #define SWIGVERSION 0x030012
3758 #define SWIG_VERSION SWIGVERSION
3759
3760
3761 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
3762 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
3763
3764
3765 #include <stddef.h>
3766
3767
3768 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
3769 #include <numpy/arrayobject.h>
3770
3771 #include <gsl/gsl_interp2d.h>
3772 #include <gsl/gsl_spline2d.h>
3773 #include <pygsl/error_helpers.h>
3774 #include <pygsl/block_helpers.h>
3775
3776 static PyObject *module = NULL;
3777
3778
3779 #include <stddef.h>
3780 #include <pygsl/utils.h>
3781 #include <pygsl/error_helpers.h>
3782 typedef int gsl_error_flag;
3783 typedef int gsl_error_flag_drop;
3784 PyObject *pygsl_module_for_error_treatment = NULL;
3785
3786
3787
3788 #include <pygsl/utils.h>
3789 #include <pygsl/block_helpers.h>
3790 #include <typemaps/block_conversion_functions.h>
3791 #include <string.h>
3792 #include <assert.h>
3793
3794
3795 struct _pygsl_interp2d{
3796 gsl_interp2d *interp;
3797 gsl_interp_accel * x_acc;
3798 gsl_interp_accel * y_acc;
3799 /* and to the appropriate data pointers */
3800 const double * x_a;
3801 const double * y_a;
3802 const double * z_a;
3803 /* keep references to the object ... for memory managment */
3804 PyArrayObject * xa_obj;
3805 PyArrayObject * ya_obj;
3806 PyArrayObject * za_obj;
3807 };
3808 typedef struct _pygsl_interp2d pygsl_interp2d;
3809
3810 struct _pygsl_spline2d{
3811 gsl_spline2d *spline;
3812 gsl_interp_accel * x_acc;
3813 gsl_interp_accel * y_acc;
3814 };
3815 typedef struct _pygsl_spline2d pygsl_spline2d;
3816
3817 /*
3818 * The evaluations can be made using array objects as inputs. This function is
3819 * a bit longer, thus it is defined once and function pointers are provided,
3820 * which are then evaluated.
3821 *
3822 * First a structure is defined which combines the pointers to the data
3823 * structures, the call back, and a enum storing the information which kind of
3824 * callback is to be used.
3825 *
3826 * The function can handle _eval and _eval_e "methods"
3827 */
3828 enum _pygsl_interp_spline_2d_type{
3829 PyGSL_INTERP2D_EVAL = 0,
3830 PyGSL_INTERP2D_EVAL_E,
3831 PyGSL_SPLINE2D_EVAL,
3832 PyGSL_SPLINE2D_EVAL_E
3833 };
3834 struct _pygsl_interp_spline_2d{
3835 union{
3836 const pygsl_interp2d * py_interp;
3837 const pygsl_spline2d * py_spline;
3838 }str;
3839 union{
3840 int (*fint_e)(const gsl_interp2d * interp, const double xarr[],
3841 const double yarr[], const double zarr[],
3842 const double x, const double y, gsl_interp_accel* xa,
3843 gsl_interp_accel* ya, double * z);
3844
3845 double (*fint)(const gsl_interp2d * interp, const double xarr[],
3846 const double yarr[], const double zarr[],
3847 const double x, const double y, gsl_interp_accel* xa,
3848 gsl_interp_accel* ya);
3849
3850 int (*fsp_e)(const gsl_spline2d * sp,
3851 const double x, const double y, gsl_interp_accel* xa,
3852 gsl_interp_accel* ya, double * z);
3853
3854 double (*fsp)(const gsl_spline2d * sp,
3855 const double x, const double y, gsl_interp_accel* xa,
3856 gsl_interp_accel* ya);
3857 }func;
3858 enum _pygsl_interp_spline_2d_type type;
3859 };
3860
3861 typedef struct _pygsl_interp_spline_2d pygsl_interp_spline_2d_t;
3862
3863
3864 /* Uses numpy iterator to evaluate the arrays */
3865 static PyObject *
pygsl_interp2d_eval_array_func(const pygsl_interp_spline_2d_t obj,PyObject * x_o,PyObject * y_o)3866 pygsl_interp2d_eval_array_func(const pygsl_interp_spline_2d_t obj, PyObject *x_o, PyObject *y_o)
3867 {
3868
3869 PyArrayObject *op[4] = {NULL, NULL, NULL, NULL};
3870 PyArrayObject *x_a = NULL, *y_a = NULL, *z_a = NULL, *e_a = NULL;
3871 PyArray_Descr* op_dtypes[4] = {NULL, NULL, NULL, NULL};
3872 PyObject *result = NULL;
3873
3874 NpyIter *iter = NULL;
3875 NpyIter_IterNextFunc *iternext = NULL;
3876 npy_intp *inner_size, *strides;
3877 char **data_array;
3878 npy_uint32 flags;
3879 npy_uint32 op_flags[4] = {0,0,0,0};
3880 NPY_ORDER order = NPY_KEEPORDER;
3881
3882 int line = __LINE__, with_flags = 0, nd = 0, requires = 0;
3883
3884
3885 FUNC_MESS_BEGIN();
3886
3887 op_flags[0] = NPY_ITER_READONLY;
3888 op_flags[1] = NPY_ITER_READONLY;
3889 op_flags[2] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE;
3890 op_flags[3] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE;
3891
3892 op_dtypes[0] = NULL;
3893 op_dtypes[1] = NULL;
3894 op_dtypes[2] = PyArray_DescrFromType(NPY_DOUBLE);
3895 op_dtypes[3] = PyArray_DescrFromType(NPY_INT);
3896
3897 /* most inner loop given below */
3898 flags = NPY_ITER_EXTERNAL_LOOP;
3899
3900 /* which type of evaluation are we heading to ? */
3901 switch(obj.type){
3902 case PyGSL_INTERP2D_EVAL:
3903 case PyGSL_SPLINE2D_EVAL:
3904 with_flags = 0;
3905 break;
3906
3907 case PyGSL_INTERP2D_EVAL_E:
3908 case PyGSL_SPLINE2D_EVAL_E:
3909 with_flags = 1;
3910 break;
3911
3912 default:
3913 DEBUG_MESS(2, "eval type %d unknown", obj.type);
3914 line = __LINE__;
3915 pygsl_error("Unknown eval type", __FILE__, line, GSL_ESANITY);
3916 goto fail;
3917 }
3918
3919 nd = 0;
3920 requires = 0;
3921 x_a = (PyArrayObject * ) PyArray_FromAny(x_o, PyArray_DescrFromType(NPY_DOUBLE), nd, nd, requires, NULL);
3922 if(x_a == NULL){
3923 line = __LINE__ - 2;
3924 goto fail;
3925 }
3926
3927 nd = PyArray_NDIM(x_a);
3928 y_a = (PyArrayObject * ) PyArray_FromAny(y_o, PyArray_DescrFromType(NPY_DOUBLE), nd, nd, requires, NULL);
3929 if(y_a == NULL){
3930 line = __LINE__ - 2;
3931 goto fail;
3932 }
3933
3934 op[0] = x_a;
3935 op[1] = y_a;
3936 op[2] = NULL;
3937 op[3] = NULL;
3938
3939 /* methods with "_e" return a flag depending on the data */
3940 iter = NpyIter_MultiNew(with_flags == 0 ? 3 : 4,
3941 op, flags, order, NPY_NO_CASTING, op_flags, op_dtypes);
3942 if (iter == NULL) {
3943 line = __LINE__ - 2 ;
3944 goto fail;
3945 }
3946
3947 iternext = NpyIter_GetIterNext(iter, NULL);
3948 if(iternext == NULL){
3949 line = __LINE__ - 2;
3950 goto fail;
3951 }
3952
3953 strides = NpyIter_GetInnerStrideArray(iter);
3954 if(strides == NULL){
3955 line = __LINE__ - 2;
3956 goto fail;
3957 }
3958
3959 inner_size = NpyIter_GetInnerLoopSizePtr(iter);
3960 data_array = NpyIter_GetDataPtrArray(iter);
3961
3962 do{
3963 npy_intp i, size = *inner_size;
3964 npy_intp x_stride, y_stride, z_stride, e_stride = 0;
3965 char * x_p, *y_p, *z_p, *e_p = NULL;
3966
3967 x_p = data_array[0];
3968 y_p = data_array[1];
3969 z_p = data_array[2];
3970 e_p = (with_flags == 0) ? NULL: data_array[3];
3971
3972 x_stride = strides[0];
3973 y_stride = strides[1];
3974 z_stride = strides[2];
3975 e_stride = (with_flags == 0) ? 0 : strides[3];
3976
3977 /* inner loop */
3978 for(i = 0; i < size; ++i, x_p += x_stride, y_p += y_stride, z_p += z_stride, e_p += e_stride){
3979 double * x_d = (double *) x_p;
3980 double * y_d = (double *) y_p;
3981 double * z_d = (double *) z_p;
3982 int * e_i = (int *) e_p;
3983 const pygsl_interp2d *intp = NULL;
3984 const pygsl_spline2d *sp = NULL;
3985
3986 switch(obj.type){
3987 case PyGSL_INTERP2D_EVAL:
3988 intp = obj.str.py_interp;
3989 *z_d = obj.func.fint(intp->interp, intp->x_a, intp->y_a, intp->z_a, *x_d, *y_d, intp->x_acc, intp->y_acc);
3990 break;
3991
3992 case PyGSL_SPLINE2D_EVAL:
3993 sp = obj.str.py_spline;
3994 *z_d = obj.func.fsp(sp->spline, *x_d, *y_d, sp->x_acc, sp->y_acc);
3995 break;
3996
3997 case PyGSL_INTERP2D_EVAL_E:
3998 intp = obj.str.py_interp;
3999 *e_i = obj.func.fint_e(intp->interp, intp->x_a, intp->y_a, intp->z_a, *x_d, *y_d, intp->x_acc, intp->y_acc, z_d);
4000 break;
4001
4002 case PyGSL_SPLINE2D_EVAL_E:
4003 sp = obj.str.py_spline;
4004 *e_i = obj.func.fsp_e(sp->spline, *x_d, *y_d, sp->x_acc, sp->y_acc, z_d);
4005 break;
4006 }
4007 }
4008 }while(iternext(iter));
4009
4010 Py_DECREF(x_a);
4011 Py_DECREF(y_a);
4012
4013 z_a = NpyIter_GetOperandArray(iter)[2];
4014 Py_INCREF(z_a);
4015
4016 if(with_flags == 0){
4017 result = (PyObject *)z_a;
4018 }else{
4019 e_a = NpyIter_GetOperandArray(iter)[3];
4020 Py_INCREF(e_a);
4021 result = PyTuple_New(2);
4022 if(result == NULL){
4023 line = __LINE__ - 1;
4024 goto fail;
4025 }
4026 PyTuple_SET_ITEM(result, 0, (PyObject *)z_a);
4027 z_a = NULL;
4028 PyTuple_SET_ITEM(result, 1, (PyObject *)e_a);
4029 e_a = NULL;
4030 }
4031
4032 return (PyObject *) result;
4033
4034 fail:
4035 Py_XDECREF(x_a);
4036 Py_XDECREF(y_a);
4037 Py_XDECREF(z_a);
4038 Py_XDECREF(e_a);
4039 Py_XDECREF(result);
4040 PyGSL_add_traceback(module, __FILE__, __FUNCTION__, line);
4041 return NULL;
4042 }
4043
4044 /* required at clean up and for any call to init */
pygsl_interp2d_free_array_objects(pygsl_interp2d * self)4045 void pygsl_interp2d_free_array_objects(pygsl_interp2d *self)
4046 {
4047 if(self == NULL){
4048 DEBUG_MESS(2, "self: %p == NULL: could not free arrays as expected!"
4049 "potential memory leak", (void *) self);
4050 return;
4051 }
4052 self->x_a = NULL;
4053 self->y_a = NULL;
4054 self->z_a = NULL;
4055
4056 /* give back the references */
4057 Py_XDECREF(self->xa_obj);
4058 Py_XDECREF(self->ya_obj);
4059 Py_XDECREF(self->za_obj);
4060
4061
4062 self->xa_obj = NULL;
4063 self->ya_obj = NULL;
4064 self->za_obj = NULL;
4065
4066 }
4067
4068 void
pygsl_interp2d_free_all(pygsl_interp2d * self)4069 pygsl_interp2d_free_all(pygsl_interp2d *self)
4070 {
4071 if(self == NULL){
4072 return;
4073 }
4074 if(self->interp != NULL){
4075 gsl_interp2d_free(self->interp);
4076 }
4077 self->interp = NULL;
4078 pygsl_interp2d_free_array_objects(self);
4079
4080 if(self->x_acc){
4081 gsl_interp_accel_free(self->x_acc);
4082 }
4083 if(self->y_acc){
4084 gsl_interp_accel_free(self->y_acc);
4085 }
4086 free(self);
4087 }
4088
4089 void
pygsl_spline2d_free_all(pygsl_spline2d * self)4090 pygsl_spline2d_free_all(pygsl_spline2d *self)
4091 {
4092 if(self == NULL){
4093 return;
4094 }
4095 if(self->spline != NULL){
4096 gsl_spline2d_free(self->spline);
4097 }
4098 self->spline = NULL;
4099 if(self->x_acc){
4100 gsl_interp_accel_free(self->x_acc);
4101 }
4102 if(self->y_acc){
4103 gsl_interp_accel_free(self->y_acc);
4104 }
4105 free(self);
4106 }
4107
4108
4109 SWIGINTERN int
SWIG_AsVal_double(PyObject * obj,double * val)4110 SWIG_AsVal_double (PyObject *obj, double *val)
4111 {
4112 int res = SWIG_TypeError;
4113 if (PyFloat_Check(obj)) {
4114 if (val) *val = PyFloat_AsDouble(obj);
4115 return SWIG_OK;
4116 #if PY_VERSION_HEX < 0x03000000
4117 } else if (PyInt_Check(obj)) {
4118 if (val) *val = (double) PyInt_AsLong(obj);
4119 return SWIG_OK;
4120 #endif
4121 } else if (PyLong_Check(obj)) {
4122 double v = PyLong_AsDouble(obj);
4123 if (!PyErr_Occurred()) {
4124 if (val) *val = v;
4125 return SWIG_OK;
4126 } else {
4127 PyErr_Clear();
4128 }
4129 }
4130 #ifdef SWIG_PYTHON_CAST_MODE
4131 {
4132 int dispatch = 0;
4133 double d = PyFloat_AsDouble(obj);
4134 if (!PyErr_Occurred()) {
4135 if (val) *val = d;
4136 return SWIG_AddCast(SWIG_OK);
4137 } else {
4138 PyErr_Clear();
4139 }
4140 if (!dispatch) {
4141 long v = PyLong_AsLong(obj);
4142 if (!PyErr_Occurred()) {
4143 if (val) *val = v;
4144 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
4145 } else {
4146 PyErr_Clear();
4147 }
4148 }
4149 }
4150 #endif
4151 return res;
4152 }
4153
4154
4155 #include <float.h>
4156
4157
4158 #include <math.h>
4159
4160
4161 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)4162 SWIG_CanCastAsInteger(double *d, double min, double max) {
4163 double x = *d;
4164 if ((min <= x && x <= max)) {
4165 double fx = floor(x);
4166 double cx = ceil(x);
4167 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
4168 if ((errno == EDOM) || (errno == ERANGE)) {
4169 errno = 0;
4170 } else {
4171 double summ, reps, diff;
4172 if (rd < x) {
4173 diff = x - rd;
4174 } else if (rd > x) {
4175 diff = rd - x;
4176 } else {
4177 return 1;
4178 }
4179 summ = rd + x;
4180 reps = diff/summ;
4181 if (reps < 8*DBL_EPSILON) {
4182 *d = rd;
4183 return 1;
4184 }
4185 }
4186 }
4187 return 0;
4188 }
4189
4190
4191 SWIGINTERN int
SWIG_AsVal_unsigned_SS_long(PyObject * obj,unsigned long * val)4192 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
4193 {
4194 #if PY_VERSION_HEX < 0x03000000
4195 if (PyInt_Check(obj)) {
4196 long v = PyInt_AsLong(obj);
4197 if (v >= 0) {
4198 if (val) *val = v;
4199 return SWIG_OK;
4200 } else {
4201 return SWIG_OverflowError;
4202 }
4203 } else
4204 #endif
4205 if (PyLong_Check(obj)) {
4206 unsigned long v = PyLong_AsUnsignedLong(obj);
4207 if (!PyErr_Occurred()) {
4208 if (val) *val = v;
4209 return SWIG_OK;
4210 } else {
4211 PyErr_Clear();
4212 return SWIG_OverflowError;
4213 }
4214 }
4215 #ifdef SWIG_PYTHON_CAST_MODE
4216 {
4217 int dispatch = 0;
4218 unsigned long v = PyLong_AsUnsignedLong(obj);
4219 if (!PyErr_Occurred()) {
4220 if (val) *val = v;
4221 return SWIG_AddCast(SWIG_OK);
4222 } else {
4223 PyErr_Clear();
4224 }
4225 if (!dispatch) {
4226 double d;
4227 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
4228 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
4229 if (val) *val = (unsigned long)(d);
4230 return res;
4231 }
4232 }
4233 }
4234 #endif
4235 return SWIG_TypeError;
4236 }
4237
4238
4239 #include <limits.h>
4240 #if !defined(SWIG_NO_LLONG_MAX)
4241 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
4242 # define LLONG_MAX __LONG_LONG_MAX__
4243 # define LLONG_MIN (-LLONG_MAX - 1LL)
4244 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
4245 # endif
4246 #endif
4247
4248
4249 #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
4250 # define SWIG_LONG_LONG_AVAILABLE
4251 #endif
4252
4253
4254 #ifdef SWIG_LONG_LONG_AVAILABLE
4255 SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long(PyObject * obj,unsigned long long * val)4256 SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
4257 {
4258 int res = SWIG_TypeError;
4259 if (PyLong_Check(obj)) {
4260 unsigned long long v = PyLong_AsUnsignedLongLong(obj);
4261 if (!PyErr_Occurred()) {
4262 if (val) *val = v;
4263 return SWIG_OK;
4264 } else {
4265 PyErr_Clear();
4266 res = SWIG_OverflowError;
4267 }
4268 } else {
4269 unsigned long v;
4270 res = SWIG_AsVal_unsigned_SS_long (obj,&v);
4271 if (SWIG_IsOK(res)) {
4272 if (val) *val = v;
4273 return res;
4274 }
4275 }
4276 #ifdef SWIG_PYTHON_CAST_MODE
4277 {
4278 const double mant_max = 1LL << DBL_MANT_DIG;
4279 double d;
4280 res = SWIG_AsVal_double (obj,&d);
4281 if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
4282 return SWIG_OverflowError;
4283 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
4284 if (val) *val = (unsigned long long)(d);
4285 return SWIG_AddCast(res);
4286 }
4287 res = SWIG_TypeError;
4288 }
4289 #endif
4290 return res;
4291 }
4292 #endif
4293
4294
4295 SWIGINTERNINLINE int
SWIG_AsVal_size_t(PyObject * obj,size_t * val)4296 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
4297 {
4298 int res = SWIG_TypeError;
4299 #ifdef SWIG_LONG_LONG_AVAILABLE
4300 if (sizeof(size_t) <= sizeof(unsigned long)) {
4301 #endif
4302 unsigned long v;
4303 res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
4304 if (SWIG_IsOK(res) && val) *val = (size_t)(v);
4305 #ifdef SWIG_LONG_LONG_AVAILABLE
4306 } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
4307 unsigned long long v;
4308 res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
4309 if (SWIG_IsOK(res) && val) *val = (size_t)(v);
4310 }
4311 #endif
4312 return res;
4313 }
4314
new_pygsl_interp2d(gsl_interp2d_type const * T,size_t const x_size,size_t const y_size)4315 SWIGINTERN pygsl_interp2d *new_pygsl_interp2d(gsl_interp2d_type const *T,size_t const x_size,size_t const y_size){
4316 pygsl_interp2d *p = NULL;
4317
4318 p = (pygsl_interp2d *) calloc(1, sizeof(pygsl_interp2d));
4319 if(p == NULL){
4320 pygsl_error("Failed to allocate acceleration memory for pygsl_interp struct",
4321 "src\\gslwrap\\interpolation2d.i", 593, GSL_EFAILED);
4322 return NULL;
4323 }
4324
4325 p->x_a = NULL;
4326 p->y_a = NULL;
4327 p->z_a = NULL;
4328
4329 p->xa_obj = NULL;
4330 p->ya_obj = NULL;
4331 p->za_obj = NULL;
4332
4333 p->x_acc = NULL;
4334 p->y_acc = NULL;
4335
4336 p->interp = NULL;
4337
4338 p->x_acc = gsl_interp_accel_alloc();
4339 if(p->x_acc == NULL){
4340 goto fail;
4341 }
4342 p->y_acc = gsl_interp_accel_alloc();
4343 if(p->y_acc == NULL){
4344 goto fail;
4345 }
4346
4347 p->interp = gsl_interp2d_alloc(T, x_size, y_size);
4348 if(p->interp == NULL){
4349 pygsl_error("Failed to allocate acceleration memory for gsl_interp2D",
4350 "src\\gslwrap\\interpolation2d.i", 622, GSL_EFAILED);
4351 goto fail;
4352 }
4353 return p;
4354
4355 fail:
4356 pygsl_interp2d_free_all(p);
4357 return NULL;
4358 }
delete_pygsl_interp2d(pygsl_interp2d * self)4359 SWIGINTERN void delete_pygsl_interp2d(pygsl_interp2d *self){
4360 pygsl_interp2d_free_all(self);
4361 }
pygsl_interp2d_reset(pygsl_interp2d * self)4362 SWIGINTERN gsl_error_flag_drop pygsl_interp2d_reset(pygsl_interp2d *self){
4363 int flag = GSL_EFAILED, line = 637;
4364
4365 flag = gsl_interp_accel_reset(self->x_acc);
4366 if(PyGSL_ERROR_FLAG(flag) != GSL_SUCCESS){
4367 line = 641 - 2;
4368 goto fail;
4369 }
4370
4371 flag = gsl_interp_accel_reset(self->y_acc);
4372 if(PyGSL_ERROR_FLAG(flag) != GSL_SUCCESS){
4373 line = 647 - 2;
4374 goto fail;
4375 }
4376 return GSL_SUCCESS;
4377
4378 fail:
4379 PyGSL_add_traceback(module, "src\\gslwrap\\interpolation2d.i", __FUNCTION__, line);
4380 return flag;
4381
4382 }
pygsl_interp2d_name(pygsl_interp2d * self)4383 SWIGINTERN char const *pygsl_interp2d_name(pygsl_interp2d *self){
4384 return gsl_interp2d_name(self->interp);
4385 }
4386
4387 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)4388 SWIG_pchar_descriptor(void)
4389 {
4390 static int init = 0;
4391 static swig_type_info* info = 0;
4392 if (!init) {
4393 info = SWIG_TypeQuery("_p_char");
4394 init = 1;
4395 }
4396 return info;
4397 }
4398
4399
4400 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)4401 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
4402 {
4403 if (carray) {
4404 if (size > INT_MAX) {
4405 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
4406 return pchar_descriptor ?
4407 SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
4408 } else {
4409 #if PY_VERSION_HEX >= 0x03000000
4410 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
4411 return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size));
4412 #else
4413 #if PY_VERSION_HEX >= 0x03010000
4414 return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape");
4415 #else
4416 return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size));
4417 #endif
4418 #endif
4419 #else
4420 return PyString_FromStringAndSize(carray, (Py_ssize_t)(size));
4421 #endif
4422 }
4423 } else {
4424 return SWIG_Py_Void();
4425 }
4426 }
4427
4428
4429 SWIGINTERNINLINE PyObject *
SWIG_FromCharPtr(const char * cptr)4430 SWIG_FromCharPtr(const char *cptr)
4431 {
4432 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
4433 }
4434
pygsl_interp2d_min_size(pygsl_interp2d * self)4435 SWIGINTERN size_t pygsl_interp2d_min_size(pygsl_interp2d *self){
4436 return gsl_interp2d_min_size(self->interp);
4437 }
4438
4439 #define SWIG_From_long PyInt_FromLong
4440
4441
4442 SWIGINTERNINLINE PyObject*
SWIG_From_unsigned_SS_long(unsigned long value)4443 SWIG_From_unsigned_SS_long (unsigned long value)
4444 {
4445 return (value > LONG_MAX) ?
4446 PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value));
4447 }
4448
4449
4450 #ifdef SWIG_LONG_LONG_AVAILABLE
4451 SWIGINTERNINLINE PyObject*
SWIG_From_unsigned_SS_long_SS_long(unsigned long long value)4452 SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
4453 {
4454 return (value > LONG_MAX) ?
4455 PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)(value));
4456 }
4457 #endif
4458
4459
4460 SWIGINTERNINLINE PyObject *
SWIG_From_size_t(size_t value)4461 SWIG_From_size_t (size_t value)
4462 {
4463 #ifdef SWIG_LONG_LONG_AVAILABLE
4464 if (sizeof(size_t) <= sizeof(unsigned long)) {
4465 #endif
4466 return SWIG_From_unsigned_SS_long ((unsigned long)(value));
4467 #ifdef SWIG_LONG_LONG_AVAILABLE
4468 } else {
4469 /* assume sizeof(size_t) <= sizeof(unsigned long long) */
4470 return SWIG_From_unsigned_SS_long_SS_long ((unsigned long long)(value));
4471 }
4472 #endif
4473 }
4474
pygsl_interp2d_init(pygsl_interp2d * self,PyObject * x_o,PyObject * y_o,PyObject * z_o)4475 SWIGINTERN gsl_error_flag_drop pygsl_interp2d_init(pygsl_interp2d *self,PyObject *x_o,PyObject *y_o,PyObject *z_o){
4476 PyGSL_array_index_t x_size, y_size;
4477 size_t xt_size, yt_size;
4478 int flag = GSL_EFAILED, line = 669;
4479
4480 /* dispose references to old arrays */
4481 pygsl_interp2d_free_array_objects(self);
4482
4483 xt_size = self->interp->xsize;
4484 yt_size = self->interp->ysize;
4485 x_size = xt_size;
4486 y_size = yt_size;
4487
4488 /* signed x_size */
4489 if(x_size < 0){
4490 line = 681 - 1;
4491 pygsl_error("x_size <0", "src\\gslwrap\\interpolation2d.i", line, GSL_ESANITY);
4492 goto fail;
4493 }
4494 if(y_size < 0){
4495 line = 686 - 1;
4496 pygsl_error("y_size <0", "src\\gslwrap\\interpolation2d.i", line, GSL_ESANITY);
4497 goto fail;
4498 }
4499
4500 self->xa_obj = PyGSL_vector_check(x_o, x_size, PyGSL_DARRAY_CINPUT(1), NULL, NULL);
4501 if(self->xa_obj == NULL){
4502 line = 693 - 1;
4503 goto fail;
4504 }
4505 self->ya_obj = PyGSL_vector_check(y_o, y_size, PyGSL_DARRAY_CINPUT(2), NULL, NULL);
4506 if(self->ya_obj == NULL){
4507 line = 698 - 1;
4508 goto fail;
4509 }
4510 self->za_obj = PyGSL_matrix_check(z_o, x_size, y_size, PyGSL_DARRAY_CINPUT(3), NULL, NULL, NULL);
4511 if(self->za_obj == NULL){
4512 line = 703 - 1;
4513 goto fail;
4514 }
4515
4516 self->x_a = (const double *) PyArray_DATA(self->xa_obj);
4517 self->y_a = (const double *) PyArray_DATA(self->ya_obj);
4518 self->z_a = (const double *) PyArray_DATA(self->za_obj);
4519
4520 flag = gsl_interp2d_init(self->interp, self->x_a, self->y_a, self->z_a, xt_size, yt_size);
4521 if(PyGSL_ERROR_FLAG(flag) != GSL_SUCCESS){
4522 goto fail;
4523 }
4524 return GSL_SUCCESS;
4525
4526 fail:
4527 PyGSL_add_traceback(module, "src\\gslwrap\\interpolation2d.i", __FUNCTION__, line);
4528 pygsl_interp2d_free_array_objects(self);
4529 return flag;
4530 }
pygsl_interp2d_idx(pygsl_interp2d * self,size_t const i,size_t const j)4531 SWIGINTERN size_t pygsl_interp2d_idx(pygsl_interp2d *self,size_t const i,size_t const j){
4532 return gsl_interp2d_idx(self->interp, i, j);
4533 }
pygsl_interp2d_get(pygsl_interp2d * self,size_t const i,size_t const j)4534 SWIGINTERN double pygsl_interp2d_get(pygsl_interp2d *self,size_t const i,size_t const j){
4535 return gsl_interp2d_get(self->interp, self->z_a, i, j);
4536 }
4537
4538 #define SWIG_From_double PyFloat_FromDouble
4539
pygsl_interp2d_eval(pygsl_interp2d * self,double const x,double const y)4540 SWIGINTERN double pygsl_interp2d_eval(pygsl_interp2d *self,double const x,double const y){ return gsl_interp2d_eval(self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc); }
pygsl_interp2d_eval_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4541 SWIGINTERN PyObject *pygsl_interp2d_eval_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL; obj.func.fint = gsl_interp2d_eval; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_extrap(pygsl_interp2d * self,double const x,double const y)4542 SWIGINTERN double pygsl_interp2d_eval_extrap(pygsl_interp2d *self,double const x,double const y){ return gsl_interp2d_eval_extrap(self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc); }
pygsl_interp2d_eval_extrap_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4543 SWIGINTERN PyObject *pygsl_interp2d_eval_extrap_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL; obj.func.fint = gsl_interp2d_eval_extrap; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_x(pygsl_interp2d * self,double const x,double const y)4544 SWIGINTERN double pygsl_interp2d_eval_deriv_x(pygsl_interp2d *self,double const x,double const y){ return gsl_interp2d_eval_deriv_x(self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc); }
pygsl_interp2d_eval_deriv_x_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4545 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_x_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL; obj.func.fint = gsl_interp2d_eval_deriv_x; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_y(pygsl_interp2d * self,double const x,double const y)4546 SWIGINTERN double pygsl_interp2d_eval_deriv_y(pygsl_interp2d *self,double const x,double const y){ return gsl_interp2d_eval_deriv_y(self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc); }
pygsl_interp2d_eval_deriv_y_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4547 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_y_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL; obj.func.fint = gsl_interp2d_eval_deriv_y; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_xx(pygsl_interp2d * self,double const x,double const y)4548 SWIGINTERN double pygsl_interp2d_eval_deriv_xx(pygsl_interp2d *self,double const x,double const y){ return gsl_interp2d_eval_deriv_xx(self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc); }
pygsl_interp2d_eval_deriv_xx_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4549 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_xx_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL; obj.func.fint = gsl_interp2d_eval_deriv_xx; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_xy(pygsl_interp2d * self,double const x,double const y)4550 SWIGINTERN double pygsl_interp2d_eval_deriv_xy(pygsl_interp2d *self,double const x,double const y){ return gsl_interp2d_eval_deriv_xy(self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc); }
pygsl_interp2d_eval_deriv_xy_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4551 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_xy_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL; obj.func.fint = gsl_interp2d_eval_deriv_xy; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_yy(pygsl_interp2d * self,double const x,double const y)4552 SWIGINTERN double pygsl_interp2d_eval_deriv_yy(pygsl_interp2d *self,double const x,double const y){ return gsl_interp2d_eval_deriv_yy(self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc); }
pygsl_interp2d_eval_deriv_yy_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4553 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_yy_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL; obj.func.fint = gsl_interp2d_eval_deriv_yy; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_e(pygsl_interp2d * self,double const x,double const y,double * z)4554 SWIGINTERN gsl_error_flag_drop pygsl_interp2d_eval_e(pygsl_interp2d *self,double const x,double const y,double *z){ return gsl_interp2d_eval_e (self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc, z); }
pygsl_interp2d_eval_e_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4555 SWIGINTERN PyObject *pygsl_interp2d_eval_e_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL_E; obj.func.fint_e = gsl_interp2d_eval_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_e_extrap(pygsl_interp2d * self,double const x,double const y,double * z)4556 SWIGINTERN gsl_error_flag_drop pygsl_interp2d_eval_e_extrap(pygsl_interp2d *self,double const x,double const y,double *z){ return gsl_interp2d_eval_e_extrap (self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc, z); }
pygsl_interp2d_eval_e_extrap_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4557 SWIGINTERN PyObject *pygsl_interp2d_eval_e_extrap_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL_E; obj.func.fint_e = gsl_interp2d_eval_e_extrap; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_x_e(pygsl_interp2d * self,double const x,double const y,double * z)4558 SWIGINTERN gsl_error_flag_drop pygsl_interp2d_eval_deriv_x_e(pygsl_interp2d *self,double const x,double const y,double *z){ return gsl_interp2d_eval_deriv_x_e (self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc, z); }
pygsl_interp2d_eval_deriv_x_e_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4559 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_x_e_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL_E; obj.func.fint_e = gsl_interp2d_eval_deriv_x_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_y_e(pygsl_interp2d * self,double const x,double const y,double * z)4560 SWIGINTERN gsl_error_flag_drop pygsl_interp2d_eval_deriv_y_e(pygsl_interp2d *self,double const x,double const y,double *z){ return gsl_interp2d_eval_deriv_y_e (self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc, z); }
pygsl_interp2d_eval_deriv_y_e_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4561 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_y_e_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL_E; obj.func.fint_e = gsl_interp2d_eval_deriv_y_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_xx_e(pygsl_interp2d * self,double const x,double const y,double * z)4562 SWIGINTERN gsl_error_flag_drop pygsl_interp2d_eval_deriv_xx_e(pygsl_interp2d *self,double const x,double const y,double *z){ return gsl_interp2d_eval_deriv_xx_e (self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc, z); }
pygsl_interp2d_eval_deriv_xx_e_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4563 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_xx_e_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL_E; obj.func.fint_e = gsl_interp2d_eval_deriv_xx_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_xy_e(pygsl_interp2d * self,double const x,double const y,double * z)4564 SWIGINTERN gsl_error_flag_drop pygsl_interp2d_eval_deriv_xy_e(pygsl_interp2d *self,double const x,double const y,double *z){ return gsl_interp2d_eval_deriv_xy_e (self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc, z); }
pygsl_interp2d_eval_deriv_xy_e_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4565 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_xy_e_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL_E; obj.func.fint_e = gsl_interp2d_eval_deriv_xy_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_interp2d_eval_deriv_yy_e(pygsl_interp2d * self,double const x,double const y,double * z)4566 SWIGINTERN gsl_error_flag_drop pygsl_interp2d_eval_deriv_yy_e(pygsl_interp2d *self,double const x,double const y,double *z){ return gsl_interp2d_eval_deriv_yy_e (self->interp, self->x_a, self->y_a, self->z_a, x, y, self->x_acc, self->y_acc, z); }
pygsl_interp2d_eval_deriv_yy_e_array(pygsl_interp2d * self,PyObject * x,PyObject * y)4567 SWIGINTERN PyObject *pygsl_interp2d_eval_deriv_yy_e_array(pygsl_interp2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_interp = self; obj.type = PyGSL_INTERP2D_EVAL_E; obj.func.fint_e = gsl_interp2d_eval_deriv_yy_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
new_pygsl_spline2d(gsl_interp2d_type const * T,size_t const x_size,size_t const y_size)4568 SWIGINTERN pygsl_spline2d *new_pygsl_spline2d(gsl_interp2d_type const *T,size_t const x_size,size_t const y_size){
4569 pygsl_spline2d *p = NULL;
4570
4571 FUNC_MESS_BEGIN();
4572 p = (pygsl_spline2d *) calloc(1, sizeof(pygsl_interp2d));
4573 if(p == NULL)
4574 goto fail;
4575
4576 p->x_acc = NULL;
4577 p->y_acc = NULL;
4578 p->spline = NULL;
4579
4580 p->spline = gsl_spline2d_alloc(T, x_size, y_size);
4581 if(p->spline == NULL){
4582 pygsl_error("Failed to allocate acceleration memory for gsl_spline2d",
4583 "src\\gslwrap\\interpolation2d.i", 444, GSL_EFAILED);
4584 goto fail;
4585 }
4586
4587 p->x_acc = gsl_interp_accel_alloc();
4588 if(p->x_acc == NULL){
4589 goto fail;
4590 }
4591 p->y_acc = gsl_interp_accel_alloc();
4592 if(p->y_acc == NULL){
4593 goto fail;
4594 }
4595
4596 FUNC_MESS_END();
4597 return p;
4598
4599 fail:
4600 pygsl_spline2d_free_all(p);
4601 return NULL;
4602 }
delete_pygsl_spline2d(pygsl_spline2d * self)4603 SWIGINTERN void delete_pygsl_spline2d(pygsl_spline2d *self){
4604 pygsl_spline2d_free_all(self);
4605 }
pygsl_spline2d_reset(pygsl_spline2d * self)4606 SWIGINTERN gsl_error_flag_drop pygsl_spline2d_reset(pygsl_spline2d *self){
4607 int flag = GSL_EFAILED, line = 470;
4608
4609 flag = gsl_interp_accel_reset(self->x_acc);
4610 if(PyGSL_ERROR_FLAG(flag) != GSL_SUCCESS){
4611 line = 474 - 2;
4612 goto fail;
4613 }
4614
4615 flag = gsl_interp_accel_reset(self->y_acc);
4616 if(PyGSL_ERROR_FLAG(flag) != GSL_SUCCESS){
4617 line = 480 - 2;
4618 goto fail;
4619 }
4620 return GSL_SUCCESS;
4621
4622 fail:
4623 PyGSL_add_traceback(module, "src\\gslwrap\\interpolation2d.i", __FUNCTION__, line);
4624 return flag;
4625
4626 }
pygsl_spline2d_name(pygsl_spline2d * self)4627 SWIGINTERN char const *pygsl_spline2d_name(pygsl_spline2d *self){
4628 return gsl_spline2d_name(self->spline);
4629 }
pygsl_spline2d_min_size(pygsl_spline2d * self)4630 SWIGINTERN size_t pygsl_spline2d_min_size(pygsl_spline2d *self){
4631 return gsl_spline2d_min_size(self->spline);
4632 }
pygsl_spline2d_init(pygsl_spline2d * self,PyObject * x_o,PyObject * y_o,PyObject * z_o)4633 SWIGINTERN gsl_error_flag_drop pygsl_spline2d_init(pygsl_spline2d *self,PyObject *x_o,PyObject *y_o,PyObject *z_o){
4634 PyGSL_array_index_t x_size, y_size;
4635 PyArrayObject *x_a = NULL, *y_a = NULL, *z_a = NULL;
4636 double *x_d = NULL, *y_d = NULL, *z_d = NULL;
4637 size_t xt_size, yt_size;
4638 int flag = GSL_EFAILED, line = 504;
4639
4640
4641 xt_size = self->spline->interp_object.xsize;
4642 yt_size = self->spline->interp_object.ysize;
4643 x_size = xt_size;
4644 y_size = yt_size;
4645 /* signed x_size */
4646 if(x_size < 0){
4647 line = 513 - 1;
4648 pygsl_error("x_size <0", "src\\gslwrap\\interpolation2d.i", line, GSL_ESANITY);
4649 goto fail;
4650 }
4651 if(y_size < 0){
4652 line = 518 - 1;
4653 pygsl_error("y_size <0", "src\\gslwrap\\interpolation2d.i", line, GSL_ESANITY);
4654 goto fail;
4655 }
4656
4657 x_a = PyGSL_vector_check(x_o, x_size, PyGSL_DARRAY_CINPUT(1), NULL, NULL);
4658 if(x_a == NULL){
4659 line = 525 - 1;
4660 goto fail;
4661 }
4662 y_a = PyGSL_vector_check(y_o, y_size, PyGSL_DARRAY_CINPUT(2), NULL, NULL);
4663 if(y_a == NULL){
4664 line = 530 - 1;
4665 goto fail;
4666 }
4667 z_a = PyGSL_matrix_check(z_o, x_size, y_size, PyGSL_DARRAY_CINPUT(3), NULL, NULL, NULL);
4668 if(z_a == NULL){
4669 line = 535 - 1;
4670 goto fail;
4671 }
4672
4673 x_d = (double *) PyArray_DATA(x_a);
4674 y_d = (double *) PyArray_DATA(y_a);
4675 z_d = (double *) PyArray_DATA(z_a);
4676
4677 flag = gsl_spline2d_init(self->spline, x_d, y_d, z_d, xt_size, yt_size);
4678 if(PyGSL_ERROR_FLAG(flag) != GSL_SUCCESS){
4679 goto fail;
4680 }
4681 Py_DECREF(x_a);
4682 Py_DECREF(y_a);
4683 Py_DECREF(z_a);
4684 return GSL_SUCCESS;
4685
4686 fail:
4687 Py_XDECREF(x_a);
4688 Py_XDECREF(y_a);
4689 Py_XDECREF(z_a);
4690 PyGSL_add_traceback(module, "src\\gslwrap\\interpolation2d.i", __FUNCTION__, line);
4691 return flag;
4692 }
pygsl_spline2d_get(pygsl_spline2d * self,size_t const i,size_t const j)4693 SWIGINTERN double pygsl_spline2d_get(pygsl_spline2d *self,size_t const i,size_t const j){
4694 return gsl_spline2d_get(self->spline, self->spline->zarr, i, j);
4695 }
pygsl_spline2d_set(pygsl_spline2d * self,size_t const i,size_t const j,double z)4696 SWIGINTERN gsl_error_flag_drop pygsl_spline2d_set(pygsl_spline2d *self,size_t const i,size_t const j,double z){
4697 return gsl_spline2d_set(self->spline, self->spline->zarr, i, j, z);
4698 }
pygsl_spline2d_eval(pygsl_spline2d * self,double const x,double const y)4699 SWIGINTERN double pygsl_spline2d_eval(pygsl_spline2d *self,double const x,double const y){ return gsl_spline2d_eval(self->spline, x, y, self->x_acc, self->y_acc); }
pygsl_spline2d_eval_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4700 SWIGINTERN PyObject *pygsl_spline2d_eval_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL; obj.func.fsp = gsl_spline2d_eval; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_x(pygsl_spline2d * self,double const x,double const y)4701 SWIGINTERN double pygsl_spline2d_eval_deriv_x(pygsl_spline2d *self,double const x,double const y){ return gsl_spline2d_eval_deriv_x(self->spline, x, y, self->x_acc, self->y_acc); }
pygsl_spline2d_eval_deriv_x_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4702 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_x_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL; obj.func.fsp = gsl_spline2d_eval_deriv_x; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_y(pygsl_spline2d * self,double const x,double const y)4703 SWIGINTERN double pygsl_spline2d_eval_deriv_y(pygsl_spline2d *self,double const x,double const y){ return gsl_spline2d_eval_deriv_y(self->spline, x, y, self->x_acc, self->y_acc); }
pygsl_spline2d_eval_deriv_y_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4704 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_y_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL; obj.func.fsp = gsl_spline2d_eval_deriv_y; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_xx(pygsl_spline2d * self,double const x,double const y)4705 SWIGINTERN double pygsl_spline2d_eval_deriv_xx(pygsl_spline2d *self,double const x,double const y){ return gsl_spline2d_eval_deriv_xx(self->spline, x, y, self->x_acc, self->y_acc); }
pygsl_spline2d_eval_deriv_xx_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4706 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_xx_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL; obj.func.fsp = gsl_spline2d_eval_deriv_xx; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_xy(pygsl_spline2d * self,double const x,double const y)4707 SWIGINTERN double pygsl_spline2d_eval_deriv_xy(pygsl_spline2d *self,double const x,double const y){ return gsl_spline2d_eval_deriv_xy(self->spline, x, y, self->x_acc, self->y_acc); }
pygsl_spline2d_eval_deriv_xy_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4708 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_xy_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL; obj.func.fsp = gsl_spline2d_eval_deriv_xy; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_yy(pygsl_spline2d * self,double const x,double const y)4709 SWIGINTERN double pygsl_spline2d_eval_deriv_yy(pygsl_spline2d *self,double const x,double const y){ return gsl_spline2d_eval_deriv_yy(self->spline, x, y, self->x_acc, self->y_acc); }
pygsl_spline2d_eval_deriv_yy_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4710 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_yy_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL; obj.func.fsp = gsl_spline2d_eval_deriv_yy; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_e(pygsl_spline2d * self,double const x,double const y,double * z)4711 SWIGINTERN gsl_error_flag_drop pygsl_spline2d_eval_e(pygsl_spline2d *self,double const x,double const y,double *z){ return gsl_spline2d_eval_e (self->spline, x, y, self->x_acc, self->y_acc, z); }
pygsl_spline2d_eval_e_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4712 SWIGINTERN PyObject *pygsl_spline2d_eval_e_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL_E; obj.func.fsp_e = gsl_spline2d_eval_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_x_e(pygsl_spline2d * self,double const x,double const y,double * z)4713 SWIGINTERN gsl_error_flag_drop pygsl_spline2d_eval_deriv_x_e(pygsl_spline2d *self,double const x,double const y,double *z){ return gsl_spline2d_eval_deriv_x_e (self->spline, x, y, self->x_acc, self->y_acc, z); }
pygsl_spline2d_eval_deriv_x_e_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4714 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_x_e_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL_E; obj.func.fsp_e = gsl_spline2d_eval_deriv_x_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_y_e(pygsl_spline2d * self,double const x,double const y,double * z)4715 SWIGINTERN gsl_error_flag_drop pygsl_spline2d_eval_deriv_y_e(pygsl_spline2d *self,double const x,double const y,double *z){ return gsl_spline2d_eval_deriv_y_e (self->spline, x, y, self->x_acc, self->y_acc, z); }
pygsl_spline2d_eval_deriv_y_e_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4716 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_y_e_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL_E; obj.func.fsp_e = gsl_spline2d_eval_deriv_y_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_xx_e(pygsl_spline2d * self,double const x,double const y,double * z)4717 SWIGINTERN gsl_error_flag_drop pygsl_spline2d_eval_deriv_xx_e(pygsl_spline2d *self,double const x,double const y,double *z){ return gsl_spline2d_eval_deriv_xx_e (self->spline, x, y, self->x_acc, self->y_acc, z); }
pygsl_spline2d_eval_deriv_xx_e_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4718 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_xx_e_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL_E; obj.func.fsp_e = gsl_spline2d_eval_deriv_xx_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_xy_e(pygsl_spline2d * self,double const x,double const y,double * z)4719 SWIGINTERN gsl_error_flag_drop pygsl_spline2d_eval_deriv_xy_e(pygsl_spline2d *self,double const x,double const y,double *z){ return gsl_spline2d_eval_deriv_xy_e (self->spline, x, y, self->x_acc, self->y_acc, z); }
pygsl_spline2d_eval_deriv_xy_e_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4720 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_xy_e_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL_E; obj.func.fsp_e = gsl_spline2d_eval_deriv_xy_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
pygsl_spline2d_eval_deriv_yy_e(pygsl_spline2d * self,double const x,double const y,double * z)4721 SWIGINTERN gsl_error_flag_drop pygsl_spline2d_eval_deriv_yy_e(pygsl_spline2d *self,double const x,double const y,double *z){ return gsl_spline2d_eval_deriv_yy_e (self->spline, x, y, self->x_acc, self->y_acc, z); }
pygsl_spline2d_eval_deriv_yy_e_array(pygsl_spline2d * self,PyObject * x,PyObject * y)4722 SWIGINTERN PyObject *pygsl_spline2d_eval_deriv_yy_e_array(pygsl_spline2d *self,PyObject *x,PyObject *y){ pygsl_interp_spline_2d_t obj; obj.str.py_spline = self; obj.type = PyGSL_SPLINE2D_EVAL_E; obj.func.fsp_e = gsl_spline2d_eval_deriv_yy_e; return pygsl_interp2d_eval_array_func(obj, x, y); }
4723 #ifdef __cplusplus
4724 extern "C" {
4725 #endif
_wrap_new_interp2d(PyObject * self,PyObject * args,PyObject * kwargs)4726 SWIGINTERN int _wrap_new_interp2d(PyObject *self, PyObject *args, PyObject *kwargs) {
4727 PyObject *resultobj = 0;
4728 gsl_interp2d_type *arg1 = (gsl_interp2d_type *) 0 ;
4729 size_t arg2 ;
4730 size_t arg3 ;
4731 void *argp1 = 0 ;
4732 int res1 = 0 ;
4733 size_t val2 ;
4734 int ecode2 = 0 ;
4735 size_t val3 ;
4736 int ecode3 = 0 ;
4737 PyObject * obj1 = 0 ;
4738 PyObject * obj2 = 0 ;
4739 PyObject * obj3 = 0 ;
4740 char * kwnames[] = {
4741 (char *) "T",(char *) "x_size",(char *) "y_size", NULL
4742 };
4743 pygsl_interp2d *result = 0 ;
4744
4745 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_interp2d",kwnames,&obj1,&obj2,&obj3)) SWIG_fail;
4746 res1 = SWIG_ConvertPtr(obj1, &argp1,SWIGTYPE_p_gsl_interp2d_type, 0 | 0 );
4747 if (!SWIG_IsOK(res1)) {
4748 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_interp2d" "', argument " "1"" of type '" "gsl_interp2d_type const *""'");
4749 }
4750 arg1 = (gsl_interp2d_type *)(argp1);
4751 ecode2 = SWIG_AsVal_size_t(obj2, &val2);
4752 if (!SWIG_IsOK(ecode2)) {
4753 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_interp2d" "', argument " "2"" of type '" "size_t""'");
4754 }
4755 arg2 = (size_t)(val2);
4756 ecode3 = SWIG_AsVal_size_t(obj3, &val3);
4757 if (!SWIG_IsOK(ecode3)) {
4758 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_interp2d" "', argument " "3"" of type '" "size_t""'");
4759 }
4760 arg3 = (size_t)(val3);
4761 result = (pygsl_interp2d *)new_pygsl_interp2d((gsl_interp2d_type const *)arg1,arg2,arg3);
4762 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pygsl_interp2d, SWIG_BUILTIN_INIT | 0 );
4763 return resultobj == Py_None ? -1 : 0;
4764 fail:
4765 return -1;
4766 }
4767
4768
_wrap_delete_interp2d(PyObject * self,PyObject * args)4769 SWIGINTERN PyObject *_wrap_delete_interp2d(PyObject *self, PyObject *args) {
4770 PyObject *resultobj = 0;
4771 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
4772 void *argp1 = 0 ;
4773 int res1 = 0 ;
4774 PyObject *swig_obj[1] ;
4775
4776 if (!SWIG_Python_UnpackTuple(args,"delete_interp2d",0,0,0)) SWIG_fail;
4777 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, SWIG_POINTER_DISOWN | 0 );
4778 if (!SWIG_IsOK(res1)) {
4779 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_interp2d" "', argument " "1"" of type '" "pygsl_interp2d *""'");
4780 }
4781 arg1 = (pygsl_interp2d *)(argp1);
4782 delete_pygsl_interp2d(arg1);
4783 resultobj = SWIG_Py_Void();
4784 return resultobj;
4785 fail:
4786 return NULL;
4787 }
4788
4789
_wrap_interp2d_reset(PyObject * self,PyObject * args)4790 SWIGINTERN PyObject *_wrap_interp2d_reset(PyObject *self, PyObject *args) {
4791 PyObject *resultobj = 0;
4792 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
4793 void *argp1 = 0 ;
4794 int res1 = 0 ;
4795 PyObject *swig_obj[1] ;
4796 gsl_error_flag_drop result;
4797
4798 if (!SWIG_Python_UnpackTuple(args,"interp2d_reset",0,0,0)) SWIG_fail;
4799 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
4800 if (!SWIG_IsOK(res1)) {
4801 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_reset" "', argument " "1"" of type '" "pygsl_interp2d *""'");
4802 }
4803 arg1 = (pygsl_interp2d *)(argp1);
4804 result = pygsl_interp2d_reset(arg1);
4805 {
4806 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
4807 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
4808 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
4809 __FUNCTION__, 79);
4810 goto fail;
4811 }
4812 Py_INCREF(Py_None);
4813 resultobj = Py_None;
4814 }
4815 return resultobj;
4816 fail:
4817 return NULL;
4818 }
4819
4820
_wrap_interp2d_name(PyObject * self,PyObject * args)4821 SWIGINTERN PyObject *_wrap_interp2d_name(PyObject *self, PyObject *args) {
4822 PyObject *resultobj = 0;
4823 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
4824 void *argp1 = 0 ;
4825 int res1 = 0 ;
4826 PyObject *swig_obj[1] ;
4827 char *result = 0 ;
4828
4829 if (!SWIG_Python_UnpackTuple(args,"interp2d_name",0,0,0)) SWIG_fail;
4830 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
4831 if (!SWIG_IsOK(res1)) {
4832 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_name" "', argument " "1"" of type '" "pygsl_interp2d *""'");
4833 }
4834 arg1 = (pygsl_interp2d *)(argp1);
4835 result = (char *)pygsl_interp2d_name(arg1);
4836 resultobj = SWIG_FromCharPtr((const char *)result);
4837 return resultobj;
4838 fail:
4839 return NULL;
4840 }
4841
4842
_wrap_interp2d_min_size(PyObject * self,PyObject * args)4843 SWIGINTERN PyObject *_wrap_interp2d_min_size(PyObject *self, PyObject *args) {
4844 PyObject *resultobj = 0;
4845 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
4846 void *argp1 = 0 ;
4847 int res1 = 0 ;
4848 PyObject *swig_obj[1] ;
4849 size_t result;
4850
4851 if (!SWIG_Python_UnpackTuple(args,"interp2d_min_size",0,0,0)) SWIG_fail;
4852 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
4853 if (!SWIG_IsOK(res1)) {
4854 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_min_size" "', argument " "1"" of type '" "pygsl_interp2d *""'");
4855 }
4856 arg1 = (pygsl_interp2d *)(argp1);
4857 result = pygsl_interp2d_min_size(arg1);
4858 resultobj = SWIG_From_size_t((size_t)(result));
4859 return resultobj;
4860 fail:
4861 return NULL;
4862 }
4863
4864
_wrap_interp2d_init(PyObject * self,PyObject * args,PyObject * kwargs)4865 SWIGINTERN PyObject *_wrap_interp2d_init(PyObject *self, PyObject *args, PyObject *kwargs) {
4866 PyObject *resultobj = 0;
4867 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
4868 PyObject *arg2 = (PyObject *) 0 ;
4869 PyObject *arg3 = (PyObject *) 0 ;
4870 PyObject *arg4 = (PyObject *) 0 ;
4871 void *argp1 = 0 ;
4872 int res1 = 0 ;
4873 PyObject * obj1 = 0 ;
4874 PyObject * obj2 = 0 ;
4875 PyObject * obj3 = 0 ;
4876 char * kwnames[] = {
4877 (char *) "x_o",(char *) "y_o",(char *) "z_o", NULL
4878 };
4879 gsl_error_flag_drop result;
4880
4881 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:interp2d_init",kwnames,&obj1,&obj2,&obj3)) SWIG_fail;
4882 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
4883 if (!SWIG_IsOK(res1)) {
4884 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_init" "', argument " "1"" of type '" "pygsl_interp2d *""'");
4885 }
4886 arg1 = (pygsl_interp2d *)(argp1);
4887 arg2 = obj1;
4888 arg3 = obj2;
4889 arg4 = obj3;
4890 result = pygsl_interp2d_init(arg1,arg2,arg3,arg4);
4891 {
4892 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
4893 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
4894 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
4895 __FUNCTION__, 79);
4896 goto fail;
4897 }
4898 Py_INCREF(Py_None);
4899 resultobj = Py_None;
4900 }
4901 return resultobj;
4902 fail:
4903 return NULL;
4904 }
4905
4906
_wrap_interp2d_idx(PyObject * self,PyObject * args,PyObject * kwargs)4907 SWIGINTERN PyObject *_wrap_interp2d_idx(PyObject *self, PyObject *args, PyObject *kwargs) {
4908 PyObject *resultobj = 0;
4909 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
4910 size_t arg2 ;
4911 size_t arg3 ;
4912 void *argp1 = 0 ;
4913 int res1 = 0 ;
4914 size_t val2 ;
4915 int ecode2 = 0 ;
4916 size_t val3 ;
4917 int ecode3 = 0 ;
4918 PyObject * obj1 = 0 ;
4919 PyObject * obj2 = 0 ;
4920 char * kwnames[] = {
4921 (char *) "i",(char *) "j", NULL
4922 };
4923 size_t result;
4924
4925 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_idx",kwnames,&obj1,&obj2)) SWIG_fail;
4926 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
4927 if (!SWIG_IsOK(res1)) {
4928 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_idx" "', argument " "1"" of type '" "pygsl_interp2d *""'");
4929 }
4930 arg1 = (pygsl_interp2d *)(argp1);
4931 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4932 if (!SWIG_IsOK(ecode2)) {
4933 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_idx" "', argument " "2"" of type '" "size_t""'");
4934 }
4935 arg2 = (size_t)(val2);
4936 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
4937 if (!SWIG_IsOK(ecode3)) {
4938 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_idx" "', argument " "3"" of type '" "size_t""'");
4939 }
4940 arg3 = (size_t)(val3);
4941 result = pygsl_interp2d_idx(arg1,arg2,arg3);
4942 resultobj = SWIG_From_size_t((size_t)(result));
4943 return resultobj;
4944 fail:
4945 return NULL;
4946 }
4947
4948
_wrap_interp2d_get(PyObject * self,PyObject * args,PyObject * kwargs)4949 SWIGINTERN PyObject *_wrap_interp2d_get(PyObject *self, PyObject *args, PyObject *kwargs) {
4950 PyObject *resultobj = 0;
4951 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
4952 size_t arg2 ;
4953 size_t arg3 ;
4954 void *argp1 = 0 ;
4955 int res1 = 0 ;
4956 size_t val2 ;
4957 int ecode2 = 0 ;
4958 size_t val3 ;
4959 int ecode3 = 0 ;
4960 PyObject * obj1 = 0 ;
4961 PyObject * obj2 = 0 ;
4962 char * kwnames[] = {
4963 (char *) "i",(char *) "j", NULL
4964 };
4965 double result;
4966
4967 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_get",kwnames,&obj1,&obj2)) SWIG_fail;
4968 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
4969 if (!SWIG_IsOK(res1)) {
4970 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_get" "', argument " "1"" of type '" "pygsl_interp2d *""'");
4971 }
4972 arg1 = (pygsl_interp2d *)(argp1);
4973 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4974 if (!SWIG_IsOK(ecode2)) {
4975 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_get" "', argument " "2"" of type '" "size_t""'");
4976 }
4977 arg2 = (size_t)(val2);
4978 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
4979 if (!SWIG_IsOK(ecode3)) {
4980 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_get" "', argument " "3"" of type '" "size_t""'");
4981 }
4982 arg3 = (size_t)(val3);
4983 result = (double)pygsl_interp2d_get(arg1,arg2,arg3);
4984 resultobj = SWIG_From_double((double)(result));
4985 return resultobj;
4986 fail:
4987 return NULL;
4988 }
4989
4990
_wrap_interp2d_eval(PyObject * self,PyObject * args,PyObject * kwargs)4991 SWIGINTERN PyObject *_wrap_interp2d_eval(PyObject *self, PyObject *args, PyObject *kwargs) {
4992 PyObject *resultobj = 0;
4993 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
4994 double arg2 ;
4995 double arg3 ;
4996 void *argp1 = 0 ;
4997 int res1 = 0 ;
4998 double val2 ;
4999 int ecode2 = 0 ;
5000 double val3 ;
5001 int ecode3 = 0 ;
5002 PyObject * obj1 = 0 ;
5003 PyObject * obj2 = 0 ;
5004 char * kwnames[] = {
5005 (char *) "x",(char *) "y", NULL
5006 };
5007 double result;
5008
5009 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval",kwnames,&obj1,&obj2)) SWIG_fail;
5010 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5011 if (!SWIG_IsOK(res1)) {
5012 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5013 }
5014 arg1 = (pygsl_interp2d *)(argp1);
5015 ecode2 = SWIG_AsVal_double(obj1, &val2);
5016 if (!SWIG_IsOK(ecode2)) {
5017 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval" "', argument " "2"" of type '" "double""'");
5018 }
5019 arg2 = (double)(val2);
5020 ecode3 = SWIG_AsVal_double(obj2, &val3);
5021 if (!SWIG_IsOK(ecode3)) {
5022 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval" "', argument " "3"" of type '" "double""'");
5023 }
5024 arg3 = (double)(val3);
5025 result = (double)pygsl_interp2d_eval(arg1,arg2,arg3);
5026 resultobj = SWIG_From_double((double)(result));
5027 return resultobj;
5028 fail:
5029 return NULL;
5030 }
5031
5032
_wrap_interp2d_eval_array(PyObject * self,PyObject * args,PyObject * kwargs)5033 SWIGINTERN PyObject *_wrap_interp2d_eval_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5034 PyObject *resultobj = 0;
5035 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5036 PyObject *arg2 = (PyObject *) 0 ;
5037 PyObject *arg3 = (PyObject *) 0 ;
5038 void *argp1 = 0 ;
5039 int res1 = 0 ;
5040 PyObject * obj1 = 0 ;
5041 PyObject * obj2 = 0 ;
5042 char * kwnames[] = {
5043 (char *) "x",(char *) "y", NULL
5044 };
5045 PyObject *result = 0 ;
5046
5047 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_array",kwnames,&obj1,&obj2)) SWIG_fail;
5048 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5049 if (!SWIG_IsOK(res1)) {
5050 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5051 }
5052 arg1 = (pygsl_interp2d *)(argp1);
5053 arg2 = obj1;
5054 arg3 = obj2;
5055 result = (PyObject *)pygsl_interp2d_eval_array(arg1,arg2,arg3);
5056 resultobj = result;
5057 return resultobj;
5058 fail:
5059 return NULL;
5060 }
5061
5062
_wrap_interp2d_eval_extrap(PyObject * self,PyObject * args,PyObject * kwargs)5063 SWIGINTERN PyObject *_wrap_interp2d_eval_extrap(PyObject *self, PyObject *args, PyObject *kwargs) {
5064 PyObject *resultobj = 0;
5065 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5066 double arg2 ;
5067 double arg3 ;
5068 void *argp1 = 0 ;
5069 int res1 = 0 ;
5070 double val2 ;
5071 int ecode2 = 0 ;
5072 double val3 ;
5073 int ecode3 = 0 ;
5074 PyObject * obj1 = 0 ;
5075 PyObject * obj2 = 0 ;
5076 char * kwnames[] = {
5077 (char *) "x",(char *) "y", NULL
5078 };
5079 double result;
5080
5081 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_extrap",kwnames,&obj1,&obj2)) SWIG_fail;
5082 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5083 if (!SWIG_IsOK(res1)) {
5084 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_extrap" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5085 }
5086 arg1 = (pygsl_interp2d *)(argp1);
5087 ecode2 = SWIG_AsVal_double(obj1, &val2);
5088 if (!SWIG_IsOK(ecode2)) {
5089 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_extrap" "', argument " "2"" of type '" "double""'");
5090 }
5091 arg2 = (double)(val2);
5092 ecode3 = SWIG_AsVal_double(obj2, &val3);
5093 if (!SWIG_IsOK(ecode3)) {
5094 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_extrap" "', argument " "3"" of type '" "double""'");
5095 }
5096 arg3 = (double)(val3);
5097 result = (double)pygsl_interp2d_eval_extrap(arg1,arg2,arg3);
5098 resultobj = SWIG_From_double((double)(result));
5099 return resultobj;
5100 fail:
5101 return NULL;
5102 }
5103
5104
_wrap_interp2d_eval_extrap_array(PyObject * self,PyObject * args,PyObject * kwargs)5105 SWIGINTERN PyObject *_wrap_interp2d_eval_extrap_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5106 PyObject *resultobj = 0;
5107 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5108 PyObject *arg2 = (PyObject *) 0 ;
5109 PyObject *arg3 = (PyObject *) 0 ;
5110 void *argp1 = 0 ;
5111 int res1 = 0 ;
5112 PyObject * obj1 = 0 ;
5113 PyObject * obj2 = 0 ;
5114 char * kwnames[] = {
5115 (char *) "x",(char *) "y", NULL
5116 };
5117 PyObject *result = 0 ;
5118
5119 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_extrap_array",kwnames,&obj1,&obj2)) SWIG_fail;
5120 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5121 if (!SWIG_IsOK(res1)) {
5122 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_extrap_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5123 }
5124 arg1 = (pygsl_interp2d *)(argp1);
5125 arg2 = obj1;
5126 arg3 = obj2;
5127 result = (PyObject *)pygsl_interp2d_eval_extrap_array(arg1,arg2,arg3);
5128 resultobj = result;
5129 return resultobj;
5130 fail:
5131 return NULL;
5132 }
5133
5134
_wrap_interp2d_eval_deriv_x(PyObject * self,PyObject * args,PyObject * kwargs)5135 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_x(PyObject *self, PyObject *args, PyObject *kwargs) {
5136 PyObject *resultobj = 0;
5137 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5138 double arg2 ;
5139 double arg3 ;
5140 void *argp1 = 0 ;
5141 int res1 = 0 ;
5142 double val2 ;
5143 int ecode2 = 0 ;
5144 double val3 ;
5145 int ecode3 = 0 ;
5146 PyObject * obj1 = 0 ;
5147 PyObject * obj2 = 0 ;
5148 char * kwnames[] = {
5149 (char *) "x",(char *) "y", NULL
5150 };
5151 double result;
5152
5153 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_x",kwnames,&obj1,&obj2)) SWIG_fail;
5154 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5155 if (!SWIG_IsOK(res1)) {
5156 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_x" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5157 }
5158 arg1 = (pygsl_interp2d *)(argp1);
5159 ecode2 = SWIG_AsVal_double(obj1, &val2);
5160 if (!SWIG_IsOK(ecode2)) {
5161 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_x" "', argument " "2"" of type '" "double""'");
5162 }
5163 arg2 = (double)(val2);
5164 ecode3 = SWIG_AsVal_double(obj2, &val3);
5165 if (!SWIG_IsOK(ecode3)) {
5166 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_x" "', argument " "3"" of type '" "double""'");
5167 }
5168 arg3 = (double)(val3);
5169 result = (double)pygsl_interp2d_eval_deriv_x(arg1,arg2,arg3);
5170 resultobj = SWIG_From_double((double)(result));
5171 return resultobj;
5172 fail:
5173 return NULL;
5174 }
5175
5176
_wrap_interp2d_eval_deriv_x_array(PyObject * self,PyObject * args,PyObject * kwargs)5177 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_x_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5178 PyObject *resultobj = 0;
5179 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5180 PyObject *arg2 = (PyObject *) 0 ;
5181 PyObject *arg3 = (PyObject *) 0 ;
5182 void *argp1 = 0 ;
5183 int res1 = 0 ;
5184 PyObject * obj1 = 0 ;
5185 PyObject * obj2 = 0 ;
5186 char * kwnames[] = {
5187 (char *) "x",(char *) "y", NULL
5188 };
5189 PyObject *result = 0 ;
5190
5191 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_x_array",kwnames,&obj1,&obj2)) SWIG_fail;
5192 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5193 if (!SWIG_IsOK(res1)) {
5194 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_x_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5195 }
5196 arg1 = (pygsl_interp2d *)(argp1);
5197 arg2 = obj1;
5198 arg3 = obj2;
5199 result = (PyObject *)pygsl_interp2d_eval_deriv_x_array(arg1,arg2,arg3);
5200 resultobj = result;
5201 return resultobj;
5202 fail:
5203 return NULL;
5204 }
5205
5206
_wrap_interp2d_eval_deriv_y(PyObject * self,PyObject * args,PyObject * kwargs)5207 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_y(PyObject *self, PyObject *args, PyObject *kwargs) {
5208 PyObject *resultobj = 0;
5209 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5210 double arg2 ;
5211 double arg3 ;
5212 void *argp1 = 0 ;
5213 int res1 = 0 ;
5214 double val2 ;
5215 int ecode2 = 0 ;
5216 double val3 ;
5217 int ecode3 = 0 ;
5218 PyObject * obj1 = 0 ;
5219 PyObject * obj2 = 0 ;
5220 char * kwnames[] = {
5221 (char *) "x",(char *) "y", NULL
5222 };
5223 double result;
5224
5225 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_y",kwnames,&obj1,&obj2)) SWIG_fail;
5226 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5227 if (!SWIG_IsOK(res1)) {
5228 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_y" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5229 }
5230 arg1 = (pygsl_interp2d *)(argp1);
5231 ecode2 = SWIG_AsVal_double(obj1, &val2);
5232 if (!SWIG_IsOK(ecode2)) {
5233 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_y" "', argument " "2"" of type '" "double""'");
5234 }
5235 arg2 = (double)(val2);
5236 ecode3 = SWIG_AsVal_double(obj2, &val3);
5237 if (!SWIG_IsOK(ecode3)) {
5238 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_y" "', argument " "3"" of type '" "double""'");
5239 }
5240 arg3 = (double)(val3);
5241 result = (double)pygsl_interp2d_eval_deriv_y(arg1,arg2,arg3);
5242 resultobj = SWIG_From_double((double)(result));
5243 return resultobj;
5244 fail:
5245 return NULL;
5246 }
5247
5248
_wrap_interp2d_eval_deriv_y_array(PyObject * self,PyObject * args,PyObject * kwargs)5249 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_y_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5250 PyObject *resultobj = 0;
5251 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5252 PyObject *arg2 = (PyObject *) 0 ;
5253 PyObject *arg3 = (PyObject *) 0 ;
5254 void *argp1 = 0 ;
5255 int res1 = 0 ;
5256 PyObject * obj1 = 0 ;
5257 PyObject * obj2 = 0 ;
5258 char * kwnames[] = {
5259 (char *) "x",(char *) "y", NULL
5260 };
5261 PyObject *result = 0 ;
5262
5263 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_y_array",kwnames,&obj1,&obj2)) SWIG_fail;
5264 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5265 if (!SWIG_IsOK(res1)) {
5266 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_y_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5267 }
5268 arg1 = (pygsl_interp2d *)(argp1);
5269 arg2 = obj1;
5270 arg3 = obj2;
5271 result = (PyObject *)pygsl_interp2d_eval_deriv_y_array(arg1,arg2,arg3);
5272 resultobj = result;
5273 return resultobj;
5274 fail:
5275 return NULL;
5276 }
5277
5278
_wrap_interp2d_eval_deriv_xx(PyObject * self,PyObject * args,PyObject * kwargs)5279 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_xx(PyObject *self, PyObject *args, PyObject *kwargs) {
5280 PyObject *resultobj = 0;
5281 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5282 double arg2 ;
5283 double arg3 ;
5284 void *argp1 = 0 ;
5285 int res1 = 0 ;
5286 double val2 ;
5287 int ecode2 = 0 ;
5288 double val3 ;
5289 int ecode3 = 0 ;
5290 PyObject * obj1 = 0 ;
5291 PyObject * obj2 = 0 ;
5292 char * kwnames[] = {
5293 (char *) "x",(char *) "y", NULL
5294 };
5295 double result;
5296
5297 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_xx",kwnames,&obj1,&obj2)) SWIG_fail;
5298 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5299 if (!SWIG_IsOK(res1)) {
5300 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_xx" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5301 }
5302 arg1 = (pygsl_interp2d *)(argp1);
5303 ecode2 = SWIG_AsVal_double(obj1, &val2);
5304 if (!SWIG_IsOK(ecode2)) {
5305 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_xx" "', argument " "2"" of type '" "double""'");
5306 }
5307 arg2 = (double)(val2);
5308 ecode3 = SWIG_AsVal_double(obj2, &val3);
5309 if (!SWIG_IsOK(ecode3)) {
5310 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_xx" "', argument " "3"" of type '" "double""'");
5311 }
5312 arg3 = (double)(val3);
5313 result = (double)pygsl_interp2d_eval_deriv_xx(arg1,arg2,arg3);
5314 resultobj = SWIG_From_double((double)(result));
5315 return resultobj;
5316 fail:
5317 return NULL;
5318 }
5319
5320
_wrap_interp2d_eval_deriv_xx_array(PyObject * self,PyObject * args,PyObject * kwargs)5321 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_xx_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5322 PyObject *resultobj = 0;
5323 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5324 PyObject *arg2 = (PyObject *) 0 ;
5325 PyObject *arg3 = (PyObject *) 0 ;
5326 void *argp1 = 0 ;
5327 int res1 = 0 ;
5328 PyObject * obj1 = 0 ;
5329 PyObject * obj2 = 0 ;
5330 char * kwnames[] = {
5331 (char *) "x",(char *) "y", NULL
5332 };
5333 PyObject *result = 0 ;
5334
5335 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_xx_array",kwnames,&obj1,&obj2)) SWIG_fail;
5336 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5337 if (!SWIG_IsOK(res1)) {
5338 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_xx_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5339 }
5340 arg1 = (pygsl_interp2d *)(argp1);
5341 arg2 = obj1;
5342 arg3 = obj2;
5343 result = (PyObject *)pygsl_interp2d_eval_deriv_xx_array(arg1,arg2,arg3);
5344 resultobj = result;
5345 return resultobj;
5346 fail:
5347 return NULL;
5348 }
5349
5350
_wrap_interp2d_eval_deriv_xy(PyObject * self,PyObject * args,PyObject * kwargs)5351 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_xy(PyObject *self, PyObject *args, PyObject *kwargs) {
5352 PyObject *resultobj = 0;
5353 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5354 double arg2 ;
5355 double arg3 ;
5356 void *argp1 = 0 ;
5357 int res1 = 0 ;
5358 double val2 ;
5359 int ecode2 = 0 ;
5360 double val3 ;
5361 int ecode3 = 0 ;
5362 PyObject * obj1 = 0 ;
5363 PyObject * obj2 = 0 ;
5364 char * kwnames[] = {
5365 (char *) "x",(char *) "y", NULL
5366 };
5367 double result;
5368
5369 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_xy",kwnames,&obj1,&obj2)) SWIG_fail;
5370 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5371 if (!SWIG_IsOK(res1)) {
5372 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_xy" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5373 }
5374 arg1 = (pygsl_interp2d *)(argp1);
5375 ecode2 = SWIG_AsVal_double(obj1, &val2);
5376 if (!SWIG_IsOK(ecode2)) {
5377 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_xy" "', argument " "2"" of type '" "double""'");
5378 }
5379 arg2 = (double)(val2);
5380 ecode3 = SWIG_AsVal_double(obj2, &val3);
5381 if (!SWIG_IsOK(ecode3)) {
5382 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_xy" "', argument " "3"" of type '" "double""'");
5383 }
5384 arg3 = (double)(val3);
5385 result = (double)pygsl_interp2d_eval_deriv_xy(arg1,arg2,arg3);
5386 resultobj = SWIG_From_double((double)(result));
5387 return resultobj;
5388 fail:
5389 return NULL;
5390 }
5391
5392
_wrap_interp2d_eval_deriv_xy_array(PyObject * self,PyObject * args,PyObject * kwargs)5393 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_xy_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5394 PyObject *resultobj = 0;
5395 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5396 PyObject *arg2 = (PyObject *) 0 ;
5397 PyObject *arg3 = (PyObject *) 0 ;
5398 void *argp1 = 0 ;
5399 int res1 = 0 ;
5400 PyObject * obj1 = 0 ;
5401 PyObject * obj2 = 0 ;
5402 char * kwnames[] = {
5403 (char *) "x",(char *) "y", NULL
5404 };
5405 PyObject *result = 0 ;
5406
5407 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_xy_array",kwnames,&obj1,&obj2)) SWIG_fail;
5408 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5409 if (!SWIG_IsOK(res1)) {
5410 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_xy_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5411 }
5412 arg1 = (pygsl_interp2d *)(argp1);
5413 arg2 = obj1;
5414 arg3 = obj2;
5415 result = (PyObject *)pygsl_interp2d_eval_deriv_xy_array(arg1,arg2,arg3);
5416 resultobj = result;
5417 return resultobj;
5418 fail:
5419 return NULL;
5420 }
5421
5422
_wrap_interp2d_eval_deriv_yy(PyObject * self,PyObject * args,PyObject * kwargs)5423 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_yy(PyObject *self, PyObject *args, PyObject *kwargs) {
5424 PyObject *resultobj = 0;
5425 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5426 double arg2 ;
5427 double arg3 ;
5428 void *argp1 = 0 ;
5429 int res1 = 0 ;
5430 double val2 ;
5431 int ecode2 = 0 ;
5432 double val3 ;
5433 int ecode3 = 0 ;
5434 PyObject * obj1 = 0 ;
5435 PyObject * obj2 = 0 ;
5436 char * kwnames[] = {
5437 (char *) "x",(char *) "y", NULL
5438 };
5439 double result;
5440
5441 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_yy",kwnames,&obj1,&obj2)) SWIG_fail;
5442 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5443 if (!SWIG_IsOK(res1)) {
5444 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_yy" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5445 }
5446 arg1 = (pygsl_interp2d *)(argp1);
5447 ecode2 = SWIG_AsVal_double(obj1, &val2);
5448 if (!SWIG_IsOK(ecode2)) {
5449 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_yy" "', argument " "2"" of type '" "double""'");
5450 }
5451 arg2 = (double)(val2);
5452 ecode3 = SWIG_AsVal_double(obj2, &val3);
5453 if (!SWIG_IsOK(ecode3)) {
5454 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_yy" "', argument " "3"" of type '" "double""'");
5455 }
5456 arg3 = (double)(val3);
5457 result = (double)pygsl_interp2d_eval_deriv_yy(arg1,arg2,arg3);
5458 resultobj = SWIG_From_double((double)(result));
5459 return resultobj;
5460 fail:
5461 return NULL;
5462 }
5463
5464
_wrap_interp2d_eval_deriv_yy_array(PyObject * self,PyObject * args,PyObject * kwargs)5465 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_yy_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5466 PyObject *resultobj = 0;
5467 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5468 PyObject *arg2 = (PyObject *) 0 ;
5469 PyObject *arg3 = (PyObject *) 0 ;
5470 void *argp1 = 0 ;
5471 int res1 = 0 ;
5472 PyObject * obj1 = 0 ;
5473 PyObject * obj2 = 0 ;
5474 char * kwnames[] = {
5475 (char *) "x",(char *) "y", NULL
5476 };
5477 PyObject *result = 0 ;
5478
5479 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_yy_array",kwnames,&obj1,&obj2)) SWIG_fail;
5480 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5481 if (!SWIG_IsOK(res1)) {
5482 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_yy_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5483 }
5484 arg1 = (pygsl_interp2d *)(argp1);
5485 arg2 = obj1;
5486 arg3 = obj2;
5487 result = (PyObject *)pygsl_interp2d_eval_deriv_yy_array(arg1,arg2,arg3);
5488 resultobj = result;
5489 return resultobj;
5490 fail:
5491 return NULL;
5492 }
5493
5494
_wrap_interp2d_eval_e(PyObject * self,PyObject * args,PyObject * kwargs)5495 SWIGINTERN PyObject *_wrap_interp2d_eval_e(PyObject *self, PyObject *args, PyObject *kwargs) {
5496 PyObject *resultobj = 0;
5497 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5498 double arg2 ;
5499 double arg3 ;
5500 double *arg4 = (double *) 0 ;
5501 void *argp1 = 0 ;
5502 int res1 = 0 ;
5503 double val2 ;
5504 int ecode2 = 0 ;
5505 double val3 ;
5506 int ecode3 = 0 ;
5507 double temp4 ;
5508 int res4 = SWIG_TMPOBJ ;
5509 PyObject * obj1 = 0 ;
5510 PyObject * obj2 = 0 ;
5511 char * kwnames[] = {
5512 (char *) "x",(char *) "y", NULL
5513 };
5514 gsl_error_flag_drop result;
5515
5516 arg4 = &temp4;
5517 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_e",kwnames,&obj1,&obj2)) SWIG_fail;
5518 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5519 if (!SWIG_IsOK(res1)) {
5520 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_e" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5521 }
5522 arg1 = (pygsl_interp2d *)(argp1);
5523 ecode2 = SWIG_AsVal_double(obj1, &val2);
5524 if (!SWIG_IsOK(ecode2)) {
5525 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_e" "', argument " "2"" of type '" "double""'");
5526 }
5527 arg2 = (double)(val2);
5528 ecode3 = SWIG_AsVal_double(obj2, &val3);
5529 if (!SWIG_IsOK(ecode3)) {
5530 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_e" "', argument " "3"" of type '" "double""'");
5531 }
5532 arg3 = (double)(val3);
5533 result = pygsl_interp2d_eval_e(arg1,arg2,arg3,arg4);
5534 {
5535 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
5536 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
5537 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
5538 __FUNCTION__, 79);
5539 goto fail;
5540 }
5541 Py_INCREF(Py_None);
5542 resultobj = Py_None;
5543 }
5544 if (SWIG_IsTmpObj(res4)) {
5545 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
5546 } else {
5547 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
5548 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
5549 }
5550 return resultobj;
5551 fail:
5552 return NULL;
5553 }
5554
5555
_wrap_interp2d_eval_e_array(PyObject * self,PyObject * args,PyObject * kwargs)5556 SWIGINTERN PyObject *_wrap_interp2d_eval_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5557 PyObject *resultobj = 0;
5558 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5559 PyObject *arg2 = (PyObject *) 0 ;
5560 PyObject *arg3 = (PyObject *) 0 ;
5561 void *argp1 = 0 ;
5562 int res1 = 0 ;
5563 PyObject * obj1 = 0 ;
5564 PyObject * obj2 = 0 ;
5565 char * kwnames[] = {
5566 (char *) "x",(char *) "y", NULL
5567 };
5568 PyObject *result = 0 ;
5569
5570 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
5571 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5572 if (!SWIG_IsOK(res1)) {
5573 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_e_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5574 }
5575 arg1 = (pygsl_interp2d *)(argp1);
5576 arg2 = obj1;
5577 arg3 = obj2;
5578 result = (PyObject *)pygsl_interp2d_eval_e_array(arg1,arg2,arg3);
5579 resultobj = result;
5580 return resultobj;
5581 fail:
5582 return NULL;
5583 }
5584
5585
_wrap_interp2d_eval_e_extrap(PyObject * self,PyObject * args,PyObject * kwargs)5586 SWIGINTERN PyObject *_wrap_interp2d_eval_e_extrap(PyObject *self, PyObject *args, PyObject *kwargs) {
5587 PyObject *resultobj = 0;
5588 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5589 double arg2 ;
5590 double arg3 ;
5591 double *arg4 = (double *) 0 ;
5592 void *argp1 = 0 ;
5593 int res1 = 0 ;
5594 double val2 ;
5595 int ecode2 = 0 ;
5596 double val3 ;
5597 int ecode3 = 0 ;
5598 double temp4 ;
5599 int res4 = SWIG_TMPOBJ ;
5600 PyObject * obj1 = 0 ;
5601 PyObject * obj2 = 0 ;
5602 char * kwnames[] = {
5603 (char *) "x",(char *) "y", NULL
5604 };
5605 gsl_error_flag_drop result;
5606
5607 arg4 = &temp4;
5608 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_e_extrap",kwnames,&obj1,&obj2)) SWIG_fail;
5609 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5610 if (!SWIG_IsOK(res1)) {
5611 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_e_extrap" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5612 }
5613 arg1 = (pygsl_interp2d *)(argp1);
5614 ecode2 = SWIG_AsVal_double(obj1, &val2);
5615 if (!SWIG_IsOK(ecode2)) {
5616 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_e_extrap" "', argument " "2"" of type '" "double""'");
5617 }
5618 arg2 = (double)(val2);
5619 ecode3 = SWIG_AsVal_double(obj2, &val3);
5620 if (!SWIG_IsOK(ecode3)) {
5621 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_e_extrap" "', argument " "3"" of type '" "double""'");
5622 }
5623 arg3 = (double)(val3);
5624 result = pygsl_interp2d_eval_e_extrap(arg1,arg2,arg3,arg4);
5625 {
5626 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
5627 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
5628 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
5629 __FUNCTION__, 79);
5630 goto fail;
5631 }
5632 Py_INCREF(Py_None);
5633 resultobj = Py_None;
5634 }
5635 if (SWIG_IsTmpObj(res4)) {
5636 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
5637 } else {
5638 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
5639 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
5640 }
5641 return resultobj;
5642 fail:
5643 return NULL;
5644 }
5645
5646
_wrap_interp2d_eval_e_extrap_array(PyObject * self,PyObject * args,PyObject * kwargs)5647 SWIGINTERN PyObject *_wrap_interp2d_eval_e_extrap_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5648 PyObject *resultobj = 0;
5649 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5650 PyObject *arg2 = (PyObject *) 0 ;
5651 PyObject *arg3 = (PyObject *) 0 ;
5652 void *argp1 = 0 ;
5653 int res1 = 0 ;
5654 PyObject * obj1 = 0 ;
5655 PyObject * obj2 = 0 ;
5656 char * kwnames[] = {
5657 (char *) "x",(char *) "y", NULL
5658 };
5659 PyObject *result = 0 ;
5660
5661 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_e_extrap_array",kwnames,&obj1,&obj2)) SWIG_fail;
5662 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5663 if (!SWIG_IsOK(res1)) {
5664 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_e_extrap_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5665 }
5666 arg1 = (pygsl_interp2d *)(argp1);
5667 arg2 = obj1;
5668 arg3 = obj2;
5669 result = (PyObject *)pygsl_interp2d_eval_e_extrap_array(arg1,arg2,arg3);
5670 resultobj = result;
5671 return resultobj;
5672 fail:
5673 return NULL;
5674 }
5675
5676
_wrap_interp2d_eval_deriv_x_e(PyObject * self,PyObject * args,PyObject * kwargs)5677 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_x_e(PyObject *self, PyObject *args, PyObject *kwargs) {
5678 PyObject *resultobj = 0;
5679 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5680 double arg2 ;
5681 double arg3 ;
5682 double *arg4 = (double *) 0 ;
5683 void *argp1 = 0 ;
5684 int res1 = 0 ;
5685 double val2 ;
5686 int ecode2 = 0 ;
5687 double val3 ;
5688 int ecode3 = 0 ;
5689 double temp4 ;
5690 int res4 = SWIG_TMPOBJ ;
5691 PyObject * obj1 = 0 ;
5692 PyObject * obj2 = 0 ;
5693 char * kwnames[] = {
5694 (char *) "x",(char *) "y", NULL
5695 };
5696 gsl_error_flag_drop result;
5697
5698 arg4 = &temp4;
5699 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_x_e",kwnames,&obj1,&obj2)) SWIG_fail;
5700 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5701 if (!SWIG_IsOK(res1)) {
5702 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_x_e" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5703 }
5704 arg1 = (pygsl_interp2d *)(argp1);
5705 ecode2 = SWIG_AsVal_double(obj1, &val2);
5706 if (!SWIG_IsOK(ecode2)) {
5707 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_x_e" "', argument " "2"" of type '" "double""'");
5708 }
5709 arg2 = (double)(val2);
5710 ecode3 = SWIG_AsVal_double(obj2, &val3);
5711 if (!SWIG_IsOK(ecode3)) {
5712 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_x_e" "', argument " "3"" of type '" "double""'");
5713 }
5714 arg3 = (double)(val3);
5715 result = pygsl_interp2d_eval_deriv_x_e(arg1,arg2,arg3,arg4);
5716 {
5717 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
5718 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
5719 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
5720 __FUNCTION__, 79);
5721 goto fail;
5722 }
5723 Py_INCREF(Py_None);
5724 resultobj = Py_None;
5725 }
5726 if (SWIG_IsTmpObj(res4)) {
5727 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
5728 } else {
5729 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
5730 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
5731 }
5732 return resultobj;
5733 fail:
5734 return NULL;
5735 }
5736
5737
_wrap_interp2d_eval_deriv_x_e_array(PyObject * self,PyObject * args,PyObject * kwargs)5738 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_x_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5739 PyObject *resultobj = 0;
5740 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5741 PyObject *arg2 = (PyObject *) 0 ;
5742 PyObject *arg3 = (PyObject *) 0 ;
5743 void *argp1 = 0 ;
5744 int res1 = 0 ;
5745 PyObject * obj1 = 0 ;
5746 PyObject * obj2 = 0 ;
5747 char * kwnames[] = {
5748 (char *) "x",(char *) "y", NULL
5749 };
5750 PyObject *result = 0 ;
5751
5752 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_x_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
5753 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5754 if (!SWIG_IsOK(res1)) {
5755 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_x_e_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5756 }
5757 arg1 = (pygsl_interp2d *)(argp1);
5758 arg2 = obj1;
5759 arg3 = obj2;
5760 result = (PyObject *)pygsl_interp2d_eval_deriv_x_e_array(arg1,arg2,arg3);
5761 resultobj = result;
5762 return resultobj;
5763 fail:
5764 return NULL;
5765 }
5766
5767
_wrap_interp2d_eval_deriv_y_e(PyObject * self,PyObject * args,PyObject * kwargs)5768 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_y_e(PyObject *self, PyObject *args, PyObject *kwargs) {
5769 PyObject *resultobj = 0;
5770 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5771 double arg2 ;
5772 double arg3 ;
5773 double *arg4 = (double *) 0 ;
5774 void *argp1 = 0 ;
5775 int res1 = 0 ;
5776 double val2 ;
5777 int ecode2 = 0 ;
5778 double val3 ;
5779 int ecode3 = 0 ;
5780 double temp4 ;
5781 int res4 = SWIG_TMPOBJ ;
5782 PyObject * obj1 = 0 ;
5783 PyObject * obj2 = 0 ;
5784 char * kwnames[] = {
5785 (char *) "x",(char *) "y", NULL
5786 };
5787 gsl_error_flag_drop result;
5788
5789 arg4 = &temp4;
5790 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_y_e",kwnames,&obj1,&obj2)) SWIG_fail;
5791 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5792 if (!SWIG_IsOK(res1)) {
5793 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_y_e" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5794 }
5795 arg1 = (pygsl_interp2d *)(argp1);
5796 ecode2 = SWIG_AsVal_double(obj1, &val2);
5797 if (!SWIG_IsOK(ecode2)) {
5798 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_y_e" "', argument " "2"" of type '" "double""'");
5799 }
5800 arg2 = (double)(val2);
5801 ecode3 = SWIG_AsVal_double(obj2, &val3);
5802 if (!SWIG_IsOK(ecode3)) {
5803 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_y_e" "', argument " "3"" of type '" "double""'");
5804 }
5805 arg3 = (double)(val3);
5806 result = pygsl_interp2d_eval_deriv_y_e(arg1,arg2,arg3,arg4);
5807 {
5808 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
5809 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
5810 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
5811 __FUNCTION__, 79);
5812 goto fail;
5813 }
5814 Py_INCREF(Py_None);
5815 resultobj = Py_None;
5816 }
5817 if (SWIG_IsTmpObj(res4)) {
5818 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
5819 } else {
5820 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
5821 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
5822 }
5823 return resultobj;
5824 fail:
5825 return NULL;
5826 }
5827
5828
_wrap_interp2d_eval_deriv_y_e_array(PyObject * self,PyObject * args,PyObject * kwargs)5829 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_y_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5830 PyObject *resultobj = 0;
5831 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5832 PyObject *arg2 = (PyObject *) 0 ;
5833 PyObject *arg3 = (PyObject *) 0 ;
5834 void *argp1 = 0 ;
5835 int res1 = 0 ;
5836 PyObject * obj1 = 0 ;
5837 PyObject * obj2 = 0 ;
5838 char * kwnames[] = {
5839 (char *) "x",(char *) "y", NULL
5840 };
5841 PyObject *result = 0 ;
5842
5843 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_y_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
5844 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5845 if (!SWIG_IsOK(res1)) {
5846 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_y_e_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5847 }
5848 arg1 = (pygsl_interp2d *)(argp1);
5849 arg2 = obj1;
5850 arg3 = obj2;
5851 result = (PyObject *)pygsl_interp2d_eval_deriv_y_e_array(arg1,arg2,arg3);
5852 resultobj = result;
5853 return resultobj;
5854 fail:
5855 return NULL;
5856 }
5857
5858
_wrap_interp2d_eval_deriv_xx_e(PyObject * self,PyObject * args,PyObject * kwargs)5859 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_xx_e(PyObject *self, PyObject *args, PyObject *kwargs) {
5860 PyObject *resultobj = 0;
5861 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5862 double arg2 ;
5863 double arg3 ;
5864 double *arg4 = (double *) 0 ;
5865 void *argp1 = 0 ;
5866 int res1 = 0 ;
5867 double val2 ;
5868 int ecode2 = 0 ;
5869 double val3 ;
5870 int ecode3 = 0 ;
5871 double temp4 ;
5872 int res4 = SWIG_TMPOBJ ;
5873 PyObject * obj1 = 0 ;
5874 PyObject * obj2 = 0 ;
5875 char * kwnames[] = {
5876 (char *) "x",(char *) "y", NULL
5877 };
5878 gsl_error_flag_drop result;
5879
5880 arg4 = &temp4;
5881 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_xx_e",kwnames,&obj1,&obj2)) SWIG_fail;
5882 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5883 if (!SWIG_IsOK(res1)) {
5884 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_xx_e" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5885 }
5886 arg1 = (pygsl_interp2d *)(argp1);
5887 ecode2 = SWIG_AsVal_double(obj1, &val2);
5888 if (!SWIG_IsOK(ecode2)) {
5889 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_xx_e" "', argument " "2"" of type '" "double""'");
5890 }
5891 arg2 = (double)(val2);
5892 ecode3 = SWIG_AsVal_double(obj2, &val3);
5893 if (!SWIG_IsOK(ecode3)) {
5894 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_xx_e" "', argument " "3"" of type '" "double""'");
5895 }
5896 arg3 = (double)(val3);
5897 result = pygsl_interp2d_eval_deriv_xx_e(arg1,arg2,arg3,arg4);
5898 {
5899 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
5900 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
5901 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
5902 __FUNCTION__, 79);
5903 goto fail;
5904 }
5905 Py_INCREF(Py_None);
5906 resultobj = Py_None;
5907 }
5908 if (SWIG_IsTmpObj(res4)) {
5909 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
5910 } else {
5911 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
5912 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
5913 }
5914 return resultobj;
5915 fail:
5916 return NULL;
5917 }
5918
5919
_wrap_interp2d_eval_deriv_xx_e_array(PyObject * self,PyObject * args,PyObject * kwargs)5920 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_xx_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
5921 PyObject *resultobj = 0;
5922 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5923 PyObject *arg2 = (PyObject *) 0 ;
5924 PyObject *arg3 = (PyObject *) 0 ;
5925 void *argp1 = 0 ;
5926 int res1 = 0 ;
5927 PyObject * obj1 = 0 ;
5928 PyObject * obj2 = 0 ;
5929 char * kwnames[] = {
5930 (char *) "x",(char *) "y", NULL
5931 };
5932 PyObject *result = 0 ;
5933
5934 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_xx_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
5935 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5936 if (!SWIG_IsOK(res1)) {
5937 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_xx_e_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5938 }
5939 arg1 = (pygsl_interp2d *)(argp1);
5940 arg2 = obj1;
5941 arg3 = obj2;
5942 result = (PyObject *)pygsl_interp2d_eval_deriv_xx_e_array(arg1,arg2,arg3);
5943 resultobj = result;
5944 return resultobj;
5945 fail:
5946 return NULL;
5947 }
5948
5949
_wrap_interp2d_eval_deriv_xy_e(PyObject * self,PyObject * args,PyObject * kwargs)5950 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_xy_e(PyObject *self, PyObject *args, PyObject *kwargs) {
5951 PyObject *resultobj = 0;
5952 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
5953 double arg2 ;
5954 double arg3 ;
5955 double *arg4 = (double *) 0 ;
5956 void *argp1 = 0 ;
5957 int res1 = 0 ;
5958 double val2 ;
5959 int ecode2 = 0 ;
5960 double val3 ;
5961 int ecode3 = 0 ;
5962 double temp4 ;
5963 int res4 = SWIG_TMPOBJ ;
5964 PyObject * obj1 = 0 ;
5965 PyObject * obj2 = 0 ;
5966 char * kwnames[] = {
5967 (char *) "x",(char *) "y", NULL
5968 };
5969 gsl_error_flag_drop result;
5970
5971 arg4 = &temp4;
5972 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_xy_e",kwnames,&obj1,&obj2)) SWIG_fail;
5973 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
5974 if (!SWIG_IsOK(res1)) {
5975 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_xy_e" "', argument " "1"" of type '" "pygsl_interp2d *""'");
5976 }
5977 arg1 = (pygsl_interp2d *)(argp1);
5978 ecode2 = SWIG_AsVal_double(obj1, &val2);
5979 if (!SWIG_IsOK(ecode2)) {
5980 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_xy_e" "', argument " "2"" of type '" "double""'");
5981 }
5982 arg2 = (double)(val2);
5983 ecode3 = SWIG_AsVal_double(obj2, &val3);
5984 if (!SWIG_IsOK(ecode3)) {
5985 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_xy_e" "', argument " "3"" of type '" "double""'");
5986 }
5987 arg3 = (double)(val3);
5988 result = pygsl_interp2d_eval_deriv_xy_e(arg1,arg2,arg3,arg4);
5989 {
5990 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
5991 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
5992 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
5993 __FUNCTION__, 79);
5994 goto fail;
5995 }
5996 Py_INCREF(Py_None);
5997 resultobj = Py_None;
5998 }
5999 if (SWIG_IsTmpObj(res4)) {
6000 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
6001 } else {
6002 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6003 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
6004 }
6005 return resultobj;
6006 fail:
6007 return NULL;
6008 }
6009
6010
_wrap_interp2d_eval_deriv_xy_e_array(PyObject * self,PyObject * args,PyObject * kwargs)6011 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_xy_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
6012 PyObject *resultobj = 0;
6013 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
6014 PyObject *arg2 = (PyObject *) 0 ;
6015 PyObject *arg3 = (PyObject *) 0 ;
6016 void *argp1 = 0 ;
6017 int res1 = 0 ;
6018 PyObject * obj1 = 0 ;
6019 PyObject * obj2 = 0 ;
6020 char * kwnames[] = {
6021 (char *) "x",(char *) "y", NULL
6022 };
6023 PyObject *result = 0 ;
6024
6025 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_xy_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
6026 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
6027 if (!SWIG_IsOK(res1)) {
6028 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_xy_e_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
6029 }
6030 arg1 = (pygsl_interp2d *)(argp1);
6031 arg2 = obj1;
6032 arg3 = obj2;
6033 result = (PyObject *)pygsl_interp2d_eval_deriv_xy_e_array(arg1,arg2,arg3);
6034 resultobj = result;
6035 return resultobj;
6036 fail:
6037 return NULL;
6038 }
6039
6040
_wrap_interp2d_eval_deriv_yy_e(PyObject * self,PyObject * args,PyObject * kwargs)6041 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_yy_e(PyObject *self, PyObject *args, PyObject *kwargs) {
6042 PyObject *resultobj = 0;
6043 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
6044 double arg2 ;
6045 double arg3 ;
6046 double *arg4 = (double *) 0 ;
6047 void *argp1 = 0 ;
6048 int res1 = 0 ;
6049 double val2 ;
6050 int ecode2 = 0 ;
6051 double val3 ;
6052 int ecode3 = 0 ;
6053 double temp4 ;
6054 int res4 = SWIG_TMPOBJ ;
6055 PyObject * obj1 = 0 ;
6056 PyObject * obj2 = 0 ;
6057 char * kwnames[] = {
6058 (char *) "x",(char *) "y", NULL
6059 };
6060 gsl_error_flag_drop result;
6061
6062 arg4 = &temp4;
6063 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_yy_e",kwnames,&obj1,&obj2)) SWIG_fail;
6064 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
6065 if (!SWIG_IsOK(res1)) {
6066 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_yy_e" "', argument " "1"" of type '" "pygsl_interp2d *""'");
6067 }
6068 arg1 = (pygsl_interp2d *)(argp1);
6069 ecode2 = SWIG_AsVal_double(obj1, &val2);
6070 if (!SWIG_IsOK(ecode2)) {
6071 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "interp2d_eval_deriv_yy_e" "', argument " "2"" of type '" "double""'");
6072 }
6073 arg2 = (double)(val2);
6074 ecode3 = SWIG_AsVal_double(obj2, &val3);
6075 if (!SWIG_IsOK(ecode3)) {
6076 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "interp2d_eval_deriv_yy_e" "', argument " "3"" of type '" "double""'");
6077 }
6078 arg3 = (double)(val3);
6079 result = pygsl_interp2d_eval_deriv_yy_e(arg1,arg2,arg3,arg4);
6080 {
6081 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
6082 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
6083 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
6084 __FUNCTION__, 79);
6085 goto fail;
6086 }
6087 Py_INCREF(Py_None);
6088 resultobj = Py_None;
6089 }
6090 if (SWIG_IsTmpObj(res4)) {
6091 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
6092 } else {
6093 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6094 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
6095 }
6096 return resultobj;
6097 fail:
6098 return NULL;
6099 }
6100
6101
_wrap_interp2d_eval_deriv_yy_e_array(PyObject * self,PyObject * args,PyObject * kwargs)6102 SWIGINTERN PyObject *_wrap_interp2d_eval_deriv_yy_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
6103 PyObject *resultobj = 0;
6104 pygsl_interp2d *arg1 = (pygsl_interp2d *) 0 ;
6105 PyObject *arg2 = (PyObject *) 0 ;
6106 PyObject *arg3 = (PyObject *) 0 ;
6107 void *argp1 = 0 ;
6108 int res1 = 0 ;
6109 PyObject * obj1 = 0 ;
6110 PyObject * obj2 = 0 ;
6111 char * kwnames[] = {
6112 (char *) "x",(char *) "y", NULL
6113 };
6114 PyObject *result = 0 ;
6115
6116 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:interp2d_eval_deriv_yy_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
6117 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_interp2d, 0 | 0 );
6118 if (!SWIG_IsOK(res1)) {
6119 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "interp2d_eval_deriv_yy_e_array" "', argument " "1"" of type '" "pygsl_interp2d *""'");
6120 }
6121 arg1 = (pygsl_interp2d *)(argp1);
6122 arg2 = obj1;
6123 arg3 = obj2;
6124 result = (PyObject *)pygsl_interp2d_eval_deriv_yy_e_array(arg1,arg2,arg3);
6125 resultobj = result;
6126 return resultobj;
6127 fail:
6128 return NULL;
6129 }
6130
6131
SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_interp2d)6132 SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_interp2d) /* defines _wrap_delete_interp2d_destructor_closure */
6133
6134 SWIGINTERN int _wrap_new_spline2d(PyObject *self, PyObject *args, PyObject *kwargs) {
6135 PyObject *resultobj = 0;
6136 gsl_interp2d_type *arg1 = (gsl_interp2d_type *) 0 ;
6137 size_t arg2 ;
6138 size_t arg3 ;
6139 void *argp1 = 0 ;
6140 int res1 = 0 ;
6141 size_t val2 ;
6142 int ecode2 = 0 ;
6143 size_t val3 ;
6144 int ecode3 = 0 ;
6145 PyObject * obj1 = 0 ;
6146 PyObject * obj2 = 0 ;
6147 PyObject * obj3 = 0 ;
6148 char * kwnames[] = {
6149 (char *) "T",(char *) "x_size",(char *) "y_size", NULL
6150 };
6151 pygsl_spline2d *result = 0 ;
6152
6153 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:new_spline2d",kwnames,&obj1,&obj2,&obj3)) SWIG_fail;
6154 res1 = SWIG_ConvertPtr(obj1, &argp1,SWIGTYPE_p_gsl_interp2d_type, 0 | 0 );
6155 if (!SWIG_IsOK(res1)) {
6156 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_spline2d" "', argument " "1"" of type '" "gsl_interp2d_type const *""'");
6157 }
6158 arg1 = (gsl_interp2d_type *)(argp1);
6159 ecode2 = SWIG_AsVal_size_t(obj2, &val2);
6160 if (!SWIG_IsOK(ecode2)) {
6161 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_spline2d" "', argument " "2"" of type '" "size_t""'");
6162 }
6163 arg2 = (size_t)(val2);
6164 ecode3 = SWIG_AsVal_size_t(obj3, &val3);
6165 if (!SWIG_IsOK(ecode3)) {
6166 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_spline2d" "', argument " "3"" of type '" "size_t""'");
6167 }
6168 arg3 = (size_t)(val3);
6169 result = (pygsl_spline2d *)new_pygsl_spline2d((gsl_interp2d_type const *)arg1,arg2,arg3);
6170 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pygsl_spline2d, SWIG_BUILTIN_INIT | 0 );
6171 return resultobj == Py_None ? -1 : 0;
6172 fail:
6173 return -1;
6174 }
6175
6176
_wrap_delete_spline2d(PyObject * self,PyObject * args)6177 SWIGINTERN PyObject *_wrap_delete_spline2d(PyObject *self, PyObject *args) {
6178 PyObject *resultobj = 0;
6179 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6180 void *argp1 = 0 ;
6181 int res1 = 0 ;
6182 PyObject *swig_obj[1] ;
6183
6184 if (!SWIG_Python_UnpackTuple(args,"delete_spline2d",0,0,0)) SWIG_fail;
6185 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, SWIG_POINTER_DISOWN | 0 );
6186 if (!SWIG_IsOK(res1)) {
6187 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_spline2d" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6188 }
6189 arg1 = (pygsl_spline2d *)(argp1);
6190 delete_pygsl_spline2d(arg1);
6191 resultobj = SWIG_Py_Void();
6192 return resultobj;
6193 fail:
6194 return NULL;
6195 }
6196
6197
_wrap_spline2d_reset(PyObject * self,PyObject * args)6198 SWIGINTERN PyObject *_wrap_spline2d_reset(PyObject *self, PyObject *args) {
6199 PyObject *resultobj = 0;
6200 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6201 void *argp1 = 0 ;
6202 int res1 = 0 ;
6203 PyObject *swig_obj[1] ;
6204 gsl_error_flag_drop result;
6205
6206 if (!SWIG_Python_UnpackTuple(args,"spline2d_reset",0,0,0)) SWIG_fail;
6207 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6208 if (!SWIG_IsOK(res1)) {
6209 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_reset" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6210 }
6211 arg1 = (pygsl_spline2d *)(argp1);
6212 result = pygsl_spline2d_reset(arg1);
6213 {
6214 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
6215 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
6216 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
6217 __FUNCTION__, 79);
6218 goto fail;
6219 }
6220 Py_INCREF(Py_None);
6221 resultobj = Py_None;
6222 }
6223 return resultobj;
6224 fail:
6225 return NULL;
6226 }
6227
6228
_wrap_spline2d_name(PyObject * self,PyObject * args)6229 SWIGINTERN PyObject *_wrap_spline2d_name(PyObject *self, PyObject *args) {
6230 PyObject *resultobj = 0;
6231 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6232 void *argp1 = 0 ;
6233 int res1 = 0 ;
6234 PyObject *swig_obj[1] ;
6235 char *result = 0 ;
6236
6237 if (!SWIG_Python_UnpackTuple(args,"spline2d_name",0,0,0)) SWIG_fail;
6238 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6239 if (!SWIG_IsOK(res1)) {
6240 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_name" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6241 }
6242 arg1 = (pygsl_spline2d *)(argp1);
6243 result = (char *)pygsl_spline2d_name(arg1);
6244 resultobj = SWIG_FromCharPtr((const char *)result);
6245 return resultobj;
6246 fail:
6247 return NULL;
6248 }
6249
6250
_wrap_spline2d_min_size(PyObject * self,PyObject * args)6251 SWIGINTERN PyObject *_wrap_spline2d_min_size(PyObject *self, PyObject *args) {
6252 PyObject *resultobj = 0;
6253 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6254 void *argp1 = 0 ;
6255 int res1 = 0 ;
6256 PyObject *swig_obj[1] ;
6257 size_t result;
6258
6259 if (!SWIG_Python_UnpackTuple(args,"spline2d_min_size",0,0,0)) SWIG_fail;
6260 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6261 if (!SWIG_IsOK(res1)) {
6262 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_min_size" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6263 }
6264 arg1 = (pygsl_spline2d *)(argp1);
6265 result = pygsl_spline2d_min_size(arg1);
6266 resultobj = SWIG_From_size_t((size_t)(result));
6267 return resultobj;
6268 fail:
6269 return NULL;
6270 }
6271
6272
_wrap_spline2d_init(PyObject * self,PyObject * args,PyObject * kwargs)6273 SWIGINTERN PyObject *_wrap_spline2d_init(PyObject *self, PyObject *args, PyObject *kwargs) {
6274 PyObject *resultobj = 0;
6275 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6276 PyObject *arg2 = (PyObject *) 0 ;
6277 PyObject *arg3 = (PyObject *) 0 ;
6278 PyObject *arg4 = (PyObject *) 0 ;
6279 void *argp1 = 0 ;
6280 int res1 = 0 ;
6281 PyObject * obj1 = 0 ;
6282 PyObject * obj2 = 0 ;
6283 PyObject * obj3 = 0 ;
6284 char * kwnames[] = {
6285 (char *) "x_o",(char *) "y_o",(char *) "z_o", NULL
6286 };
6287 gsl_error_flag_drop result;
6288
6289 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:spline2d_init",kwnames,&obj1,&obj2,&obj3)) SWIG_fail;
6290 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6291 if (!SWIG_IsOK(res1)) {
6292 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_init" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6293 }
6294 arg1 = (pygsl_spline2d *)(argp1);
6295 arg2 = obj1;
6296 arg3 = obj2;
6297 arg4 = obj3;
6298 result = pygsl_spline2d_init(arg1,arg2,arg3,arg4);
6299 {
6300 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
6301 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
6302 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
6303 __FUNCTION__, 79);
6304 goto fail;
6305 }
6306 Py_INCREF(Py_None);
6307 resultobj = Py_None;
6308 }
6309 return resultobj;
6310 fail:
6311 return NULL;
6312 }
6313
6314
_wrap_spline2d_get(PyObject * self,PyObject * args,PyObject * kwargs)6315 SWIGINTERN PyObject *_wrap_spline2d_get(PyObject *self, PyObject *args, PyObject *kwargs) {
6316 PyObject *resultobj = 0;
6317 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6318 size_t arg2 ;
6319 size_t arg3 ;
6320 void *argp1 = 0 ;
6321 int res1 = 0 ;
6322 size_t val2 ;
6323 int ecode2 = 0 ;
6324 size_t val3 ;
6325 int ecode3 = 0 ;
6326 PyObject * obj1 = 0 ;
6327 PyObject * obj2 = 0 ;
6328 char * kwnames[] = {
6329 (char *) "i",(char *) "j", NULL
6330 };
6331 double result;
6332
6333 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_get",kwnames,&obj1,&obj2)) SWIG_fail;
6334 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6335 if (!SWIG_IsOK(res1)) {
6336 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_get" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6337 }
6338 arg1 = (pygsl_spline2d *)(argp1);
6339 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6340 if (!SWIG_IsOK(ecode2)) {
6341 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_get" "', argument " "2"" of type '" "size_t""'");
6342 }
6343 arg2 = (size_t)(val2);
6344 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
6345 if (!SWIG_IsOK(ecode3)) {
6346 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_get" "', argument " "3"" of type '" "size_t""'");
6347 }
6348 arg3 = (size_t)(val3);
6349 result = (double)pygsl_spline2d_get(arg1,arg2,arg3);
6350 resultobj = SWIG_From_double((double)(result));
6351 return resultobj;
6352 fail:
6353 return NULL;
6354 }
6355
6356
_wrap_spline2d_set(PyObject * self,PyObject * args,PyObject * kwargs)6357 SWIGINTERN PyObject *_wrap_spline2d_set(PyObject *self, PyObject *args, PyObject *kwargs) {
6358 PyObject *resultobj = 0;
6359 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6360 size_t arg2 ;
6361 size_t arg3 ;
6362 double arg4 ;
6363 void *argp1 = 0 ;
6364 int res1 = 0 ;
6365 size_t val2 ;
6366 int ecode2 = 0 ;
6367 size_t val3 ;
6368 int ecode3 = 0 ;
6369 double val4 ;
6370 int ecode4 = 0 ;
6371 PyObject * obj1 = 0 ;
6372 PyObject * obj2 = 0 ;
6373 PyObject * obj3 = 0 ;
6374 char * kwnames[] = {
6375 (char *) "i",(char *) "j",(char *) "z", NULL
6376 };
6377 gsl_error_flag_drop result;
6378
6379 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO:spline2d_set",kwnames,&obj1,&obj2,&obj3)) SWIG_fail;
6380 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6381 if (!SWIG_IsOK(res1)) {
6382 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_set" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6383 }
6384 arg1 = (pygsl_spline2d *)(argp1);
6385 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6386 if (!SWIG_IsOK(ecode2)) {
6387 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_set" "', argument " "2"" of type '" "size_t""'");
6388 }
6389 arg2 = (size_t)(val2);
6390 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
6391 if (!SWIG_IsOK(ecode3)) {
6392 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_set" "', argument " "3"" of type '" "size_t""'");
6393 }
6394 arg3 = (size_t)(val3);
6395 ecode4 = SWIG_AsVal_double(obj3, &val4);
6396 if (!SWIG_IsOK(ecode4)) {
6397 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "spline2d_set" "', argument " "4"" of type '" "double""'");
6398 }
6399 arg4 = (double)(val4);
6400 result = pygsl_spline2d_set(arg1,arg2,arg3,arg4);
6401 {
6402 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
6403 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
6404 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
6405 __FUNCTION__, 79);
6406 goto fail;
6407 }
6408 Py_INCREF(Py_None);
6409 resultobj = Py_None;
6410 }
6411 return resultobj;
6412 fail:
6413 return NULL;
6414 }
6415
6416
_wrap_spline2d_eval(PyObject * self,PyObject * args,PyObject * kwargs)6417 SWIGINTERN PyObject *_wrap_spline2d_eval(PyObject *self, PyObject *args, PyObject *kwargs) {
6418 PyObject *resultobj = 0;
6419 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6420 double arg2 ;
6421 double arg3 ;
6422 void *argp1 = 0 ;
6423 int res1 = 0 ;
6424 double val2 ;
6425 int ecode2 = 0 ;
6426 double val3 ;
6427 int ecode3 = 0 ;
6428 PyObject * obj1 = 0 ;
6429 PyObject * obj2 = 0 ;
6430 char * kwnames[] = {
6431 (char *) "x",(char *) "y", NULL
6432 };
6433 double result;
6434
6435 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval",kwnames,&obj1,&obj2)) SWIG_fail;
6436 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6437 if (!SWIG_IsOK(res1)) {
6438 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6439 }
6440 arg1 = (pygsl_spline2d *)(argp1);
6441 ecode2 = SWIG_AsVal_double(obj1, &val2);
6442 if (!SWIG_IsOK(ecode2)) {
6443 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval" "', argument " "2"" of type '" "double""'");
6444 }
6445 arg2 = (double)(val2);
6446 ecode3 = SWIG_AsVal_double(obj2, &val3);
6447 if (!SWIG_IsOK(ecode3)) {
6448 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval" "', argument " "3"" of type '" "double""'");
6449 }
6450 arg3 = (double)(val3);
6451 result = (double)pygsl_spline2d_eval(arg1,arg2,arg3);
6452 resultobj = SWIG_From_double((double)(result));
6453 return resultobj;
6454 fail:
6455 return NULL;
6456 }
6457
6458
_wrap_spline2d_eval_array(PyObject * self,PyObject * args,PyObject * kwargs)6459 SWIGINTERN PyObject *_wrap_spline2d_eval_array(PyObject *self, PyObject *args, PyObject *kwargs) {
6460 PyObject *resultobj = 0;
6461 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6462 PyObject *arg2 = (PyObject *) 0 ;
6463 PyObject *arg3 = (PyObject *) 0 ;
6464 void *argp1 = 0 ;
6465 int res1 = 0 ;
6466 PyObject * obj1 = 0 ;
6467 PyObject * obj2 = 0 ;
6468 char * kwnames[] = {
6469 (char *) "x",(char *) "y", NULL
6470 };
6471 PyObject *result = 0 ;
6472
6473 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_array",kwnames,&obj1,&obj2)) SWIG_fail;
6474 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6475 if (!SWIG_IsOK(res1)) {
6476 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6477 }
6478 arg1 = (pygsl_spline2d *)(argp1);
6479 arg2 = obj1;
6480 arg3 = obj2;
6481 result = (PyObject *)pygsl_spline2d_eval_array(arg1,arg2,arg3);
6482 resultobj = result;
6483 return resultobj;
6484 fail:
6485 return NULL;
6486 }
6487
6488
_wrap_spline2d_eval_deriv_x(PyObject * self,PyObject * args,PyObject * kwargs)6489 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_x(PyObject *self, PyObject *args, PyObject *kwargs) {
6490 PyObject *resultobj = 0;
6491 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6492 double arg2 ;
6493 double arg3 ;
6494 void *argp1 = 0 ;
6495 int res1 = 0 ;
6496 double val2 ;
6497 int ecode2 = 0 ;
6498 double val3 ;
6499 int ecode3 = 0 ;
6500 PyObject * obj1 = 0 ;
6501 PyObject * obj2 = 0 ;
6502 char * kwnames[] = {
6503 (char *) "x",(char *) "y", NULL
6504 };
6505 double result;
6506
6507 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_x",kwnames,&obj1,&obj2)) SWIG_fail;
6508 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6509 if (!SWIG_IsOK(res1)) {
6510 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_x" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6511 }
6512 arg1 = (pygsl_spline2d *)(argp1);
6513 ecode2 = SWIG_AsVal_double(obj1, &val2);
6514 if (!SWIG_IsOK(ecode2)) {
6515 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_x" "', argument " "2"" of type '" "double""'");
6516 }
6517 arg2 = (double)(val2);
6518 ecode3 = SWIG_AsVal_double(obj2, &val3);
6519 if (!SWIG_IsOK(ecode3)) {
6520 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_x" "', argument " "3"" of type '" "double""'");
6521 }
6522 arg3 = (double)(val3);
6523 result = (double)pygsl_spline2d_eval_deriv_x(arg1,arg2,arg3);
6524 resultobj = SWIG_From_double((double)(result));
6525 return resultobj;
6526 fail:
6527 return NULL;
6528 }
6529
6530
_wrap_spline2d_eval_deriv_x_array(PyObject * self,PyObject * args,PyObject * kwargs)6531 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_x_array(PyObject *self, PyObject *args, PyObject *kwargs) {
6532 PyObject *resultobj = 0;
6533 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6534 PyObject *arg2 = (PyObject *) 0 ;
6535 PyObject *arg3 = (PyObject *) 0 ;
6536 void *argp1 = 0 ;
6537 int res1 = 0 ;
6538 PyObject * obj1 = 0 ;
6539 PyObject * obj2 = 0 ;
6540 char * kwnames[] = {
6541 (char *) "x",(char *) "y", NULL
6542 };
6543 PyObject *result = 0 ;
6544
6545 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_x_array",kwnames,&obj1,&obj2)) SWIG_fail;
6546 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6547 if (!SWIG_IsOK(res1)) {
6548 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_x_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6549 }
6550 arg1 = (pygsl_spline2d *)(argp1);
6551 arg2 = obj1;
6552 arg3 = obj2;
6553 result = (PyObject *)pygsl_spline2d_eval_deriv_x_array(arg1,arg2,arg3);
6554 resultobj = result;
6555 return resultobj;
6556 fail:
6557 return NULL;
6558 }
6559
6560
_wrap_spline2d_eval_deriv_y(PyObject * self,PyObject * args,PyObject * kwargs)6561 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_y(PyObject *self, PyObject *args, PyObject *kwargs) {
6562 PyObject *resultobj = 0;
6563 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6564 double arg2 ;
6565 double arg3 ;
6566 void *argp1 = 0 ;
6567 int res1 = 0 ;
6568 double val2 ;
6569 int ecode2 = 0 ;
6570 double val3 ;
6571 int ecode3 = 0 ;
6572 PyObject * obj1 = 0 ;
6573 PyObject * obj2 = 0 ;
6574 char * kwnames[] = {
6575 (char *) "x",(char *) "y", NULL
6576 };
6577 double result;
6578
6579 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_y",kwnames,&obj1,&obj2)) SWIG_fail;
6580 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6581 if (!SWIG_IsOK(res1)) {
6582 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_y" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6583 }
6584 arg1 = (pygsl_spline2d *)(argp1);
6585 ecode2 = SWIG_AsVal_double(obj1, &val2);
6586 if (!SWIG_IsOK(ecode2)) {
6587 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_y" "', argument " "2"" of type '" "double""'");
6588 }
6589 arg2 = (double)(val2);
6590 ecode3 = SWIG_AsVal_double(obj2, &val3);
6591 if (!SWIG_IsOK(ecode3)) {
6592 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_y" "', argument " "3"" of type '" "double""'");
6593 }
6594 arg3 = (double)(val3);
6595 result = (double)pygsl_spline2d_eval_deriv_y(arg1,arg2,arg3);
6596 resultobj = SWIG_From_double((double)(result));
6597 return resultobj;
6598 fail:
6599 return NULL;
6600 }
6601
6602
_wrap_spline2d_eval_deriv_y_array(PyObject * self,PyObject * args,PyObject * kwargs)6603 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_y_array(PyObject *self, PyObject *args, PyObject *kwargs) {
6604 PyObject *resultobj = 0;
6605 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6606 PyObject *arg2 = (PyObject *) 0 ;
6607 PyObject *arg3 = (PyObject *) 0 ;
6608 void *argp1 = 0 ;
6609 int res1 = 0 ;
6610 PyObject * obj1 = 0 ;
6611 PyObject * obj2 = 0 ;
6612 char * kwnames[] = {
6613 (char *) "x",(char *) "y", NULL
6614 };
6615 PyObject *result = 0 ;
6616
6617 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_y_array",kwnames,&obj1,&obj2)) SWIG_fail;
6618 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6619 if (!SWIG_IsOK(res1)) {
6620 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_y_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6621 }
6622 arg1 = (pygsl_spline2d *)(argp1);
6623 arg2 = obj1;
6624 arg3 = obj2;
6625 result = (PyObject *)pygsl_spline2d_eval_deriv_y_array(arg1,arg2,arg3);
6626 resultobj = result;
6627 return resultobj;
6628 fail:
6629 return NULL;
6630 }
6631
6632
_wrap_spline2d_eval_deriv_xx(PyObject * self,PyObject * args,PyObject * kwargs)6633 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_xx(PyObject *self, PyObject *args, PyObject *kwargs) {
6634 PyObject *resultobj = 0;
6635 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6636 double arg2 ;
6637 double arg3 ;
6638 void *argp1 = 0 ;
6639 int res1 = 0 ;
6640 double val2 ;
6641 int ecode2 = 0 ;
6642 double val3 ;
6643 int ecode3 = 0 ;
6644 PyObject * obj1 = 0 ;
6645 PyObject * obj2 = 0 ;
6646 char * kwnames[] = {
6647 (char *) "x",(char *) "y", NULL
6648 };
6649 double result;
6650
6651 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_xx",kwnames,&obj1,&obj2)) SWIG_fail;
6652 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6653 if (!SWIG_IsOK(res1)) {
6654 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_xx" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6655 }
6656 arg1 = (pygsl_spline2d *)(argp1);
6657 ecode2 = SWIG_AsVal_double(obj1, &val2);
6658 if (!SWIG_IsOK(ecode2)) {
6659 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_xx" "', argument " "2"" of type '" "double""'");
6660 }
6661 arg2 = (double)(val2);
6662 ecode3 = SWIG_AsVal_double(obj2, &val3);
6663 if (!SWIG_IsOK(ecode3)) {
6664 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_xx" "', argument " "3"" of type '" "double""'");
6665 }
6666 arg3 = (double)(val3);
6667 result = (double)pygsl_spline2d_eval_deriv_xx(arg1,arg2,arg3);
6668 resultobj = SWIG_From_double((double)(result));
6669 return resultobj;
6670 fail:
6671 return NULL;
6672 }
6673
6674
_wrap_spline2d_eval_deriv_xx_array(PyObject * self,PyObject * args,PyObject * kwargs)6675 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_xx_array(PyObject *self, PyObject *args, PyObject *kwargs) {
6676 PyObject *resultobj = 0;
6677 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6678 PyObject *arg2 = (PyObject *) 0 ;
6679 PyObject *arg3 = (PyObject *) 0 ;
6680 void *argp1 = 0 ;
6681 int res1 = 0 ;
6682 PyObject * obj1 = 0 ;
6683 PyObject * obj2 = 0 ;
6684 char * kwnames[] = {
6685 (char *) "x",(char *) "y", NULL
6686 };
6687 PyObject *result = 0 ;
6688
6689 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_xx_array",kwnames,&obj1,&obj2)) SWIG_fail;
6690 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6691 if (!SWIG_IsOK(res1)) {
6692 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_xx_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6693 }
6694 arg1 = (pygsl_spline2d *)(argp1);
6695 arg2 = obj1;
6696 arg3 = obj2;
6697 result = (PyObject *)pygsl_spline2d_eval_deriv_xx_array(arg1,arg2,arg3);
6698 resultobj = result;
6699 return resultobj;
6700 fail:
6701 return NULL;
6702 }
6703
6704
_wrap_spline2d_eval_deriv_xy(PyObject * self,PyObject * args,PyObject * kwargs)6705 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_xy(PyObject *self, PyObject *args, PyObject *kwargs) {
6706 PyObject *resultobj = 0;
6707 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6708 double arg2 ;
6709 double arg3 ;
6710 void *argp1 = 0 ;
6711 int res1 = 0 ;
6712 double val2 ;
6713 int ecode2 = 0 ;
6714 double val3 ;
6715 int ecode3 = 0 ;
6716 PyObject * obj1 = 0 ;
6717 PyObject * obj2 = 0 ;
6718 char * kwnames[] = {
6719 (char *) "x",(char *) "y", NULL
6720 };
6721 double result;
6722
6723 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_xy",kwnames,&obj1,&obj2)) SWIG_fail;
6724 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6725 if (!SWIG_IsOK(res1)) {
6726 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_xy" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6727 }
6728 arg1 = (pygsl_spline2d *)(argp1);
6729 ecode2 = SWIG_AsVal_double(obj1, &val2);
6730 if (!SWIG_IsOK(ecode2)) {
6731 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_xy" "', argument " "2"" of type '" "double""'");
6732 }
6733 arg2 = (double)(val2);
6734 ecode3 = SWIG_AsVal_double(obj2, &val3);
6735 if (!SWIG_IsOK(ecode3)) {
6736 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_xy" "', argument " "3"" of type '" "double""'");
6737 }
6738 arg3 = (double)(val3);
6739 result = (double)pygsl_spline2d_eval_deriv_xy(arg1,arg2,arg3);
6740 resultobj = SWIG_From_double((double)(result));
6741 return resultobj;
6742 fail:
6743 return NULL;
6744 }
6745
6746
_wrap_spline2d_eval_deriv_xy_array(PyObject * self,PyObject * args,PyObject * kwargs)6747 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_xy_array(PyObject *self, PyObject *args, PyObject *kwargs) {
6748 PyObject *resultobj = 0;
6749 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6750 PyObject *arg2 = (PyObject *) 0 ;
6751 PyObject *arg3 = (PyObject *) 0 ;
6752 void *argp1 = 0 ;
6753 int res1 = 0 ;
6754 PyObject * obj1 = 0 ;
6755 PyObject * obj2 = 0 ;
6756 char * kwnames[] = {
6757 (char *) "x",(char *) "y", NULL
6758 };
6759 PyObject *result = 0 ;
6760
6761 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_xy_array",kwnames,&obj1,&obj2)) SWIG_fail;
6762 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6763 if (!SWIG_IsOK(res1)) {
6764 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_xy_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6765 }
6766 arg1 = (pygsl_spline2d *)(argp1);
6767 arg2 = obj1;
6768 arg3 = obj2;
6769 result = (PyObject *)pygsl_spline2d_eval_deriv_xy_array(arg1,arg2,arg3);
6770 resultobj = result;
6771 return resultobj;
6772 fail:
6773 return NULL;
6774 }
6775
6776
_wrap_spline2d_eval_deriv_yy(PyObject * self,PyObject * args,PyObject * kwargs)6777 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_yy(PyObject *self, PyObject *args, PyObject *kwargs) {
6778 PyObject *resultobj = 0;
6779 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6780 double arg2 ;
6781 double arg3 ;
6782 void *argp1 = 0 ;
6783 int res1 = 0 ;
6784 double val2 ;
6785 int ecode2 = 0 ;
6786 double val3 ;
6787 int ecode3 = 0 ;
6788 PyObject * obj1 = 0 ;
6789 PyObject * obj2 = 0 ;
6790 char * kwnames[] = {
6791 (char *) "x",(char *) "y", NULL
6792 };
6793 double result;
6794
6795 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_yy",kwnames,&obj1,&obj2)) SWIG_fail;
6796 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6797 if (!SWIG_IsOK(res1)) {
6798 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_yy" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6799 }
6800 arg1 = (pygsl_spline2d *)(argp1);
6801 ecode2 = SWIG_AsVal_double(obj1, &val2);
6802 if (!SWIG_IsOK(ecode2)) {
6803 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_yy" "', argument " "2"" of type '" "double""'");
6804 }
6805 arg2 = (double)(val2);
6806 ecode3 = SWIG_AsVal_double(obj2, &val3);
6807 if (!SWIG_IsOK(ecode3)) {
6808 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_yy" "', argument " "3"" of type '" "double""'");
6809 }
6810 arg3 = (double)(val3);
6811 result = (double)pygsl_spline2d_eval_deriv_yy(arg1,arg2,arg3);
6812 resultobj = SWIG_From_double((double)(result));
6813 return resultobj;
6814 fail:
6815 return NULL;
6816 }
6817
6818
_wrap_spline2d_eval_deriv_yy_array(PyObject * self,PyObject * args,PyObject * kwargs)6819 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_yy_array(PyObject *self, PyObject *args, PyObject *kwargs) {
6820 PyObject *resultobj = 0;
6821 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6822 PyObject *arg2 = (PyObject *) 0 ;
6823 PyObject *arg3 = (PyObject *) 0 ;
6824 void *argp1 = 0 ;
6825 int res1 = 0 ;
6826 PyObject * obj1 = 0 ;
6827 PyObject * obj2 = 0 ;
6828 char * kwnames[] = {
6829 (char *) "x",(char *) "y", NULL
6830 };
6831 PyObject *result = 0 ;
6832
6833 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_yy_array",kwnames,&obj1,&obj2)) SWIG_fail;
6834 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6835 if (!SWIG_IsOK(res1)) {
6836 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_yy_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6837 }
6838 arg1 = (pygsl_spline2d *)(argp1);
6839 arg2 = obj1;
6840 arg3 = obj2;
6841 result = (PyObject *)pygsl_spline2d_eval_deriv_yy_array(arg1,arg2,arg3);
6842 resultobj = result;
6843 return resultobj;
6844 fail:
6845 return NULL;
6846 }
6847
6848
_wrap_spline2d_eval_e(PyObject * self,PyObject * args,PyObject * kwargs)6849 SWIGINTERN PyObject *_wrap_spline2d_eval_e(PyObject *self, PyObject *args, PyObject *kwargs) {
6850 PyObject *resultobj = 0;
6851 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6852 double arg2 ;
6853 double arg3 ;
6854 double *arg4 = (double *) 0 ;
6855 void *argp1 = 0 ;
6856 int res1 = 0 ;
6857 double val2 ;
6858 int ecode2 = 0 ;
6859 double val3 ;
6860 int ecode3 = 0 ;
6861 double temp4 ;
6862 int res4 = SWIG_TMPOBJ ;
6863 PyObject * obj1 = 0 ;
6864 PyObject * obj2 = 0 ;
6865 char * kwnames[] = {
6866 (char *) "x",(char *) "y", NULL
6867 };
6868 gsl_error_flag_drop result;
6869
6870 arg4 = &temp4;
6871 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_e",kwnames,&obj1,&obj2)) SWIG_fail;
6872 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6873 if (!SWIG_IsOK(res1)) {
6874 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_e" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6875 }
6876 arg1 = (pygsl_spline2d *)(argp1);
6877 ecode2 = SWIG_AsVal_double(obj1, &val2);
6878 if (!SWIG_IsOK(ecode2)) {
6879 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_e" "', argument " "2"" of type '" "double""'");
6880 }
6881 arg2 = (double)(val2);
6882 ecode3 = SWIG_AsVal_double(obj2, &val3);
6883 if (!SWIG_IsOK(ecode3)) {
6884 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_e" "', argument " "3"" of type '" "double""'");
6885 }
6886 arg3 = (double)(val3);
6887 result = pygsl_spline2d_eval_e(arg1,arg2,arg3,arg4);
6888 {
6889 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
6890 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
6891 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
6892 __FUNCTION__, 79);
6893 goto fail;
6894 }
6895 Py_INCREF(Py_None);
6896 resultobj = Py_None;
6897 }
6898 if (SWIG_IsTmpObj(res4)) {
6899 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
6900 } else {
6901 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6902 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
6903 }
6904 return resultobj;
6905 fail:
6906 return NULL;
6907 }
6908
6909
_wrap_spline2d_eval_e_array(PyObject * self,PyObject * args,PyObject * kwargs)6910 SWIGINTERN PyObject *_wrap_spline2d_eval_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
6911 PyObject *resultobj = 0;
6912 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6913 PyObject *arg2 = (PyObject *) 0 ;
6914 PyObject *arg3 = (PyObject *) 0 ;
6915 void *argp1 = 0 ;
6916 int res1 = 0 ;
6917 PyObject * obj1 = 0 ;
6918 PyObject * obj2 = 0 ;
6919 char * kwnames[] = {
6920 (char *) "x",(char *) "y", NULL
6921 };
6922 PyObject *result = 0 ;
6923
6924 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
6925 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6926 if (!SWIG_IsOK(res1)) {
6927 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_e_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6928 }
6929 arg1 = (pygsl_spline2d *)(argp1);
6930 arg2 = obj1;
6931 arg3 = obj2;
6932 result = (PyObject *)pygsl_spline2d_eval_e_array(arg1,arg2,arg3);
6933 resultobj = result;
6934 return resultobj;
6935 fail:
6936 return NULL;
6937 }
6938
6939
_wrap_spline2d_eval_deriv_x_e(PyObject * self,PyObject * args,PyObject * kwargs)6940 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_x_e(PyObject *self, PyObject *args, PyObject *kwargs) {
6941 PyObject *resultobj = 0;
6942 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
6943 double arg2 ;
6944 double arg3 ;
6945 double *arg4 = (double *) 0 ;
6946 void *argp1 = 0 ;
6947 int res1 = 0 ;
6948 double val2 ;
6949 int ecode2 = 0 ;
6950 double val3 ;
6951 int ecode3 = 0 ;
6952 double temp4 ;
6953 int res4 = SWIG_TMPOBJ ;
6954 PyObject * obj1 = 0 ;
6955 PyObject * obj2 = 0 ;
6956 char * kwnames[] = {
6957 (char *) "x",(char *) "y", NULL
6958 };
6959 gsl_error_flag_drop result;
6960
6961 arg4 = &temp4;
6962 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_x_e",kwnames,&obj1,&obj2)) SWIG_fail;
6963 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
6964 if (!SWIG_IsOK(res1)) {
6965 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_x_e" "', argument " "1"" of type '" "pygsl_spline2d *""'");
6966 }
6967 arg1 = (pygsl_spline2d *)(argp1);
6968 ecode2 = SWIG_AsVal_double(obj1, &val2);
6969 if (!SWIG_IsOK(ecode2)) {
6970 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_x_e" "', argument " "2"" of type '" "double""'");
6971 }
6972 arg2 = (double)(val2);
6973 ecode3 = SWIG_AsVal_double(obj2, &val3);
6974 if (!SWIG_IsOK(ecode3)) {
6975 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_x_e" "', argument " "3"" of type '" "double""'");
6976 }
6977 arg3 = (double)(val3);
6978 result = pygsl_spline2d_eval_deriv_x_e(arg1,arg2,arg3,arg4);
6979 {
6980 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
6981 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
6982 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
6983 __FUNCTION__, 79);
6984 goto fail;
6985 }
6986 Py_INCREF(Py_None);
6987 resultobj = Py_None;
6988 }
6989 if (SWIG_IsTmpObj(res4)) {
6990 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
6991 } else {
6992 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
6993 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
6994 }
6995 return resultobj;
6996 fail:
6997 return NULL;
6998 }
6999
7000
_wrap_spline2d_eval_deriv_x_e_array(PyObject * self,PyObject * args,PyObject * kwargs)7001 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_x_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
7002 PyObject *resultobj = 0;
7003 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
7004 PyObject *arg2 = (PyObject *) 0 ;
7005 PyObject *arg3 = (PyObject *) 0 ;
7006 void *argp1 = 0 ;
7007 int res1 = 0 ;
7008 PyObject * obj1 = 0 ;
7009 PyObject * obj2 = 0 ;
7010 char * kwnames[] = {
7011 (char *) "x",(char *) "y", NULL
7012 };
7013 PyObject *result = 0 ;
7014
7015 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_x_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
7016 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
7017 if (!SWIG_IsOK(res1)) {
7018 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_x_e_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
7019 }
7020 arg1 = (pygsl_spline2d *)(argp1);
7021 arg2 = obj1;
7022 arg3 = obj2;
7023 result = (PyObject *)pygsl_spline2d_eval_deriv_x_e_array(arg1,arg2,arg3);
7024 resultobj = result;
7025 return resultobj;
7026 fail:
7027 return NULL;
7028 }
7029
7030
_wrap_spline2d_eval_deriv_y_e(PyObject * self,PyObject * args,PyObject * kwargs)7031 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_y_e(PyObject *self, PyObject *args, PyObject *kwargs) {
7032 PyObject *resultobj = 0;
7033 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
7034 double arg2 ;
7035 double arg3 ;
7036 double *arg4 = (double *) 0 ;
7037 void *argp1 = 0 ;
7038 int res1 = 0 ;
7039 double val2 ;
7040 int ecode2 = 0 ;
7041 double val3 ;
7042 int ecode3 = 0 ;
7043 double temp4 ;
7044 int res4 = SWIG_TMPOBJ ;
7045 PyObject * obj1 = 0 ;
7046 PyObject * obj2 = 0 ;
7047 char * kwnames[] = {
7048 (char *) "x",(char *) "y", NULL
7049 };
7050 gsl_error_flag_drop result;
7051
7052 arg4 = &temp4;
7053 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_y_e",kwnames,&obj1,&obj2)) SWIG_fail;
7054 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
7055 if (!SWIG_IsOK(res1)) {
7056 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_y_e" "', argument " "1"" of type '" "pygsl_spline2d *""'");
7057 }
7058 arg1 = (pygsl_spline2d *)(argp1);
7059 ecode2 = SWIG_AsVal_double(obj1, &val2);
7060 if (!SWIG_IsOK(ecode2)) {
7061 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_y_e" "', argument " "2"" of type '" "double""'");
7062 }
7063 arg2 = (double)(val2);
7064 ecode3 = SWIG_AsVal_double(obj2, &val3);
7065 if (!SWIG_IsOK(ecode3)) {
7066 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_y_e" "', argument " "3"" of type '" "double""'");
7067 }
7068 arg3 = (double)(val3);
7069 result = pygsl_spline2d_eval_deriv_y_e(arg1,arg2,arg3,arg4);
7070 {
7071 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
7072 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
7073 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
7074 __FUNCTION__, 79);
7075 goto fail;
7076 }
7077 Py_INCREF(Py_None);
7078 resultobj = Py_None;
7079 }
7080 if (SWIG_IsTmpObj(res4)) {
7081 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
7082 } else {
7083 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7084 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
7085 }
7086 return resultobj;
7087 fail:
7088 return NULL;
7089 }
7090
7091
_wrap_spline2d_eval_deriv_y_e_array(PyObject * self,PyObject * args,PyObject * kwargs)7092 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_y_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
7093 PyObject *resultobj = 0;
7094 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
7095 PyObject *arg2 = (PyObject *) 0 ;
7096 PyObject *arg3 = (PyObject *) 0 ;
7097 void *argp1 = 0 ;
7098 int res1 = 0 ;
7099 PyObject * obj1 = 0 ;
7100 PyObject * obj2 = 0 ;
7101 char * kwnames[] = {
7102 (char *) "x",(char *) "y", NULL
7103 };
7104 PyObject *result = 0 ;
7105
7106 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_y_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
7107 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
7108 if (!SWIG_IsOK(res1)) {
7109 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_y_e_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
7110 }
7111 arg1 = (pygsl_spline2d *)(argp1);
7112 arg2 = obj1;
7113 arg3 = obj2;
7114 result = (PyObject *)pygsl_spline2d_eval_deriv_y_e_array(arg1,arg2,arg3);
7115 resultobj = result;
7116 return resultobj;
7117 fail:
7118 return NULL;
7119 }
7120
7121
_wrap_spline2d_eval_deriv_xx_e(PyObject * self,PyObject * args,PyObject * kwargs)7122 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_xx_e(PyObject *self, PyObject *args, PyObject *kwargs) {
7123 PyObject *resultobj = 0;
7124 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
7125 double arg2 ;
7126 double arg3 ;
7127 double *arg4 = (double *) 0 ;
7128 void *argp1 = 0 ;
7129 int res1 = 0 ;
7130 double val2 ;
7131 int ecode2 = 0 ;
7132 double val3 ;
7133 int ecode3 = 0 ;
7134 double temp4 ;
7135 int res4 = SWIG_TMPOBJ ;
7136 PyObject * obj1 = 0 ;
7137 PyObject * obj2 = 0 ;
7138 char * kwnames[] = {
7139 (char *) "x",(char *) "y", NULL
7140 };
7141 gsl_error_flag_drop result;
7142
7143 arg4 = &temp4;
7144 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_xx_e",kwnames,&obj1,&obj2)) SWIG_fail;
7145 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
7146 if (!SWIG_IsOK(res1)) {
7147 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_xx_e" "', argument " "1"" of type '" "pygsl_spline2d *""'");
7148 }
7149 arg1 = (pygsl_spline2d *)(argp1);
7150 ecode2 = SWIG_AsVal_double(obj1, &val2);
7151 if (!SWIG_IsOK(ecode2)) {
7152 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_xx_e" "', argument " "2"" of type '" "double""'");
7153 }
7154 arg2 = (double)(val2);
7155 ecode3 = SWIG_AsVal_double(obj2, &val3);
7156 if (!SWIG_IsOK(ecode3)) {
7157 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_xx_e" "', argument " "3"" of type '" "double""'");
7158 }
7159 arg3 = (double)(val3);
7160 result = pygsl_spline2d_eval_deriv_xx_e(arg1,arg2,arg3,arg4);
7161 {
7162 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
7163 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
7164 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
7165 __FUNCTION__, 79);
7166 goto fail;
7167 }
7168 Py_INCREF(Py_None);
7169 resultobj = Py_None;
7170 }
7171 if (SWIG_IsTmpObj(res4)) {
7172 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
7173 } else {
7174 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7175 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
7176 }
7177 return resultobj;
7178 fail:
7179 return NULL;
7180 }
7181
7182
_wrap_spline2d_eval_deriv_xx_e_array(PyObject * self,PyObject * args,PyObject * kwargs)7183 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_xx_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
7184 PyObject *resultobj = 0;
7185 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
7186 PyObject *arg2 = (PyObject *) 0 ;
7187 PyObject *arg3 = (PyObject *) 0 ;
7188 void *argp1 = 0 ;
7189 int res1 = 0 ;
7190 PyObject * obj1 = 0 ;
7191 PyObject * obj2 = 0 ;
7192 char * kwnames[] = {
7193 (char *) "x",(char *) "y", NULL
7194 };
7195 PyObject *result = 0 ;
7196
7197 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_xx_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
7198 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
7199 if (!SWIG_IsOK(res1)) {
7200 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_xx_e_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
7201 }
7202 arg1 = (pygsl_spline2d *)(argp1);
7203 arg2 = obj1;
7204 arg3 = obj2;
7205 result = (PyObject *)pygsl_spline2d_eval_deriv_xx_e_array(arg1,arg2,arg3);
7206 resultobj = result;
7207 return resultobj;
7208 fail:
7209 return NULL;
7210 }
7211
7212
_wrap_spline2d_eval_deriv_xy_e(PyObject * self,PyObject * args,PyObject * kwargs)7213 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_xy_e(PyObject *self, PyObject *args, PyObject *kwargs) {
7214 PyObject *resultobj = 0;
7215 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
7216 double arg2 ;
7217 double arg3 ;
7218 double *arg4 = (double *) 0 ;
7219 void *argp1 = 0 ;
7220 int res1 = 0 ;
7221 double val2 ;
7222 int ecode2 = 0 ;
7223 double val3 ;
7224 int ecode3 = 0 ;
7225 double temp4 ;
7226 int res4 = SWIG_TMPOBJ ;
7227 PyObject * obj1 = 0 ;
7228 PyObject * obj2 = 0 ;
7229 char * kwnames[] = {
7230 (char *) "x",(char *) "y", NULL
7231 };
7232 gsl_error_flag_drop result;
7233
7234 arg4 = &temp4;
7235 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_xy_e",kwnames,&obj1,&obj2)) SWIG_fail;
7236 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
7237 if (!SWIG_IsOK(res1)) {
7238 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_xy_e" "', argument " "1"" of type '" "pygsl_spline2d *""'");
7239 }
7240 arg1 = (pygsl_spline2d *)(argp1);
7241 ecode2 = SWIG_AsVal_double(obj1, &val2);
7242 if (!SWIG_IsOK(ecode2)) {
7243 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_xy_e" "', argument " "2"" of type '" "double""'");
7244 }
7245 arg2 = (double)(val2);
7246 ecode3 = SWIG_AsVal_double(obj2, &val3);
7247 if (!SWIG_IsOK(ecode3)) {
7248 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_xy_e" "', argument " "3"" of type '" "double""'");
7249 }
7250 arg3 = (double)(val3);
7251 result = pygsl_spline2d_eval_deriv_xy_e(arg1,arg2,arg3,arg4);
7252 {
7253 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
7254 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
7255 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
7256 __FUNCTION__, 79);
7257 goto fail;
7258 }
7259 Py_INCREF(Py_None);
7260 resultobj = Py_None;
7261 }
7262 if (SWIG_IsTmpObj(res4)) {
7263 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
7264 } else {
7265 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7266 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
7267 }
7268 return resultobj;
7269 fail:
7270 return NULL;
7271 }
7272
7273
_wrap_spline2d_eval_deriv_xy_e_array(PyObject * self,PyObject * args,PyObject * kwargs)7274 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_xy_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
7275 PyObject *resultobj = 0;
7276 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
7277 PyObject *arg2 = (PyObject *) 0 ;
7278 PyObject *arg3 = (PyObject *) 0 ;
7279 void *argp1 = 0 ;
7280 int res1 = 0 ;
7281 PyObject * obj1 = 0 ;
7282 PyObject * obj2 = 0 ;
7283 char * kwnames[] = {
7284 (char *) "x",(char *) "y", NULL
7285 };
7286 PyObject *result = 0 ;
7287
7288 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_xy_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
7289 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
7290 if (!SWIG_IsOK(res1)) {
7291 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_xy_e_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
7292 }
7293 arg1 = (pygsl_spline2d *)(argp1);
7294 arg2 = obj1;
7295 arg3 = obj2;
7296 result = (PyObject *)pygsl_spline2d_eval_deriv_xy_e_array(arg1,arg2,arg3);
7297 resultobj = result;
7298 return resultobj;
7299 fail:
7300 return NULL;
7301 }
7302
7303
_wrap_spline2d_eval_deriv_yy_e(PyObject * self,PyObject * args,PyObject * kwargs)7304 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_yy_e(PyObject *self, PyObject *args, PyObject *kwargs) {
7305 PyObject *resultobj = 0;
7306 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
7307 double arg2 ;
7308 double arg3 ;
7309 double *arg4 = (double *) 0 ;
7310 void *argp1 = 0 ;
7311 int res1 = 0 ;
7312 double val2 ;
7313 int ecode2 = 0 ;
7314 double val3 ;
7315 int ecode3 = 0 ;
7316 double temp4 ;
7317 int res4 = SWIG_TMPOBJ ;
7318 PyObject * obj1 = 0 ;
7319 PyObject * obj2 = 0 ;
7320 char * kwnames[] = {
7321 (char *) "x",(char *) "y", NULL
7322 };
7323 gsl_error_flag_drop result;
7324
7325 arg4 = &temp4;
7326 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_yy_e",kwnames,&obj1,&obj2)) SWIG_fail;
7327 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
7328 if (!SWIG_IsOK(res1)) {
7329 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_yy_e" "', argument " "1"" of type '" "pygsl_spline2d *""'");
7330 }
7331 arg1 = (pygsl_spline2d *)(argp1);
7332 ecode2 = SWIG_AsVal_double(obj1, &val2);
7333 if (!SWIG_IsOK(ecode2)) {
7334 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "spline2d_eval_deriv_yy_e" "', argument " "2"" of type '" "double""'");
7335 }
7336 arg2 = (double)(val2);
7337 ecode3 = SWIG_AsVal_double(obj2, &val3);
7338 if (!SWIG_IsOK(ecode3)) {
7339 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "spline2d_eval_deriv_yy_e" "', argument " "3"" of type '" "double""'");
7340 }
7341 arg3 = (double)(val3);
7342 result = pygsl_spline2d_eval_deriv_yy_e(arg1,arg2,arg3,arg4);
7343 {
7344 DEBUG_MESS(5, "dropping error flag %ld", (long) result);
7345 if(GSL_SUCCESS != PyGSL_ERROR_FLAG(result)){
7346 PyGSL_add_traceback(pygsl_module_for_error_treatment, "typemaps\\gsl_error_typemap.i",
7347 __FUNCTION__, 79);
7348 goto fail;
7349 }
7350 Py_INCREF(Py_None);
7351 resultobj = Py_None;
7352 }
7353 if (SWIG_IsTmpObj(res4)) {
7354 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
7355 } else {
7356 int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
7357 resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
7358 }
7359 return resultobj;
7360 fail:
7361 return NULL;
7362 }
7363
7364
_wrap_spline2d_eval_deriv_yy_e_array(PyObject * self,PyObject * args,PyObject * kwargs)7365 SWIGINTERN PyObject *_wrap_spline2d_eval_deriv_yy_e_array(PyObject *self, PyObject *args, PyObject *kwargs) {
7366 PyObject *resultobj = 0;
7367 pygsl_spline2d *arg1 = (pygsl_spline2d *) 0 ;
7368 PyObject *arg2 = (PyObject *) 0 ;
7369 PyObject *arg3 = (PyObject *) 0 ;
7370 void *argp1 = 0 ;
7371 int res1 = 0 ;
7372 PyObject * obj1 = 0 ;
7373 PyObject * obj2 = 0 ;
7374 char * kwnames[] = {
7375 (char *) "x",(char *) "y", NULL
7376 };
7377 PyObject *result = 0 ;
7378
7379 if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:spline2d_eval_deriv_yy_e_array",kwnames,&obj1,&obj2)) SWIG_fail;
7380 res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_pygsl_spline2d, 0 | 0 );
7381 if (!SWIG_IsOK(res1)) {
7382 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "spline2d_eval_deriv_yy_e_array" "', argument " "1"" of type '" "pygsl_spline2d *""'");
7383 }
7384 arg1 = (pygsl_spline2d *)(argp1);
7385 arg2 = obj1;
7386 arg3 = obj2;
7387 result = (PyObject *)pygsl_spline2d_eval_deriv_yy_e_array(arg1,arg2,arg3);
7388 resultobj = result;
7389 return resultobj;
7390 fail:
7391 return NULL;
7392 }
7393
7394
SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_spline2d)7395 SWIGPY_DESTRUCTOR_CLOSURE(_wrap_delete_spline2d) /* defines _wrap_delete_spline2d_destructor_closure */
7396
7397 SWIGINTERN int Swig_var_gsl_interp2d_bilinear_set(PyObject *_val SWIGUNUSED) {
7398 SWIG_Error(SWIG_AttributeError,"Variable gsl_interp2d_bilinear is read-only.");
7399 return 1;
7400 }
7401
7402
Swig_var_gsl_interp2d_bilinear_get(void)7403 SWIGINTERN PyObject *Swig_var_gsl_interp2d_bilinear_get(void) {
7404 PyObject *pyobj = 0;
7405 PyObject *self = 0;
7406
7407 (void)self;
7408 pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(gsl_interp2d_bilinear), SWIGTYPE_p_gsl_interp2d_type, 0 );
7409 return pyobj;
7410 }
7411
7412
Swig_var_gsl_interp2d_bicubic_set(PyObject * _val SWIGUNUSED)7413 SWIGINTERN int Swig_var_gsl_interp2d_bicubic_set(PyObject *_val SWIGUNUSED) {
7414 SWIG_Error(SWIG_AttributeError,"Variable gsl_interp2d_bicubic is read-only.");
7415 return 1;
7416 }
7417
7418
Swig_var_gsl_interp2d_bicubic_get(void)7419 SWIGINTERN PyObject *Swig_var_gsl_interp2d_bicubic_get(void) {
7420 PyObject *pyobj = 0;
7421 PyObject *self = 0;
7422
7423 (void)self;
7424 pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(gsl_interp2d_bicubic), SWIGTYPE_p_gsl_interp2d_type, 0 );
7425 return pyobj;
7426 }
7427
7428
7429 static PyMethodDef SwigMethods[] = {
7430 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
7431 { NULL, NULL, 0, NULL }
7432 };
7433
7434 static SwigPyGetSet interp2d___dict___getset = { SwigPyObject_get___dict__, 0 };
7435 SWIGINTERN PyGetSetDef SwigPyBuiltin__pygsl_interp2d_getset[] = {
7436 { (char *) "__dict__", (getter) SwigPyBuiltin_FunpackGetterClosure, (setter) 0, (char *)"pygsl_interp2d.__dict__", (void *) &interp2d___dict___getset }
7437 ,
7438 {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
7439 };
7440
7441 SWIGINTERN PyObject *
SwigPyBuiltin__pygsl_interp2d_richcompare(PyObject * self,PyObject * other,int op)7442 SwigPyBuiltin__pygsl_interp2d_richcompare(PyObject *self, PyObject *other, int op) {
7443 PyObject *result = NULL;
7444 if (!result) {
7445 if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) {
7446 result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op);
7447 } else {
7448 result = Py_NotImplemented;
7449 Py_INCREF(result);
7450 }
7451 }
7452 return result;
7453 }
7454
7455 SWIGINTERN PyMethodDef SwigPyBuiltin__pygsl_interp2d_methods[] = {
7456 { "reset", (PyCFunction) _wrap_interp2d_reset, METH_VARARGS|METH_KEYWORDS, (char *) "reset() -> gsl_error_flag_drop" },
7457 { "name", (PyCFunction) _wrap_interp2d_name, METH_VARARGS|METH_KEYWORDS, (char *) "name() -> char const *" },
7458 { "min_size", (PyCFunction) _wrap_interp2d_min_size, METH_VARARGS|METH_KEYWORDS, (char *) "min_size() -> size_t" },
7459 { "init", (PyCFunction) _wrap_interp2d_init, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7460 "init(PyObject * x_o, PyObject * y_o, PyObject * z_o) -> gsl_error_flag_drop\n"
7461 "\n"
7462 "Parameters\n"
7463 "----------\n"
7464 "x_o: PyObject *\n"
7465 "y_o: PyObject *\n"
7466 "z_o: PyObject *\n"
7467 "\n"
7468 "" },
7469 { "idx", (PyCFunction) _wrap_interp2d_idx, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7470 "idx(size_t const i, size_t const j) -> size_t\n"
7471 "\n"
7472 "Parameters\n"
7473 "----------\n"
7474 "i: size_t const\n"
7475 "j: size_t const\n"
7476 "\n"
7477 "" },
7478 { "get", (PyCFunction) _wrap_interp2d_get, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7479 "get(size_t const i, size_t const j) -> double\n"
7480 "\n"
7481 "Parameters\n"
7482 "----------\n"
7483 "i: size_t const\n"
7484 "j: size_t const\n"
7485 "\n"
7486 "" },
7487 { "eval", (PyCFunction) _wrap_interp2d_eval, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7488 "eval(double const x, double const y) -> double\n"
7489 "\n"
7490 "Parameters\n"
7491 "----------\n"
7492 "x: double const\n"
7493 "y: double const\n"
7494 "\n"
7495 "" },
7496 { "eval_array", (PyCFunction) _wrap_interp2d_eval_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7497 "eval_array(PyObject * x, PyObject * y) -> PyObject *\n"
7498 "\n"
7499 "Parameters\n"
7500 "----------\n"
7501 "x: PyObject *\n"
7502 "y: PyObject *\n"
7503 "\n"
7504 "" },
7505 { "eval_extrap", (PyCFunction) _wrap_interp2d_eval_extrap, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7506 "eval_extrap(double const x, double const y) -> double\n"
7507 "\n"
7508 "Parameters\n"
7509 "----------\n"
7510 "x: double const\n"
7511 "y: double const\n"
7512 "\n"
7513 "" },
7514 { "eval_extrap_array", (PyCFunction) _wrap_interp2d_eval_extrap_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7515 "eval_extrap_array(PyObject * x, PyObject * y) -> PyObject *\n"
7516 "\n"
7517 "Parameters\n"
7518 "----------\n"
7519 "x: PyObject *\n"
7520 "y: PyObject *\n"
7521 "\n"
7522 "" },
7523 { "eval_deriv_x", (PyCFunction) _wrap_interp2d_eval_deriv_x, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7524 "eval_deriv_x(double const x, double const y) -> double\n"
7525 "\n"
7526 "Parameters\n"
7527 "----------\n"
7528 "x: double const\n"
7529 "y: double const\n"
7530 "\n"
7531 "" },
7532 { "eval_deriv_x_array", (PyCFunction) _wrap_interp2d_eval_deriv_x_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7533 "eval_deriv_x_array(PyObject * x, PyObject * y) -> PyObject *\n"
7534 "\n"
7535 "Parameters\n"
7536 "----------\n"
7537 "x: PyObject *\n"
7538 "y: PyObject *\n"
7539 "\n"
7540 "" },
7541 { "eval_deriv_y", (PyCFunction) _wrap_interp2d_eval_deriv_y, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7542 "eval_deriv_y(double const x, double const y) -> double\n"
7543 "\n"
7544 "Parameters\n"
7545 "----------\n"
7546 "x: double const\n"
7547 "y: double const\n"
7548 "\n"
7549 "" },
7550 { "eval_deriv_y_array", (PyCFunction) _wrap_interp2d_eval_deriv_y_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7551 "eval_deriv_y_array(PyObject * x, PyObject * y) -> PyObject *\n"
7552 "\n"
7553 "Parameters\n"
7554 "----------\n"
7555 "x: PyObject *\n"
7556 "y: PyObject *\n"
7557 "\n"
7558 "" },
7559 { "eval_deriv_xx", (PyCFunction) _wrap_interp2d_eval_deriv_xx, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7560 "eval_deriv_xx(double const x, double const y) -> double\n"
7561 "\n"
7562 "Parameters\n"
7563 "----------\n"
7564 "x: double const\n"
7565 "y: double const\n"
7566 "\n"
7567 "" },
7568 { "eval_deriv_xx_array", (PyCFunction) _wrap_interp2d_eval_deriv_xx_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7569 "eval_deriv_xx_array(PyObject * x, PyObject * y) -> PyObject *\n"
7570 "\n"
7571 "Parameters\n"
7572 "----------\n"
7573 "x: PyObject *\n"
7574 "y: PyObject *\n"
7575 "\n"
7576 "" },
7577 { "eval_deriv_xy", (PyCFunction) _wrap_interp2d_eval_deriv_xy, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7578 "eval_deriv_xy(double const x, double const y) -> double\n"
7579 "\n"
7580 "Parameters\n"
7581 "----------\n"
7582 "x: double const\n"
7583 "y: double const\n"
7584 "\n"
7585 "" },
7586 { "eval_deriv_xy_array", (PyCFunction) _wrap_interp2d_eval_deriv_xy_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7587 "eval_deriv_xy_array(PyObject * x, PyObject * y) -> PyObject *\n"
7588 "\n"
7589 "Parameters\n"
7590 "----------\n"
7591 "x: PyObject *\n"
7592 "y: PyObject *\n"
7593 "\n"
7594 "" },
7595 { "eval_deriv_yy", (PyCFunction) _wrap_interp2d_eval_deriv_yy, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7596 "eval_deriv_yy(double const x, double const y) -> double\n"
7597 "\n"
7598 "Parameters\n"
7599 "----------\n"
7600 "x: double const\n"
7601 "y: double const\n"
7602 "\n"
7603 "" },
7604 { "eval_deriv_yy_array", (PyCFunction) _wrap_interp2d_eval_deriv_yy_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7605 "eval_deriv_yy_array(PyObject * x, PyObject * y) -> PyObject *\n"
7606 "\n"
7607 "Parameters\n"
7608 "----------\n"
7609 "x: PyObject *\n"
7610 "y: PyObject *\n"
7611 "\n"
7612 "" },
7613 { "eval_e", (PyCFunction) _wrap_interp2d_eval_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7614 "eval_e(double const x, double const y) -> gsl_error_flag_drop\n"
7615 "\n"
7616 "Parameters\n"
7617 "----------\n"
7618 "x: double const\n"
7619 "y: double const\n"
7620 "\n"
7621 "" },
7622 { "eval_e_array", (PyCFunction) _wrap_interp2d_eval_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7623 "eval_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
7624 "\n"
7625 "Parameters\n"
7626 "----------\n"
7627 "x: PyObject *\n"
7628 "y: PyObject *\n"
7629 "\n"
7630 "" },
7631 { "eval_e_extrap", (PyCFunction) _wrap_interp2d_eval_e_extrap, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7632 "eval_e_extrap(double const x, double const y) -> gsl_error_flag_drop\n"
7633 "\n"
7634 "Parameters\n"
7635 "----------\n"
7636 "x: double const\n"
7637 "y: double const\n"
7638 "\n"
7639 "" },
7640 { "eval_e_extrap_array", (PyCFunction) _wrap_interp2d_eval_e_extrap_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7641 "eval_e_extrap_array(PyObject * x, PyObject * y) -> PyObject *\n"
7642 "\n"
7643 "Parameters\n"
7644 "----------\n"
7645 "x: PyObject *\n"
7646 "y: PyObject *\n"
7647 "\n"
7648 "" },
7649 { "eval_deriv_x_e", (PyCFunction) _wrap_interp2d_eval_deriv_x_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7650 "eval_deriv_x_e(double const x, double const y) -> gsl_error_flag_drop\n"
7651 "\n"
7652 "Parameters\n"
7653 "----------\n"
7654 "x: double const\n"
7655 "y: double const\n"
7656 "\n"
7657 "" },
7658 { "eval_deriv_x_e_array", (PyCFunction) _wrap_interp2d_eval_deriv_x_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7659 "eval_deriv_x_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
7660 "\n"
7661 "Parameters\n"
7662 "----------\n"
7663 "x: PyObject *\n"
7664 "y: PyObject *\n"
7665 "\n"
7666 "" },
7667 { "eval_deriv_y_e", (PyCFunction) _wrap_interp2d_eval_deriv_y_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7668 "eval_deriv_y_e(double const x, double const y) -> gsl_error_flag_drop\n"
7669 "\n"
7670 "Parameters\n"
7671 "----------\n"
7672 "x: double const\n"
7673 "y: double const\n"
7674 "\n"
7675 "" },
7676 { "eval_deriv_y_e_array", (PyCFunction) _wrap_interp2d_eval_deriv_y_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7677 "eval_deriv_y_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
7678 "\n"
7679 "Parameters\n"
7680 "----------\n"
7681 "x: PyObject *\n"
7682 "y: PyObject *\n"
7683 "\n"
7684 "" },
7685 { "eval_deriv_xx_e", (PyCFunction) _wrap_interp2d_eval_deriv_xx_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7686 "eval_deriv_xx_e(double const x, double const y) -> gsl_error_flag_drop\n"
7687 "\n"
7688 "Parameters\n"
7689 "----------\n"
7690 "x: double const\n"
7691 "y: double const\n"
7692 "\n"
7693 "" },
7694 { "eval_deriv_xx_e_array", (PyCFunction) _wrap_interp2d_eval_deriv_xx_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7695 "eval_deriv_xx_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
7696 "\n"
7697 "Parameters\n"
7698 "----------\n"
7699 "x: PyObject *\n"
7700 "y: PyObject *\n"
7701 "\n"
7702 "" },
7703 { "eval_deriv_xy_e", (PyCFunction) _wrap_interp2d_eval_deriv_xy_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7704 "eval_deriv_xy_e(double const x, double const y) -> gsl_error_flag_drop\n"
7705 "\n"
7706 "Parameters\n"
7707 "----------\n"
7708 "x: double const\n"
7709 "y: double const\n"
7710 "\n"
7711 "" },
7712 { "eval_deriv_xy_e_array", (PyCFunction) _wrap_interp2d_eval_deriv_xy_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7713 "eval_deriv_xy_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
7714 "\n"
7715 "Parameters\n"
7716 "----------\n"
7717 "x: PyObject *\n"
7718 "y: PyObject *\n"
7719 "\n"
7720 "" },
7721 { "eval_deriv_yy_e", (PyCFunction) _wrap_interp2d_eval_deriv_yy_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7722 "eval_deriv_yy_e(double const x, double const y) -> gsl_error_flag_drop\n"
7723 "\n"
7724 "Parameters\n"
7725 "----------\n"
7726 "x: double const\n"
7727 "y: double const\n"
7728 "\n"
7729 "" },
7730 { "eval_deriv_yy_e_array", (PyCFunction) _wrap_interp2d_eval_deriv_yy_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7731 "eval_deriv_yy_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
7732 "\n"
7733 "Parameters\n"
7734 "----------\n"
7735 "x: PyObject *\n"
7736 "y: PyObject *\n"
7737 "\n"
7738 "" },
7739 { NULL, NULL, 0, NULL } /* Sentinel */
7740 };
7741
7742 static PyHeapTypeObject SwigPyBuiltin__pygsl_interp2d_type = {
7743 {
7744 #if PY_VERSION_HEX >= 0x03000000
7745 PyVarObject_HEAD_INIT(NULL, 0)
7746 #else
7747 PyObject_HEAD_INIT(NULL)
7748 0, /* ob_size */
7749 #endif
7750 "interpolation2d_wrap.interp2d", /* tp_name */
7751 sizeof(SwigPyObject), /* tp_basicsize */
7752 0, /* tp_itemsize */
7753 (destructor) (destructor) _wrap_delete_interp2d_destructor_closure,/* tp_dealloc */
7754 (printfunc) 0, /* tp_print */
7755 (getattrfunc) 0, /* tp_getattr */
7756 (setattrfunc) 0, /* tp_setattr */
7757 #if PY_VERSION_HEX >= 0x03000000
7758 0, /* tp_compare */
7759 #else
7760 (cmpfunc) 0, /* tp_compare */
7761 #endif
7762 (reprfunc) 0, /* tp_repr */
7763 &SwigPyBuiltin__pygsl_interp2d_type.as_number, /* tp_as_number */
7764 &SwigPyBuiltin__pygsl_interp2d_type.as_sequence, /* tp_as_sequence */
7765 &SwigPyBuiltin__pygsl_interp2d_type.as_mapping, /* tp_as_mapping */
7766 (hashfunc) SwigPyObject_hash, /* tp_hash */
7767 (ternaryfunc) 0, /* tp_call */
7768 (reprfunc) 0, /* tp_str */
7769 (getattrofunc) 0, /* tp_getattro */
7770 (setattrofunc) 0, /* tp_setattro */
7771 &SwigPyBuiltin__pygsl_interp2d_type.as_buffer, /* tp_as_buffer */
7772 #if PY_VERSION_HEX >= 0x03000000
7773 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
7774 #else
7775 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */
7776 #endif
7777 "::pygsl_interp2d", /* tp_doc */
7778 (traverseproc) 0, /* tp_traverse */
7779 (inquiry) 0, /* tp_clear */
7780 (richcmpfunc) SwigPyBuiltin__pygsl_interp2d_richcompare, /* tp_richcompare */
7781 0, /* tp_weaklistoffset */
7782 (getiterfunc) 0, /* tp_iter */
7783 (iternextfunc) 0, /* tp_iternext */
7784 SwigPyBuiltin__pygsl_interp2d_methods, /* tp_methods */
7785 0, /* tp_members */
7786 SwigPyBuiltin__pygsl_interp2d_getset, /* tp_getset */
7787 0, /* tp_base */
7788 0, /* tp_dict */
7789 (descrgetfunc) 0, /* tp_descr_get */
7790 (descrsetfunc) 0, /* tp_descr_set */
7791 (Py_ssize_t) offsetof(SwigPyObject, dict),/* tp_dictoffset */
7792 (initproc) _wrap_new_interp2d, /* tp_init */
7793 (allocfunc) 0, /* tp_alloc */
7794 (newfunc) 0, /* tp_new */
7795 (freefunc) 0, /* tp_free */
7796 (inquiry) 0, /* tp_is_gc */
7797 (PyObject *) 0, /* tp_bases */
7798 (PyObject *) 0, /* tp_mro */
7799 (PyObject *) 0, /* tp_cache */
7800 (PyObject *) 0, /* tp_subclasses */
7801 (PyObject *) 0, /* tp_weaklist */
7802 (destructor) 0, /* tp_del */
7803 #if PY_VERSION_HEX >= 0x02060000
7804 (int) 0, /* tp_version_tag */
7805 #endif
7806 #if PY_VERSION_HEX >= 0x03040000
7807 (destructor) 0, /* tp_finalize */
7808 #endif
7809 #ifdef COUNT_ALLOCS
7810 (Py_ssize_t) 0, /* tp_allocs */
7811 (Py_ssize_t) 0, /* tp_frees */
7812 (Py_ssize_t) 0, /* tp_maxalloc */
7813 #if PY_VERSION_HEX >= 0x02050000
7814 0, /* tp_prev */
7815 #endif
7816 0, /* tp_next */
7817 #endif
7818 },
7819 #if PY_VERSION_HEX >= 0x03050000
7820 {
7821 (unaryfunc) 0, /* am_await */
7822 (unaryfunc) 0, /* am_aiter */
7823 (unaryfunc) 0, /* am_anext */
7824 },
7825 #endif
7826 {
7827 (binaryfunc) 0, /* nb_add */
7828 (binaryfunc) 0, /* nb_subtract */
7829 (binaryfunc) 0, /* nb_multiply */
7830 #if PY_VERSION_HEX < 0x03000000
7831 (binaryfunc) 0, /* nb_divide */
7832 #endif
7833 (binaryfunc) 0, /* nb_remainder */
7834 (binaryfunc) 0, /* nb_divmod */
7835 (ternaryfunc) 0, /* nb_power */
7836 (unaryfunc) 0, /* nb_negative */
7837 (unaryfunc) 0, /* nb_positive */
7838 (unaryfunc) 0, /* nb_absolute */
7839 (inquiry) 0, /* nb_nonzero */
7840 (unaryfunc) 0, /* nb_invert */
7841 (binaryfunc) 0, /* nb_lshift */
7842 (binaryfunc) 0, /* nb_rshift */
7843 (binaryfunc) 0, /* nb_and */
7844 (binaryfunc) 0, /* nb_xor */
7845 (binaryfunc) 0, /* nb_or */
7846 #if PY_VERSION_HEX < 0x03000000
7847 (coercion) 0, /* nb_coerce */
7848 #endif
7849 (unaryfunc) 0, /* nb_int */
7850 #if PY_VERSION_HEX >= 0x03000000
7851 (void *) 0, /* nb_reserved */
7852 #else
7853 (unaryfunc) 0, /* nb_long */
7854 #endif
7855 (unaryfunc) 0, /* nb_float */
7856 #if PY_VERSION_HEX < 0x03000000
7857 (unaryfunc) 0, /* nb_oct */
7858 (unaryfunc) 0, /* nb_hex */
7859 #endif
7860 (binaryfunc) 0, /* nb_inplace_add */
7861 (binaryfunc) 0, /* nb_inplace_subtract */
7862 (binaryfunc) 0, /* nb_inplace_multiply */
7863 #if PY_VERSION_HEX < 0x03000000
7864 (binaryfunc) 0, /* nb_inplace_divide */
7865 #endif
7866 (binaryfunc) 0, /* nb_inplace_remainder */
7867 (ternaryfunc) 0, /* nb_inplace_power */
7868 (binaryfunc) 0, /* nb_inplace_lshift */
7869 (binaryfunc) 0, /* nb_inplace_rshift */
7870 (binaryfunc) 0, /* nb_inplace_and */
7871 (binaryfunc) 0, /* nb_inplace_xor */
7872 (binaryfunc) 0, /* nb_inplace_or */
7873 (binaryfunc) 0, /* nb_floor_divide */
7874 (binaryfunc) 0, /* nb_true_divide */
7875 (binaryfunc) 0, /* nb_inplace_floor_divide */
7876 (binaryfunc) 0, /* nb_inplace_true_divide */
7877 #if PY_VERSION_HEX >= 0x02050000
7878 (unaryfunc) 0, /* nb_index */
7879 #endif
7880 #if PY_VERSION_HEX >= 0x03050000
7881 (binaryfunc) 0, /* nb_matrix_multiply */
7882 (binaryfunc) 0, /* nb_inplace_matrix_multiply */
7883 #endif
7884 },
7885 {
7886 (lenfunc) 0, /* mp_length */
7887 (binaryfunc) 0, /* mp_subscript */
7888 (objobjargproc) 0, /* mp_ass_subscript */
7889 },
7890 {
7891 (lenfunc) 0, /* sq_length */
7892 (binaryfunc) 0, /* sq_concat */
7893 (ssizeargfunc) 0, /* sq_repeat */
7894 (ssizeargfunc) 0, /* sq_item */
7895 #if PY_VERSION_HEX >= 0x03000000
7896 (void *) 0, /* was_sq_slice */
7897 #else
7898 (ssizessizeargfunc) 0, /* sq_slice */
7899 #endif
7900 (ssizeobjargproc) 0, /* sq_ass_item */
7901 #if PY_VERSION_HEX >= 0x03000000
7902 (void *) 0, /* was_sq_ass_slice */
7903 #else
7904 (ssizessizeobjargproc) 0, /* sq_ass_slice */
7905 #endif
7906 (objobjproc) 0, /* sq_contains */
7907 (binaryfunc) 0, /* sq_inplace_concat */
7908 (ssizeargfunc) 0, /* sq_inplace_repeat */
7909 },
7910 {
7911 #if PY_VERSION_HEX < 0x03000000
7912 (readbufferproc) 0, /* bf_getreadbuffer */
7913 (writebufferproc) 0, /* bf_getwritebuffer */
7914 (segcountproc) 0, /* bf_getsegcount */
7915 (charbufferproc) 0, /* bf_getcharbuffer */
7916 #endif
7917 #if PY_VERSION_HEX >= 0x02060000
7918 (getbufferproc) 0, /* bf_getbuffer */
7919 (releasebufferproc) 0, /* bf_releasebuffer */
7920 #endif
7921 },
7922 (PyObject *) 0, /* ht_name */
7923 (PyObject *) 0, /* ht_slots */
7924 #if PY_VERSION_HEX >= 0x03030000
7925 (PyObject *) 0, /* ht_qualname */
7926 0, /* ht_cached_keys */
7927 #endif
7928 };
7929
7930 SWIGINTERN SwigPyClientData SwigPyBuiltin__pygsl_interp2d_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__pygsl_interp2d_type};
7931
7932 static SwigPyGetSet spline2d___dict___getset = { SwigPyObject_get___dict__, 0 };
7933 SWIGINTERN PyGetSetDef SwigPyBuiltin__pygsl_spline2d_getset[] = {
7934 { (char *) "__dict__", (getter) SwigPyBuiltin_FunpackGetterClosure, (setter) 0, (char *)"pygsl_spline2d.__dict__", (void *) &spline2d___dict___getset }
7935 ,
7936 {NULL, NULL, NULL, NULL, NULL} /* Sentinel */
7937 };
7938
7939 SWIGINTERN PyObject *
SwigPyBuiltin__pygsl_spline2d_richcompare(PyObject * self,PyObject * other,int op)7940 SwigPyBuiltin__pygsl_spline2d_richcompare(PyObject *self, PyObject *other, int op) {
7941 PyObject *result = NULL;
7942 if (!result) {
7943 if (SwigPyObject_Check(self) && SwigPyObject_Check(other)) {
7944 result = SwigPyObject_richcompare((SwigPyObject *)self, (SwigPyObject *)other, op);
7945 } else {
7946 result = Py_NotImplemented;
7947 Py_INCREF(result);
7948 }
7949 }
7950 return result;
7951 }
7952
7953 SWIGINTERN PyMethodDef SwigPyBuiltin__pygsl_spline2d_methods[] = {
7954 { "reset", (PyCFunction) _wrap_spline2d_reset, METH_VARARGS|METH_KEYWORDS, (char *) "reset() -> gsl_error_flag_drop" },
7955 { "name", (PyCFunction) _wrap_spline2d_name, METH_VARARGS|METH_KEYWORDS, (char *) "name() -> char const *" },
7956 { "min_size", (PyCFunction) _wrap_spline2d_min_size, METH_VARARGS|METH_KEYWORDS, (char *) "min_size() -> size_t" },
7957 { "init", (PyCFunction) _wrap_spline2d_init, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7958 "init(PyObject * x_o, PyObject * y_o, PyObject * z_o) -> gsl_error_flag_drop\n"
7959 "\n"
7960 "Parameters\n"
7961 "----------\n"
7962 "x_o: PyObject *\n"
7963 "y_o: PyObject *\n"
7964 "z_o: PyObject *\n"
7965 "\n"
7966 "" },
7967 { "get", (PyCFunction) _wrap_spline2d_get, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7968 "get(size_t const i, size_t const j) -> double\n"
7969 "\n"
7970 "Parameters\n"
7971 "----------\n"
7972 "i: size_t const\n"
7973 "j: size_t const\n"
7974 "\n"
7975 "" },
7976 { "set", (PyCFunction) _wrap_spline2d_set, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7977 "set(size_t const i, size_t const j, double z) -> gsl_error_flag_drop\n"
7978 "\n"
7979 "Parameters\n"
7980 "----------\n"
7981 "i: size_t const\n"
7982 "j: size_t const\n"
7983 "z: double\n"
7984 "\n"
7985 "" },
7986 { "eval", (PyCFunction) _wrap_spline2d_eval, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7987 "eval(double const x, double const y) -> double\n"
7988 "\n"
7989 "Parameters\n"
7990 "----------\n"
7991 "x: double const\n"
7992 "y: double const\n"
7993 "\n"
7994 "" },
7995 { "eval_array", (PyCFunction) _wrap_spline2d_eval_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
7996 "eval_array(PyObject * x, PyObject * y) -> PyObject *\n"
7997 "\n"
7998 "Parameters\n"
7999 "----------\n"
8000 "x: PyObject *\n"
8001 "y: PyObject *\n"
8002 "\n"
8003 "" },
8004 { "eval_deriv_x", (PyCFunction) _wrap_spline2d_eval_deriv_x, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8005 "eval_deriv_x(double const x, double const y) -> double\n"
8006 "\n"
8007 "Parameters\n"
8008 "----------\n"
8009 "x: double const\n"
8010 "y: double const\n"
8011 "\n"
8012 "" },
8013 { "eval_deriv_x_array", (PyCFunction) _wrap_spline2d_eval_deriv_x_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8014 "eval_deriv_x_array(PyObject * x, PyObject * y) -> PyObject *\n"
8015 "\n"
8016 "Parameters\n"
8017 "----------\n"
8018 "x: PyObject *\n"
8019 "y: PyObject *\n"
8020 "\n"
8021 "" },
8022 { "eval_deriv_y", (PyCFunction) _wrap_spline2d_eval_deriv_y, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8023 "eval_deriv_y(double const x, double const y) -> double\n"
8024 "\n"
8025 "Parameters\n"
8026 "----------\n"
8027 "x: double const\n"
8028 "y: double const\n"
8029 "\n"
8030 "" },
8031 { "eval_deriv_y_array", (PyCFunction) _wrap_spline2d_eval_deriv_y_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8032 "eval_deriv_y_array(PyObject * x, PyObject * y) -> PyObject *\n"
8033 "\n"
8034 "Parameters\n"
8035 "----------\n"
8036 "x: PyObject *\n"
8037 "y: PyObject *\n"
8038 "\n"
8039 "" },
8040 { "eval_deriv_xx", (PyCFunction) _wrap_spline2d_eval_deriv_xx, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8041 "eval_deriv_xx(double const x, double const y) -> double\n"
8042 "\n"
8043 "Parameters\n"
8044 "----------\n"
8045 "x: double const\n"
8046 "y: double const\n"
8047 "\n"
8048 "" },
8049 { "eval_deriv_xx_array", (PyCFunction) _wrap_spline2d_eval_deriv_xx_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8050 "eval_deriv_xx_array(PyObject * x, PyObject * y) -> PyObject *\n"
8051 "\n"
8052 "Parameters\n"
8053 "----------\n"
8054 "x: PyObject *\n"
8055 "y: PyObject *\n"
8056 "\n"
8057 "" },
8058 { "eval_deriv_xy", (PyCFunction) _wrap_spline2d_eval_deriv_xy, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8059 "eval_deriv_xy(double const x, double const y) -> double\n"
8060 "\n"
8061 "Parameters\n"
8062 "----------\n"
8063 "x: double const\n"
8064 "y: double const\n"
8065 "\n"
8066 "" },
8067 { "eval_deriv_xy_array", (PyCFunction) _wrap_spline2d_eval_deriv_xy_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8068 "eval_deriv_xy_array(PyObject * x, PyObject * y) -> PyObject *\n"
8069 "\n"
8070 "Parameters\n"
8071 "----------\n"
8072 "x: PyObject *\n"
8073 "y: PyObject *\n"
8074 "\n"
8075 "" },
8076 { "eval_deriv_yy", (PyCFunction) _wrap_spline2d_eval_deriv_yy, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8077 "eval_deriv_yy(double const x, double const y) -> double\n"
8078 "\n"
8079 "Parameters\n"
8080 "----------\n"
8081 "x: double const\n"
8082 "y: double const\n"
8083 "\n"
8084 "" },
8085 { "eval_deriv_yy_array", (PyCFunction) _wrap_spline2d_eval_deriv_yy_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8086 "eval_deriv_yy_array(PyObject * x, PyObject * y) -> PyObject *\n"
8087 "\n"
8088 "Parameters\n"
8089 "----------\n"
8090 "x: PyObject *\n"
8091 "y: PyObject *\n"
8092 "\n"
8093 "" },
8094 { "eval_e", (PyCFunction) _wrap_spline2d_eval_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8095 "eval_e(double const x, double const y) -> gsl_error_flag_drop\n"
8096 "\n"
8097 "Parameters\n"
8098 "----------\n"
8099 "x: double const\n"
8100 "y: double const\n"
8101 "\n"
8102 "" },
8103 { "eval_e_array", (PyCFunction) _wrap_spline2d_eval_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8104 "eval_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
8105 "\n"
8106 "Parameters\n"
8107 "----------\n"
8108 "x: PyObject *\n"
8109 "y: PyObject *\n"
8110 "\n"
8111 "" },
8112 { "eval_deriv_x_e", (PyCFunction) _wrap_spline2d_eval_deriv_x_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8113 "eval_deriv_x_e(double const x, double const y) -> gsl_error_flag_drop\n"
8114 "\n"
8115 "Parameters\n"
8116 "----------\n"
8117 "x: double const\n"
8118 "y: double const\n"
8119 "\n"
8120 "" },
8121 { "eval_deriv_x_e_array", (PyCFunction) _wrap_spline2d_eval_deriv_x_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8122 "eval_deriv_x_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
8123 "\n"
8124 "Parameters\n"
8125 "----------\n"
8126 "x: PyObject *\n"
8127 "y: PyObject *\n"
8128 "\n"
8129 "" },
8130 { "eval_deriv_y_e", (PyCFunction) _wrap_spline2d_eval_deriv_y_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8131 "eval_deriv_y_e(double const x, double const y) -> gsl_error_flag_drop\n"
8132 "\n"
8133 "Parameters\n"
8134 "----------\n"
8135 "x: double const\n"
8136 "y: double const\n"
8137 "\n"
8138 "" },
8139 { "eval_deriv_y_e_array", (PyCFunction) _wrap_spline2d_eval_deriv_y_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8140 "eval_deriv_y_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
8141 "\n"
8142 "Parameters\n"
8143 "----------\n"
8144 "x: PyObject *\n"
8145 "y: PyObject *\n"
8146 "\n"
8147 "" },
8148 { "eval_deriv_xx_e", (PyCFunction) _wrap_spline2d_eval_deriv_xx_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8149 "eval_deriv_xx_e(double const x, double const y) -> gsl_error_flag_drop\n"
8150 "\n"
8151 "Parameters\n"
8152 "----------\n"
8153 "x: double const\n"
8154 "y: double const\n"
8155 "\n"
8156 "" },
8157 { "eval_deriv_xx_e_array", (PyCFunction) _wrap_spline2d_eval_deriv_xx_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8158 "eval_deriv_xx_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
8159 "\n"
8160 "Parameters\n"
8161 "----------\n"
8162 "x: PyObject *\n"
8163 "y: PyObject *\n"
8164 "\n"
8165 "" },
8166 { "eval_deriv_xy_e", (PyCFunction) _wrap_spline2d_eval_deriv_xy_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8167 "eval_deriv_xy_e(double const x, double const y) -> gsl_error_flag_drop\n"
8168 "\n"
8169 "Parameters\n"
8170 "----------\n"
8171 "x: double const\n"
8172 "y: double const\n"
8173 "\n"
8174 "" },
8175 { "eval_deriv_xy_e_array", (PyCFunction) _wrap_spline2d_eval_deriv_xy_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8176 "eval_deriv_xy_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
8177 "\n"
8178 "Parameters\n"
8179 "----------\n"
8180 "x: PyObject *\n"
8181 "y: PyObject *\n"
8182 "\n"
8183 "" },
8184 { "eval_deriv_yy_e", (PyCFunction) _wrap_spline2d_eval_deriv_yy_e, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8185 "eval_deriv_yy_e(double const x, double const y) -> gsl_error_flag_drop\n"
8186 "\n"
8187 "Parameters\n"
8188 "----------\n"
8189 "x: double const\n"
8190 "y: double const\n"
8191 "\n"
8192 "" },
8193 { "eval_deriv_yy_e_array", (PyCFunction) _wrap_spline2d_eval_deriv_yy_e_array, METH_VARARGS|METH_KEYWORDS, (char *) "\n"
8194 "eval_deriv_yy_e_array(PyObject * x, PyObject * y) -> PyObject *\n"
8195 "\n"
8196 "Parameters\n"
8197 "----------\n"
8198 "x: PyObject *\n"
8199 "y: PyObject *\n"
8200 "\n"
8201 "" },
8202 { NULL, NULL, 0, NULL } /* Sentinel */
8203 };
8204
8205 static PyHeapTypeObject SwigPyBuiltin__pygsl_spline2d_type = {
8206 {
8207 #if PY_VERSION_HEX >= 0x03000000
8208 PyVarObject_HEAD_INIT(NULL, 0)
8209 #else
8210 PyObject_HEAD_INIT(NULL)
8211 0, /* ob_size */
8212 #endif
8213 "interpolation2d_wrap.spline2d", /* tp_name */
8214 sizeof(SwigPyObject), /* tp_basicsize */
8215 0, /* tp_itemsize */
8216 (destructor) (destructor) _wrap_delete_spline2d_destructor_closure,/* tp_dealloc */
8217 (printfunc) 0, /* tp_print */
8218 (getattrfunc) 0, /* tp_getattr */
8219 (setattrfunc) 0, /* tp_setattr */
8220 #if PY_VERSION_HEX >= 0x03000000
8221 0, /* tp_compare */
8222 #else
8223 (cmpfunc) 0, /* tp_compare */
8224 #endif
8225 (reprfunc) 0, /* tp_repr */
8226 &SwigPyBuiltin__pygsl_spline2d_type.as_number, /* tp_as_number */
8227 &SwigPyBuiltin__pygsl_spline2d_type.as_sequence, /* tp_as_sequence */
8228 &SwigPyBuiltin__pygsl_spline2d_type.as_mapping, /* tp_as_mapping */
8229 (hashfunc) SwigPyObject_hash, /* tp_hash */
8230 (ternaryfunc) 0, /* tp_call */
8231 (reprfunc) 0, /* tp_str */
8232 (getattrofunc) 0, /* tp_getattro */
8233 (setattrofunc) 0, /* tp_setattro */
8234 &SwigPyBuiltin__pygsl_spline2d_type.as_buffer, /* tp_as_buffer */
8235 #if PY_VERSION_HEX >= 0x03000000
8236 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, /* tp_flags */
8237 #else
8238 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_CHECKTYPES, /* tp_flags */
8239 #endif
8240 "::pygsl_spline2d", /* tp_doc */
8241 (traverseproc) 0, /* tp_traverse */
8242 (inquiry) 0, /* tp_clear */
8243 (richcmpfunc) SwigPyBuiltin__pygsl_spline2d_richcompare, /* tp_richcompare */
8244 0, /* tp_weaklistoffset */
8245 (getiterfunc) 0, /* tp_iter */
8246 (iternextfunc) 0, /* tp_iternext */
8247 SwigPyBuiltin__pygsl_spline2d_methods, /* tp_methods */
8248 0, /* tp_members */
8249 SwigPyBuiltin__pygsl_spline2d_getset, /* tp_getset */
8250 0, /* tp_base */
8251 0, /* tp_dict */
8252 (descrgetfunc) 0, /* tp_descr_get */
8253 (descrsetfunc) 0, /* tp_descr_set */
8254 (Py_ssize_t) offsetof(SwigPyObject, dict),/* tp_dictoffset */
8255 (initproc) _wrap_new_spline2d, /* tp_init */
8256 (allocfunc) 0, /* tp_alloc */
8257 (newfunc) 0, /* tp_new */
8258 (freefunc) 0, /* tp_free */
8259 (inquiry) 0, /* tp_is_gc */
8260 (PyObject *) 0, /* tp_bases */
8261 (PyObject *) 0, /* tp_mro */
8262 (PyObject *) 0, /* tp_cache */
8263 (PyObject *) 0, /* tp_subclasses */
8264 (PyObject *) 0, /* tp_weaklist */
8265 (destructor) 0, /* tp_del */
8266 #if PY_VERSION_HEX >= 0x02060000
8267 (int) 0, /* tp_version_tag */
8268 #endif
8269 #if PY_VERSION_HEX >= 0x03040000
8270 (destructor) 0, /* tp_finalize */
8271 #endif
8272 #ifdef COUNT_ALLOCS
8273 (Py_ssize_t) 0, /* tp_allocs */
8274 (Py_ssize_t) 0, /* tp_frees */
8275 (Py_ssize_t) 0, /* tp_maxalloc */
8276 #if PY_VERSION_HEX >= 0x02050000
8277 0, /* tp_prev */
8278 #endif
8279 0, /* tp_next */
8280 #endif
8281 },
8282 #if PY_VERSION_HEX >= 0x03050000
8283 {
8284 (unaryfunc) 0, /* am_await */
8285 (unaryfunc) 0, /* am_aiter */
8286 (unaryfunc) 0, /* am_anext */
8287 },
8288 #endif
8289 {
8290 (binaryfunc) 0, /* nb_add */
8291 (binaryfunc) 0, /* nb_subtract */
8292 (binaryfunc) 0, /* nb_multiply */
8293 #if PY_VERSION_HEX < 0x03000000
8294 (binaryfunc) 0, /* nb_divide */
8295 #endif
8296 (binaryfunc) 0, /* nb_remainder */
8297 (binaryfunc) 0, /* nb_divmod */
8298 (ternaryfunc) 0, /* nb_power */
8299 (unaryfunc) 0, /* nb_negative */
8300 (unaryfunc) 0, /* nb_positive */
8301 (unaryfunc) 0, /* nb_absolute */
8302 (inquiry) 0, /* nb_nonzero */
8303 (unaryfunc) 0, /* nb_invert */
8304 (binaryfunc) 0, /* nb_lshift */
8305 (binaryfunc) 0, /* nb_rshift */
8306 (binaryfunc) 0, /* nb_and */
8307 (binaryfunc) 0, /* nb_xor */
8308 (binaryfunc) 0, /* nb_or */
8309 #if PY_VERSION_HEX < 0x03000000
8310 (coercion) 0, /* nb_coerce */
8311 #endif
8312 (unaryfunc) 0, /* nb_int */
8313 #if PY_VERSION_HEX >= 0x03000000
8314 (void *) 0, /* nb_reserved */
8315 #else
8316 (unaryfunc) 0, /* nb_long */
8317 #endif
8318 (unaryfunc) 0, /* nb_float */
8319 #if PY_VERSION_HEX < 0x03000000
8320 (unaryfunc) 0, /* nb_oct */
8321 (unaryfunc) 0, /* nb_hex */
8322 #endif
8323 (binaryfunc) 0, /* nb_inplace_add */
8324 (binaryfunc) 0, /* nb_inplace_subtract */
8325 (binaryfunc) 0, /* nb_inplace_multiply */
8326 #if PY_VERSION_HEX < 0x03000000
8327 (binaryfunc) 0, /* nb_inplace_divide */
8328 #endif
8329 (binaryfunc) 0, /* nb_inplace_remainder */
8330 (ternaryfunc) 0, /* nb_inplace_power */
8331 (binaryfunc) 0, /* nb_inplace_lshift */
8332 (binaryfunc) 0, /* nb_inplace_rshift */
8333 (binaryfunc) 0, /* nb_inplace_and */
8334 (binaryfunc) 0, /* nb_inplace_xor */
8335 (binaryfunc) 0, /* nb_inplace_or */
8336 (binaryfunc) 0, /* nb_floor_divide */
8337 (binaryfunc) 0, /* nb_true_divide */
8338 (binaryfunc) 0, /* nb_inplace_floor_divide */
8339 (binaryfunc) 0, /* nb_inplace_true_divide */
8340 #if PY_VERSION_HEX >= 0x02050000
8341 (unaryfunc) 0, /* nb_index */
8342 #endif
8343 #if PY_VERSION_HEX >= 0x03050000
8344 (binaryfunc) 0, /* nb_matrix_multiply */
8345 (binaryfunc) 0, /* nb_inplace_matrix_multiply */
8346 #endif
8347 },
8348 {
8349 (lenfunc) 0, /* mp_length */
8350 (binaryfunc) 0, /* mp_subscript */
8351 (objobjargproc) 0, /* mp_ass_subscript */
8352 },
8353 {
8354 (lenfunc) 0, /* sq_length */
8355 (binaryfunc) 0, /* sq_concat */
8356 (ssizeargfunc) 0, /* sq_repeat */
8357 (ssizeargfunc) 0, /* sq_item */
8358 #if PY_VERSION_HEX >= 0x03000000
8359 (void *) 0, /* was_sq_slice */
8360 #else
8361 (ssizessizeargfunc) 0, /* sq_slice */
8362 #endif
8363 (ssizeobjargproc) 0, /* sq_ass_item */
8364 #if PY_VERSION_HEX >= 0x03000000
8365 (void *) 0, /* was_sq_ass_slice */
8366 #else
8367 (ssizessizeobjargproc) 0, /* sq_ass_slice */
8368 #endif
8369 (objobjproc) 0, /* sq_contains */
8370 (binaryfunc) 0, /* sq_inplace_concat */
8371 (ssizeargfunc) 0, /* sq_inplace_repeat */
8372 },
8373 {
8374 #if PY_VERSION_HEX < 0x03000000
8375 (readbufferproc) 0, /* bf_getreadbuffer */
8376 (writebufferproc) 0, /* bf_getwritebuffer */
8377 (segcountproc) 0, /* bf_getsegcount */
8378 (charbufferproc) 0, /* bf_getcharbuffer */
8379 #endif
8380 #if PY_VERSION_HEX >= 0x02060000
8381 (getbufferproc) 0, /* bf_getbuffer */
8382 (releasebufferproc) 0, /* bf_releasebuffer */
8383 #endif
8384 },
8385 (PyObject *) 0, /* ht_name */
8386 (PyObject *) 0, /* ht_slots */
8387 #if PY_VERSION_HEX >= 0x03030000
8388 (PyObject *) 0, /* ht_qualname */
8389 0, /* ht_cached_keys */
8390 #endif
8391 };
8392
8393 SWIGINTERN SwigPyClientData SwigPyBuiltin__pygsl_spline2d_clientdata = {0, 0, 0, 0, 0, 0, (PyTypeObject *)&SwigPyBuiltin__pygsl_spline2d_type};
8394
8395
8396 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
8397
8398 static swig_type_info _swigt__p_SwigPyObject = {"_p_SwigPyObject", "SwigPyObject *", 0, 0, (void*)0, 0};
8399 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
8400 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
8401 static swig_type_info _swigt__p_gsl_interp2d_type = {"_p_gsl_interp2d_type", "gsl_interp2d_type *", 0, 0, (void*)0, 0};
8402 static swig_type_info _swigt__p_pygsl_interp2d = {"_p_pygsl_interp2d", "pygsl_interp2d *", 0, 0, (void*)&SwigPyBuiltin__pygsl_interp2d_clientdata, 0};
8403 static swig_type_info _swigt__p_pygsl_spline2d = {"_p_pygsl_spline2d", "pygsl_spline2d *", 0, 0, (void*)&SwigPyBuiltin__pygsl_spline2d_clientdata, 0};
8404 static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
8405
8406 static swig_type_info *swig_type_initial[] = {
8407 &_swigt__p_SwigPyObject,
8408 &_swigt__p_char,
8409 &_swigt__p_double,
8410 &_swigt__p_gsl_interp2d_type,
8411 &_swigt__p_pygsl_interp2d,
8412 &_swigt__p_pygsl_spline2d,
8413 &_swigt__p_void,
8414 };
8415
8416 static swig_cast_info _swigc__p_SwigPyObject[] = { {&_swigt__p_SwigPyObject, 0, 0, 0},{0, 0, 0, 0}};
8417 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
8418 static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
8419 static swig_cast_info _swigc__p_gsl_interp2d_type[] = { {&_swigt__p_gsl_interp2d_type, 0, 0, 0},{0, 0, 0, 0}};
8420 static swig_cast_info _swigc__p_pygsl_interp2d[] = { {&_swigt__p_pygsl_interp2d, 0, 0, 0},{0, 0, 0, 0}};
8421 static swig_cast_info _swigc__p_pygsl_spline2d[] = { {&_swigt__p_pygsl_spline2d, 0, 0, 0},{0, 0, 0, 0}};
8422 static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
8423
8424 static swig_cast_info *swig_cast_initial[] = {
8425 _swigc__p_SwigPyObject,
8426 _swigc__p_char,
8427 _swigc__p_double,
8428 _swigc__p_gsl_interp2d_type,
8429 _swigc__p_pygsl_interp2d,
8430 _swigc__p_pygsl_spline2d,
8431 _swigc__p_void,
8432 };
8433
8434
8435 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
8436
8437 static swig_const_info swig_const_table[] = {
8438 {0, 0, 0, 0.0, 0, 0}};
8439
8440 #ifdef __cplusplus
8441 }
8442 #endif
8443 static PyTypeObject *builtin_bases[2];
8444
8445 /* -----------------------------------------------------------------------------
8446 * Type initialization:
8447 * This problem is tough by the requirement that no dynamic
8448 * memory is used. Also, since swig_type_info structures store pointers to
8449 * swig_cast_info structures and swig_cast_info structures store pointers back
8450 * to swig_type_info structures, we need some lookup code at initialization.
8451 * The idea is that swig generates all the structures that are needed.
8452 * The runtime then collects these partially filled structures.
8453 * The SWIG_InitializeModule function takes these initial arrays out of
8454 * swig_module, and does all the lookup, filling in the swig_module.types
8455 * array with the correct data and linking the correct swig_cast_info
8456 * structures together.
8457 *
8458 * The generated swig_type_info structures are assigned statically to an initial
8459 * array. We just loop through that array, and handle each type individually.
8460 * First we lookup if this type has been already loaded, and if so, use the
8461 * loaded structure instead of the generated one. Then we have to fill in the
8462 * cast linked list. The cast data is initially stored in something like a
8463 * two-dimensional array. Each row corresponds to a type (there are the same
8464 * number of rows as there are in the swig_type_initial array). Each entry in
8465 * a column is one of the swig_cast_info structures for that type.
8466 * The cast_initial array is actually an array of arrays, because each row has
8467 * a variable number of columns. So to actually build the cast linked list,
8468 * we find the array of casts associated with the type, and loop through it
8469 * adding the casts to the list. The one last trick we need to do is making
8470 * sure the type pointer in the swig_cast_info struct is correct.
8471 *
8472 * First off, we lookup the cast->type name to see if it is already loaded.
8473 * There are three cases to handle:
8474 * 1) If the cast->type has already been loaded AND the type we are adding
8475 * casting info to has not been loaded (it is in this module), THEN we
8476 * replace the cast->type pointer with the type pointer that has already
8477 * been loaded.
8478 * 2) If BOTH types (the one we are adding casting info to, and the
8479 * cast->type) are loaded, THEN the cast info has already been loaded by
8480 * the previous module so we just ignore it.
8481 * 3) Finally, if cast->type has not already been loaded, then we add that
8482 * swig_cast_info to the linked list (because the cast->type) pointer will
8483 * be correct.
8484 * ----------------------------------------------------------------------------- */
8485
8486 #ifdef __cplusplus
8487 extern "C" {
8488 #if 0
8489 } /* c-mode */
8490 #endif
8491 #endif
8492
8493 #if 0
8494 #define SWIGRUNTIME_DEBUG
8495 #endif
8496
8497
8498 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)8499 SWIG_InitializeModule(void *clientdata) {
8500 size_t i;
8501 swig_module_info *module_head, *iter;
8502 int init;
8503
8504 /* check to see if the circular list has been setup, if not, set it up */
8505 if (swig_module.next==0) {
8506 /* Initialize the swig_module */
8507 swig_module.type_initial = swig_type_initial;
8508 swig_module.cast_initial = swig_cast_initial;
8509 swig_module.next = &swig_module;
8510 init = 1;
8511 } else {
8512 init = 0;
8513 }
8514
8515 /* Try and load any already created modules */
8516 module_head = SWIG_GetModule(clientdata);
8517 if (!module_head) {
8518 /* This is the first module loaded for this interpreter */
8519 /* so set the swig module into the interpreter */
8520 SWIG_SetModule(clientdata, &swig_module);
8521 } else {
8522 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
8523 iter=module_head;
8524 do {
8525 if (iter==&swig_module) {
8526 /* Our module is already in the list, so there's nothing more to do. */
8527 return;
8528 }
8529 iter=iter->next;
8530 } while (iter!= module_head);
8531
8532 /* otherwise we must add our module into the list */
8533 swig_module.next = module_head->next;
8534 module_head->next = &swig_module;
8535 }
8536
8537 /* When multiple interpreters are used, a module could have already been initialized in
8538 a different interpreter, but not yet have a pointer in this interpreter.
8539 In this case, we do not want to continue adding types... everything should be
8540 set up already */
8541 if (init == 0) return;
8542
8543 /* Now work on filling in swig_module.types */
8544 #ifdef SWIGRUNTIME_DEBUG
8545 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
8546 #endif
8547 for (i = 0; i < swig_module.size; ++i) {
8548 swig_type_info *type = 0;
8549 swig_type_info *ret;
8550 swig_cast_info *cast;
8551
8552 #ifdef SWIGRUNTIME_DEBUG
8553 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8554 #endif
8555
8556 /* if there is another module already loaded */
8557 if (swig_module.next != &swig_module) {
8558 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
8559 }
8560 if (type) {
8561 /* Overwrite clientdata field */
8562 #ifdef SWIGRUNTIME_DEBUG
8563 printf("SWIG_InitializeModule: found type %s\n", type->name);
8564 #endif
8565 if (swig_module.type_initial[i]->clientdata) {
8566 type->clientdata = swig_module.type_initial[i]->clientdata;
8567 #ifdef SWIGRUNTIME_DEBUG
8568 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
8569 #endif
8570 }
8571 } else {
8572 type = swig_module.type_initial[i];
8573 }
8574
8575 /* Insert casting types */
8576 cast = swig_module.cast_initial[i];
8577 while (cast->type) {
8578 /* Don't need to add information already in the list */
8579 ret = 0;
8580 #ifdef SWIGRUNTIME_DEBUG
8581 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
8582 #endif
8583 if (swig_module.next != &swig_module) {
8584 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
8585 #ifdef SWIGRUNTIME_DEBUG
8586 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
8587 #endif
8588 }
8589 if (ret) {
8590 if (type == swig_module.type_initial[i]) {
8591 #ifdef SWIGRUNTIME_DEBUG
8592 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
8593 #endif
8594 cast->type = ret;
8595 ret = 0;
8596 } else {
8597 /* Check for casting already in the list */
8598 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
8599 #ifdef SWIGRUNTIME_DEBUG
8600 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
8601 #endif
8602 if (!ocast) ret = 0;
8603 }
8604 }
8605
8606 if (!ret) {
8607 #ifdef SWIGRUNTIME_DEBUG
8608 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
8609 #endif
8610 if (type->cast) {
8611 type->cast->prev = cast;
8612 cast->next = type->cast;
8613 }
8614 type->cast = cast;
8615 }
8616 cast++;
8617 }
8618 /* Set entry in modules->types array equal to the type */
8619 swig_module.types[i] = type;
8620 }
8621 swig_module.types[i] = 0;
8622
8623 #ifdef SWIGRUNTIME_DEBUG
8624 printf("**** SWIG_InitializeModule: Cast List ******\n");
8625 for (i = 0; i < swig_module.size; ++i) {
8626 int j = 0;
8627 swig_cast_info *cast = swig_module.cast_initial[i];
8628 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
8629 while (cast->type) {
8630 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
8631 cast++;
8632 ++j;
8633 }
8634 printf("---- Total casts: %d\n",j);
8635 }
8636 printf("**** SWIG_InitializeModule: Cast List ******\n");
8637 #endif
8638 }
8639
8640 /* This function will propagate the clientdata field of type to
8641 * any new swig_type_info structures that have been added into the list
8642 * of equivalent types. It is like calling
8643 * SWIG_TypeClientData(type, clientdata) a second time.
8644 */
8645 SWIGRUNTIME void
SWIG_PropagateClientData(void)8646 SWIG_PropagateClientData(void) {
8647 size_t i;
8648 swig_cast_info *equiv;
8649 static int init_run = 0;
8650
8651 if (init_run) return;
8652 init_run = 1;
8653
8654 for (i = 0; i < swig_module.size; i++) {
8655 if (swig_module.types[i]->clientdata) {
8656 equiv = swig_module.types[i]->cast;
8657 while (equiv) {
8658 if (!equiv->converter) {
8659 if (equiv->type && !equiv->type->clientdata)
8660 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
8661 }
8662 equiv = equiv->next;
8663 }
8664 }
8665 }
8666 }
8667
8668 #ifdef __cplusplus
8669 #if 0
8670 {
8671 /* c-mode */
8672 #endif
8673 }
8674 #endif
8675
8676
8677
8678 #ifdef __cplusplus
8679 extern "C" {
8680 #endif
8681
8682 /* Python-specific SWIG API */
8683 #define SWIG_newvarlink() SWIG_Python_newvarlink()
8684 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
8685 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
8686
8687 /* -----------------------------------------------------------------------------
8688 * global variable support code.
8689 * ----------------------------------------------------------------------------- */
8690
8691 typedef struct swig_globalvar {
8692 char *name; /* Name of global variable */
8693 PyObject *(*get_attr)(void); /* Return the current value */
8694 int (*set_attr)(PyObject *); /* Set the value */
8695 struct swig_globalvar *next;
8696 } swig_globalvar;
8697
8698 typedef struct swig_varlinkobject {
8699 PyObject_HEAD
8700 swig_globalvar *vars;
8701 } swig_varlinkobject;
8702
8703 SWIGINTERN PyObject *
swig_varlink_repr(swig_varlinkobject * SWIGUNUSEDPARM (v))8704 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
8705 #if PY_VERSION_HEX >= 0x03000000
8706 return PyUnicode_InternFromString("<Swig global variables>");
8707 #else
8708 return PyString_FromString("<Swig global variables>");
8709 #endif
8710 }
8711
8712 SWIGINTERN PyObject *
swig_varlink_str(swig_varlinkobject * v)8713 swig_varlink_str(swig_varlinkobject *v) {
8714 #if PY_VERSION_HEX >= 0x03000000
8715 PyObject *str = PyUnicode_InternFromString("(");
8716 PyObject *tail;
8717 PyObject *joined;
8718 swig_globalvar *var;
8719 for (var = v->vars; var; var=var->next) {
8720 tail = PyUnicode_FromString(var->name);
8721 joined = PyUnicode_Concat(str, tail);
8722 Py_DecRef(str);
8723 Py_DecRef(tail);
8724 str = joined;
8725 if (var->next) {
8726 tail = PyUnicode_InternFromString(", ");
8727 joined = PyUnicode_Concat(str, tail);
8728 Py_DecRef(str);
8729 Py_DecRef(tail);
8730 str = joined;
8731 }
8732 }
8733 tail = PyUnicode_InternFromString(")");
8734 joined = PyUnicode_Concat(str, tail);
8735 Py_DecRef(str);
8736 Py_DecRef(tail);
8737 str = joined;
8738 #else
8739 PyObject *str = PyString_FromString("(");
8740 swig_globalvar *var;
8741 for (var = v->vars; var; var=var->next) {
8742 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
8743 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
8744 }
8745 PyString_ConcatAndDel(&str,PyString_FromString(")"));
8746 #endif
8747 return str;
8748 }
8749
8750 SWIGINTERN int
swig_varlink_print(swig_varlinkobject * v,FILE * fp,int SWIGUNUSEDPARM (flags))8751 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
8752 char *tmp;
8753 PyObject *str = swig_varlink_str(v);
8754 fprintf(fp,"Swig global variables ");
8755 fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
8756 SWIG_Python_str_DelForPy3(tmp);
8757 Py_DECREF(str);
8758 return 0;
8759 }
8760
8761 SWIGINTERN void
swig_varlink_dealloc(swig_varlinkobject * v)8762 swig_varlink_dealloc(swig_varlinkobject *v) {
8763 swig_globalvar *var = v->vars;
8764 while (var) {
8765 swig_globalvar *n = var->next;
8766 free(var->name);
8767 free(var);
8768 var = n;
8769 }
8770 }
8771
8772 SWIGINTERN PyObject *
swig_varlink_getattr(swig_varlinkobject * v,char * n)8773 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
8774 PyObject *res = NULL;
8775 swig_globalvar *var = v->vars;
8776 while (var) {
8777 if (strcmp(var->name,n) == 0) {
8778 res = (*var->get_attr)();
8779 break;
8780 }
8781 var = var->next;
8782 }
8783 if (res == NULL && !PyErr_Occurred()) {
8784 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
8785 }
8786 return res;
8787 }
8788
8789 SWIGINTERN int
swig_varlink_setattr(swig_varlinkobject * v,char * n,PyObject * p)8790 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
8791 int res = 1;
8792 swig_globalvar *var = v->vars;
8793 while (var) {
8794 if (strcmp(var->name,n) == 0) {
8795 res = (*var->set_attr)(p);
8796 break;
8797 }
8798 var = var->next;
8799 }
8800 if (res == 1 && !PyErr_Occurred()) {
8801 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
8802 }
8803 return res;
8804 }
8805
8806 SWIGINTERN PyTypeObject*
swig_varlink_type(void)8807 swig_varlink_type(void) {
8808 static char varlink__doc__[] = "Swig var link object";
8809 static PyTypeObject varlink_type;
8810 static int type_init = 0;
8811 if (!type_init) {
8812 const PyTypeObject tmp = {
8813 #if PY_VERSION_HEX >= 0x03000000
8814 PyVarObject_HEAD_INIT(NULL, 0)
8815 #else
8816 PyObject_HEAD_INIT(NULL)
8817 0, /* ob_size */
8818 #endif
8819 (char *)"swigvarlink", /* tp_name */
8820 sizeof(swig_varlinkobject), /* tp_basicsize */
8821 0, /* tp_itemsize */
8822 (destructor) swig_varlink_dealloc, /* tp_dealloc */
8823 (printfunc) swig_varlink_print, /* tp_print */
8824 (getattrfunc) swig_varlink_getattr, /* tp_getattr */
8825 (setattrfunc) swig_varlink_setattr, /* tp_setattr */
8826 0, /* tp_compare */
8827 (reprfunc) swig_varlink_repr, /* tp_repr */
8828 0, /* tp_as_number */
8829 0, /* tp_as_sequence */
8830 0, /* tp_as_mapping */
8831 0, /* tp_hash */
8832 0, /* tp_call */
8833 (reprfunc) swig_varlink_str, /* tp_str */
8834 0, /* tp_getattro */
8835 0, /* tp_setattro */
8836 0, /* tp_as_buffer */
8837 0, /* tp_flags */
8838 varlink__doc__, /* tp_doc */
8839 0, /* tp_traverse */
8840 0, /* tp_clear */
8841 0, /* tp_richcompare */
8842 0, /* tp_weaklistoffset */
8843 #if PY_VERSION_HEX >= 0x02020000
8844 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
8845 #endif
8846 #if PY_VERSION_HEX >= 0x02030000
8847 0, /* tp_del */
8848 #endif
8849 #if PY_VERSION_HEX >= 0x02060000
8850 0, /* tp_version_tag */
8851 #endif
8852 #if PY_VERSION_HEX >= 0x03040000
8853 0, /* tp_finalize */
8854 #endif
8855 #ifdef COUNT_ALLOCS
8856 0, /* tp_allocs */
8857 0, /* tp_frees */
8858 0, /* tp_maxalloc */
8859 #if PY_VERSION_HEX >= 0x02050000
8860 0, /* tp_prev */
8861 #endif
8862 0 /* tp_next */
8863 #endif
8864 };
8865 varlink_type = tmp;
8866 type_init = 1;
8867 #if PY_VERSION_HEX < 0x02020000
8868 varlink_type.ob_type = &PyType_Type;
8869 #else
8870 if (PyType_Ready(&varlink_type) < 0)
8871 return NULL;
8872 #endif
8873 }
8874 return &varlink_type;
8875 }
8876
8877 /* Create a variable linking object for use later */
8878 SWIGINTERN PyObject *
SWIG_Python_newvarlink(void)8879 SWIG_Python_newvarlink(void) {
8880 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
8881 if (result) {
8882 result->vars = 0;
8883 }
8884 return ((PyObject*) result);
8885 }
8886
8887 SWIGINTERN void
SWIG_Python_addvarlink(PyObject * p,char * name,PyObject * (* get_attr)(void),int (* set_attr)(PyObject * p))8888 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
8889 swig_varlinkobject *v = (swig_varlinkobject *) p;
8890 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
8891 if (gv) {
8892 size_t size = strlen(name)+1;
8893 gv->name = (char *)malloc(size);
8894 if (gv->name) {
8895 strncpy(gv->name,name,size);
8896 gv->get_attr = get_attr;
8897 gv->set_attr = set_attr;
8898 gv->next = v->vars;
8899 }
8900 }
8901 v->vars = gv;
8902 }
8903
8904 SWIGINTERN PyObject *
SWIG_globals(void)8905 SWIG_globals(void) {
8906 static PyObject *_SWIG_globals = 0;
8907 if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
8908 return _SWIG_globals;
8909 }
8910
8911 /* -----------------------------------------------------------------------------
8912 * constants/methods manipulation
8913 * ----------------------------------------------------------------------------- */
8914
8915 /* Install Constants */
8916 SWIGINTERN void
SWIG_Python_InstallConstants(PyObject * d,swig_const_info constants[])8917 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
8918 PyObject *obj = 0;
8919 size_t i;
8920 for (i = 0; constants[i].type; ++i) {
8921 switch(constants[i].type) {
8922 case SWIG_PY_POINTER:
8923 obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
8924 break;
8925 case SWIG_PY_BINARY:
8926 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
8927 break;
8928 default:
8929 obj = 0;
8930 break;
8931 }
8932 if (obj) {
8933 PyDict_SetItemString(d, constants[i].name, obj);
8934 Py_DECREF(obj);
8935 }
8936 }
8937 }
8938
8939 /* -----------------------------------------------------------------------------*/
8940 /* Fix SwigMethods to carry the callback ptrs when needed */
8941 /* -----------------------------------------------------------------------------*/
8942
8943 SWIGINTERN void
SWIG_Python_FixMethods(PyMethodDef * methods,swig_const_info * const_table,swig_type_info ** types,swig_type_info ** types_initial)8944 SWIG_Python_FixMethods(PyMethodDef *methods,
8945 swig_const_info *const_table,
8946 swig_type_info **types,
8947 swig_type_info **types_initial) {
8948 size_t i;
8949 for (i = 0; methods[i].ml_name; ++i) {
8950 const char *c = methods[i].ml_doc;
8951 if (!c) continue;
8952 c = strstr(c, "swig_ptr: ");
8953 if (c) {
8954 int j;
8955 swig_const_info *ci = 0;
8956 const char *name = c + 10;
8957 for (j = 0; const_table[j].type; ++j) {
8958 if (strncmp(const_table[j].name, name,
8959 strlen(const_table[j].name)) == 0) {
8960 ci = &(const_table[j]);
8961 break;
8962 }
8963 }
8964 if (ci) {
8965 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
8966 if (ptr) {
8967 size_t shift = (ci->ptype) - types;
8968 swig_type_info *ty = types_initial[shift];
8969 size_t ldoc = (c - methods[i].ml_doc);
8970 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
8971 char *ndoc = (char*)malloc(ldoc + lptr + 10);
8972 if (ndoc) {
8973 char *buff = ndoc;
8974 strncpy(buff, methods[i].ml_doc, ldoc);
8975 buff += ldoc;
8976 strncpy(buff, "swig_ptr: ", 10);
8977 buff += 10;
8978 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
8979 methods[i].ml_doc = ndoc;
8980 }
8981 }
8982 }
8983 }
8984 }
8985 }
8986
8987 #ifdef __cplusplus
8988 }
8989 #endif
8990
8991 /* -----------------------------------------------------------------------------*
8992 * Partial Init method
8993 * -----------------------------------------------------------------------------*/
8994
8995 #ifdef __cplusplus
8996 extern "C"
8997 #endif
8998
8999 SWIGEXPORT
9000 #if PY_VERSION_HEX >= 0x03000000
9001 PyObject*
9002 #else
9003 void
9004 #endif
SWIG_init(void)9005 SWIG_init(void) {
9006 PyObject *m, *d, *md;
9007 #if PY_VERSION_HEX >= 0x03000000
9008 static struct PyModuleDef SWIG_module = {
9009 # if PY_VERSION_HEX >= 0x03020000
9010 PyModuleDef_HEAD_INIT,
9011 # else
9012 {
9013 PyObject_HEAD_INIT(NULL)
9014 NULL, /* m_init */
9015 0, /* m_index */
9016 NULL, /* m_copy */
9017 },
9018 # endif
9019 (char *) SWIG_name,
9020 NULL,
9021 -1,
9022 SwigMethods,
9023 NULL,
9024 NULL,
9025 NULL,
9026 NULL
9027 };
9028 #endif
9029
9030 #if defined(SWIGPYTHON_BUILTIN)
9031 static SwigPyClientData SwigPyObject_clientdata = {
9032 0, 0, 0, 0, 0, 0, 0
9033 };
9034 static PyGetSetDef this_getset_def = {
9035 (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
9036 };
9037 static SwigPyGetSet thisown_getset_closure = {
9038 (PyCFunction) SwigPyObject_own,
9039 (PyCFunction) SwigPyObject_own
9040 };
9041 static PyGetSetDef thisown_getset_def = {
9042 (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
9043 };
9044 PyTypeObject *builtin_pytype;
9045 int builtin_base_count;
9046 swig_type_info *builtin_basetype;
9047 PyObject *tuple;
9048 PyGetSetDescrObject *static_getset;
9049 PyTypeObject *metatype;
9050 PyTypeObject *swigpyobject;
9051 SwigPyClientData *cd;
9052 PyObject *public_interface, *public_symbol;
9053 PyObject *this_descr;
9054 PyObject *thisown_descr;
9055 PyObject *self = 0;
9056 int i;
9057
9058 (void)builtin_pytype;
9059 (void)builtin_base_count;
9060 (void)builtin_basetype;
9061 (void)tuple;
9062 (void)static_getset;
9063 (void)self;
9064
9065 /* Metaclass is used to implement static member variables */
9066 metatype = SwigPyObjectType();
9067 assert(metatype);
9068 #endif
9069
9070 /* Fix SwigMethods to carry the callback ptrs when needed */
9071 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
9072
9073 #if PY_VERSION_HEX >= 0x03000000
9074 m = PyModule_Create(&SWIG_module);
9075 #else
9076 m = Py_InitModule((char *) SWIG_name, SwigMethods);
9077 #endif
9078
9079 md = d = PyModule_GetDict(m);
9080 (void)md;
9081
9082 SWIG_InitializeModule(0);
9083
9084 #ifdef SWIGPYTHON_BUILTIN
9085 swigpyobject = SwigPyObject_TypeOnce();
9086
9087 SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
9088 assert(SwigPyObject_stype);
9089 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
9090 if (!cd) {
9091 SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
9092 SwigPyObject_clientdata.pytype = swigpyobject;
9093 } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
9094 PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
9095 # if PY_VERSION_HEX >= 0x03000000
9096 return NULL;
9097 # else
9098 return;
9099 # endif
9100 }
9101
9102 /* All objects have a 'this' attribute */
9103 this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
9104 (void)this_descr;
9105
9106 /* All objects have a 'thisown' attribute */
9107 thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
9108 (void)thisown_descr;
9109
9110 public_interface = PyList_New(0);
9111 public_symbol = 0;
9112 (void)public_symbol;
9113
9114 PyDict_SetItemString(md, "__all__", public_interface);
9115 Py_DECREF(public_interface);
9116 for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
9117 SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
9118 for (i = 0; swig_const_table[i].name != 0; ++i)
9119 SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
9120 #endif
9121
9122 SWIG_InstallConstants(d,swig_const_table);
9123
9124
9125 init_pygsl();
9126 import_array();
9127 module = m;
9128
9129
9130 pygsl_module_for_error_treatment = m;
9131
9132
9133 /* type '::pygsl_interp2d' */
9134 builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__pygsl_interp2d_type;
9135 builtin_pytype->tp_dict = d = PyDict_New();
9136 SwigPyBuiltin_SetMetaType(builtin_pytype, metatype);
9137 builtin_pytype->tp_new = PyType_GenericNew;
9138 builtin_base_count = 0;
9139 builtin_bases[builtin_base_count] = NULL;
9140 SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases);
9141 PyDict_SetItemString(d, "this", this_descr);
9142 PyDict_SetItemString(d, "thisown", thisown_descr);
9143 if (PyType_Ready(builtin_pytype) < 0) {
9144 PyErr_SetString(PyExc_TypeError, "Could not create type 'interp2d'.");
9145 #if PY_VERSION_HEX >= 0x03000000
9146 return NULL;
9147 #else
9148 return;
9149 #endif
9150 }
9151 Py_INCREF(builtin_pytype);
9152 PyModule_AddObject(m, "interp2d", (PyObject *)builtin_pytype);
9153 SwigPyBuiltin_AddPublicSymbol(public_interface, "interp2d");
9154 d = md;
9155
9156 /* type '::pygsl_spline2d' */
9157 builtin_pytype = (PyTypeObject *)&SwigPyBuiltin__pygsl_spline2d_type;
9158 builtin_pytype->tp_dict = d = PyDict_New();
9159 SwigPyBuiltin_SetMetaType(builtin_pytype, metatype);
9160 builtin_pytype->tp_new = PyType_GenericNew;
9161 builtin_base_count = 0;
9162 builtin_bases[builtin_base_count] = NULL;
9163 SwigPyBuiltin_InitBases(builtin_pytype, builtin_bases);
9164 PyDict_SetItemString(d, "this", this_descr);
9165 PyDict_SetItemString(d, "thisown", thisown_descr);
9166 if (PyType_Ready(builtin_pytype) < 0) {
9167 PyErr_SetString(PyExc_TypeError, "Could not create type 'spline2d'.");
9168 #if PY_VERSION_HEX >= 0x03000000
9169 return NULL;
9170 #else
9171 return;
9172 #endif
9173 }
9174 Py_INCREF(builtin_pytype);
9175 PyModule_AddObject(m, "spline2d", (PyObject *)builtin_pytype);
9176 SwigPyBuiltin_AddPublicSymbol(public_interface, "spline2d");
9177 d = md;
9178 PyDict_SetItemString(md,(char *)"cvar", SWIG_globals());
9179 SwigPyBuiltin_AddPublicSymbol(public_interface, "cvar");
9180 SWIG_addvarlink(SWIG_globals(),(char *)"gsl_interp2d_bilinear",Swig_var_gsl_interp2d_bilinear_get, Swig_var_gsl_interp2d_bilinear_set);
9181 PyDict_SetItemString(md, (char *)"gsl_interp2d_bilinear", PyObject_GetAttrString(SWIG_globals(), "gsl_interp2d_bilinear"));
9182 SwigPyBuiltin_AddPublicSymbol(public_interface, "gsl_interp2d_bilinear");
9183 SWIG_addvarlink(SWIG_globals(),(char *)"gsl_interp2d_bicubic",Swig_var_gsl_interp2d_bicubic_get, Swig_var_gsl_interp2d_bicubic_set);
9184 PyDict_SetItemString(md, (char *)"gsl_interp2d_bicubic", PyObject_GetAttrString(SWIG_globals(), "gsl_interp2d_bicubic"));
9185 SwigPyBuiltin_AddPublicSymbol(public_interface, "gsl_interp2d_bicubic");
9186 #if PY_VERSION_HEX >= 0x03000000
9187 return m;
9188 #else
9189 return;
9190 #endif
9191 }
9192
9193