1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.1
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 SWIGPERL
13 #define SWIGPERL
14 #endif
15
16 #define SWIG_CASTRANK_MODE
17
18 /* -----------------------------------------------------------------------------
19 * This section contains generic SWIG labels for method/variable
20 * declarations/attributes, and other compiler dependent labels.
21 * ----------------------------------------------------------------------------- */
22
23 /* template workaround for compilers that cannot correctly implement the C++ standard */
24 #ifndef SWIGTEMPLATEDISAMBIGUATOR
25 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
26 # define SWIGTEMPLATEDISAMBIGUATOR template
27 # elif defined(__HP_aCC)
28 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
29 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
30 # define SWIGTEMPLATEDISAMBIGUATOR template
31 # else
32 # define SWIGTEMPLATEDISAMBIGUATOR
33 # endif
34 #endif
35
36 /* inline attribute */
37 #ifndef SWIGINLINE
38 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
39 # define SWIGINLINE inline
40 # else
41 # define SWIGINLINE
42 # endif
43 #endif
44
45 /* attribute recognised by some compilers to avoid 'unused' warnings */
46 #ifndef SWIGUNUSED
47 # if defined(__GNUC__)
48 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
49 # define SWIGUNUSED __attribute__ ((__unused__))
50 # else
51 # define SWIGUNUSED
52 # endif
53 # elif defined(__ICC)
54 # define SWIGUNUSED __attribute__ ((__unused__))
55 # else
56 # define SWIGUNUSED
57 # endif
58 #endif
59
60 #ifndef SWIG_MSC_UNSUPPRESS_4505
61 # if defined(_MSC_VER)
62 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
63 # endif
64 #endif
65
66 #ifndef SWIGUNUSEDPARM
67 # ifdef __cplusplus
68 # define SWIGUNUSEDPARM(p)
69 # else
70 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
71 # endif
72 #endif
73
74 /* internal SWIG method */
75 #ifndef SWIGINTERN
76 # define SWIGINTERN static SWIGUNUSED
77 #endif
78
79 /* internal inline SWIG method */
80 #ifndef SWIGINTERNINLINE
81 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
82 #endif
83
84 /* exporting methods */
85 #if defined(__GNUC__)
86 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
87 # ifndef GCC_HASCLASSVISIBILITY
88 # define GCC_HASCLASSVISIBILITY
89 # endif
90 # endif
91 #endif
92
93 #ifndef SWIGEXPORT
94 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
95 # if defined(STATIC_LINKED)
96 # define SWIGEXPORT
97 # else
98 # define SWIGEXPORT __declspec(dllexport)
99 # endif
100 # else
101 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
102 # define SWIGEXPORT __attribute__ ((visibility("default")))
103 # else
104 # define SWIGEXPORT
105 # endif
106 # endif
107 #endif
108
109 /* calling conventions for Windows */
110 #ifndef SWIGSTDCALL
111 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
112 # define SWIGSTDCALL __stdcall
113 # else
114 # define SWIGSTDCALL
115 # endif
116 #endif
117
118 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
119 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
120 # define _CRT_SECURE_NO_DEPRECATE
121 #endif
122
123 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
124 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
125 # define _SCL_SECURE_NO_DEPRECATE
126 #endif
127
128 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
129 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
130 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
131 #endif
132
133 /* Intel's compiler complains if a variable which was never initialised is
134 * cast to void, which is a common idiom which we use to indicate that we
135 * are aware a variable isn't used. So we just silence that warning.
136 * See: https://github.com/swig/swig/issues/192 for more discussion.
137 */
138 #ifdef __INTEL_COMPILER
139 # pragma warning disable 592
140 #endif
141
142 /* -----------------------------------------------------------------------------
143 * swigrun.swg
144 *
145 * This file contains generic C API SWIG runtime support for pointer
146 * type checking.
147 * ----------------------------------------------------------------------------- */
148
149 /* This should only be incremented when either the layout of swig_type_info changes,
150 or for whatever reason, the runtime changes incompatibly */
151 #define SWIG_RUNTIME_VERSION "4"
152
153 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
154 #ifdef SWIG_TYPE_TABLE
155 # define SWIG_QUOTE_STRING(x) #x
156 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
157 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
158 #else
159 # define SWIG_TYPE_TABLE_NAME
160 #endif
161
162 /*
163 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
164 creating a static or dynamic library from the SWIG runtime code.
165 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
166
167 But only do this if strictly necessary, ie, if you have problems
168 with your compiler or suchlike.
169 */
170
171 #ifndef SWIGRUNTIME
172 # define SWIGRUNTIME SWIGINTERN
173 #endif
174
175 #ifndef SWIGRUNTIMEINLINE
176 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
177 #endif
178
179 /* Generic buffer size */
180 #ifndef SWIG_BUFFER_SIZE
181 # define SWIG_BUFFER_SIZE 1024
182 #endif
183
184 /* Flags for pointer conversions */
185 #define SWIG_POINTER_DISOWN 0x1
186 #define SWIG_CAST_NEW_MEMORY 0x2
187 #define SWIG_POINTER_NO_NULL 0x4
188
189 /* Flags for new pointer objects */
190 #define SWIG_POINTER_OWN 0x1
191
192
193 /*
194 Flags/methods for returning states.
195
196 The SWIG conversion methods, as ConvertPtr, return an integer
197 that tells if the conversion was successful or not. And if not,
198 an error code can be returned (see swigerrors.swg for the codes).
199
200 Use the following macros/flags to set or process the returning
201 states.
202
203 In old versions of SWIG, code such as the following was usually written:
204
205 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
206 // success code
207 } else {
208 //fail code
209 }
210
211 Now you can be more explicit:
212
213 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
214 if (SWIG_IsOK(res)) {
215 // success code
216 } else {
217 // fail code
218 }
219
220 which is the same really, but now you can also do
221
222 Type *ptr;
223 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
224 if (SWIG_IsOK(res)) {
225 // success code
226 if (SWIG_IsNewObj(res) {
227 ...
228 delete *ptr;
229 } else {
230 ...
231 }
232 } else {
233 // fail code
234 }
235
236 I.e., now SWIG_ConvertPtr can return new objects and you can
237 identify the case and take care of the deallocation. Of course that
238 also requires SWIG_ConvertPtr to return new result values, such as
239
240 int SWIG_ConvertPtr(obj, ptr,...) {
241 if (<obj is ok>) {
242 if (<need new object>) {
243 *ptr = <ptr to new allocated object>;
244 return SWIG_NEWOBJ;
245 } else {
246 *ptr = <ptr to old object>;
247 return SWIG_OLDOBJ;
248 }
249 } else {
250 return SWIG_BADOBJ;
251 }
252 }
253
254 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
255 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
256 SWIG errors code.
257
258 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
259 allows to return the 'cast rank', for example, if you have this
260
261 int food(double)
262 int fooi(int);
263
264 and you call
265
266 food(1) // cast rank '1' (1 -> 1.0)
267 fooi(1) // cast rank '0'
268
269 just use the SWIG_AddCast()/SWIG_CheckState()
270 */
271
272 #define SWIG_OK (0)
273 #define SWIG_ERROR (-1)
274 #define SWIG_IsOK(r) (r >= 0)
275 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
276
277 /* The CastRankLimit says how many bits are used for the cast rank */
278 #define SWIG_CASTRANKLIMIT (1 << 8)
279 /* The NewMask denotes the object was created (using new/malloc) */
280 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
281 /* The TmpMask is for in/out typemaps that use temporal objects */
282 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
283 /* Simple returning values */
284 #define SWIG_BADOBJ (SWIG_ERROR)
285 #define SWIG_OLDOBJ (SWIG_OK)
286 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
287 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
288 /* Check, add and del mask methods */
289 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
290 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
291 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
292 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
293 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
294 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
295
296 /* Cast-Rank Mode */
297 #if defined(SWIG_CASTRANK_MODE)
298 # ifndef SWIG_TypeRank
299 # define SWIG_TypeRank unsigned long
300 # endif
301 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
302 # define SWIG_MAXCASTRANK (2)
303 # endif
304 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
305 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)306 SWIGINTERNINLINE int SWIG_AddCast(int r) {
307 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
308 }
SWIG_CheckState(int r)309 SWIGINTERNINLINE int SWIG_CheckState(int r) {
310 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
311 }
312 #else /* no cast-rank mode */
313 # define SWIG_AddCast(r) (r)
314 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
315 #endif
316
317
318 #include <string.h>
319
320 #ifdef __cplusplus
321 extern "C" {
322 #endif
323
324 typedef void *(*swig_converter_func)(void *, int *);
325 typedef struct swig_type_info *(*swig_dycast_func)(void **);
326
327 /* Structure to store information on one type */
328 typedef struct swig_type_info {
329 const char *name; /* mangled name of this type */
330 const char *str; /* human readable name of this type */
331 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
332 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
333 void *clientdata; /* language specific type data */
334 int owndata; /* flag if the structure owns the clientdata */
335 } swig_type_info;
336
337 /* Structure to store a type and conversion function used for casting */
338 typedef struct swig_cast_info {
339 swig_type_info *type; /* pointer to type that is equivalent to this type */
340 swig_converter_func converter; /* function to cast the void pointers */
341 struct swig_cast_info *next; /* pointer to next cast in linked list */
342 struct swig_cast_info *prev; /* pointer to the previous cast */
343 } swig_cast_info;
344
345 /* Structure used to store module information
346 * Each module generates one structure like this, and the runtime collects
347 * all of these structures and stores them in a circularly linked list.*/
348 typedef struct swig_module_info {
349 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
350 size_t size; /* Number of types in this module */
351 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
352 swig_type_info **type_initial; /* Array of initially generated type structures */
353 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
354 void *clientdata; /* Language specific module data */
355 } swig_module_info;
356
357 /*
358 Compare two type names skipping the space characters, therefore
359 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
360
361 Return 0 when the two name types are equivalent, as in
362 strncmp, but skipping ' '.
363 */
364 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)365 SWIG_TypeNameComp(const char *f1, const char *l1,
366 const char *f2, const char *l2) {
367 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
368 while ((*f1 == ' ') && (f1 != l1)) ++f1;
369 while ((*f2 == ' ') && (f2 != l2)) ++f2;
370 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
371 }
372 return (int)((l1 - f1) - (l2 - f2));
373 }
374
375 /*
376 Check type equivalence in a name list like <name1>|<name2>|...
377 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
378 */
379 SWIGRUNTIME int
SWIG_TypeCmp(const char * nb,const char * tb)380 SWIG_TypeCmp(const char *nb, const char *tb) {
381 int equiv = 1;
382 const char* te = tb + strlen(tb);
383 const char* ne = nb;
384 while (equiv != 0 && *ne) {
385 for (nb = ne; *ne; ++ne) {
386 if (*ne == '|') break;
387 }
388 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
389 if (*ne) ++ne;
390 }
391 return equiv;
392 }
393
394 /*
395 Check type equivalence in a name list like <name1>|<name2>|...
396 Return 0 if not equal, 1 if equal
397 */
398 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)399 SWIG_TypeEquiv(const char *nb, const char *tb) {
400 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
401 }
402
403 /*
404 Check the typename
405 */
406 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)407 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
408 if (ty) {
409 swig_cast_info *iter = ty->cast;
410 while (iter) {
411 if (strcmp(iter->type->name, c) == 0) {
412 if (iter == ty->cast)
413 return iter;
414 /* Move iter to the top of the linked list */
415 iter->prev->next = iter->next;
416 if (iter->next)
417 iter->next->prev = iter->prev;
418 iter->next = ty->cast;
419 iter->prev = 0;
420 if (ty->cast) ty->cast->prev = iter;
421 ty->cast = iter;
422 return iter;
423 }
424 iter = iter->next;
425 }
426 }
427 return 0;
428 }
429
430 /*
431 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
432 */
433 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)434 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
435 if (ty) {
436 swig_cast_info *iter = ty->cast;
437 while (iter) {
438 if (iter->type == from) {
439 if (iter == ty->cast)
440 return iter;
441 /* Move iter to the top of the linked list */
442 iter->prev->next = iter->next;
443 if (iter->next)
444 iter->next->prev = iter->prev;
445 iter->next = ty->cast;
446 iter->prev = 0;
447 if (ty->cast) ty->cast->prev = iter;
448 ty->cast = iter;
449 return iter;
450 }
451 iter = iter->next;
452 }
453 }
454 return 0;
455 }
456
457 /*
458 Cast a pointer up an inheritance hierarchy
459 */
460 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)461 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
462 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
463 }
464
465 /*
466 Dynamic pointer casting. Down an inheritance hierarchy
467 */
468 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)469 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
470 swig_type_info *lastty = ty;
471 if (!ty || !ty->dcast) return ty;
472 while (ty && (ty->dcast)) {
473 ty = (*ty->dcast)(ptr);
474 if (ty) lastty = ty;
475 }
476 return lastty;
477 }
478
479 /*
480 Return the name associated with this type
481 */
482 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)483 SWIG_TypeName(const swig_type_info *ty) {
484 return ty->name;
485 }
486
487 /*
488 Return the pretty name associated with this type,
489 that is an unmangled type name in a form presentable to the user.
490 */
491 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)492 SWIG_TypePrettyName(const swig_type_info *type) {
493 /* The "str" field contains the equivalent pretty names of the
494 type, separated by vertical-bar characters. We choose
495 to print the last name, as it is often (?) the most
496 specific. */
497 if (!type) return NULL;
498 if (type->str != NULL) {
499 const char *last_name = type->str;
500 const char *s;
501 for (s = type->str; *s; s++)
502 if (*s == '|') last_name = s+1;
503 return last_name;
504 }
505 else
506 return type->name;
507 }
508
509 /*
510 Set the clientdata field for a type
511 */
512 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)513 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
514 swig_cast_info *cast = ti->cast;
515 /* if (ti->clientdata == clientdata) return; */
516 ti->clientdata = clientdata;
517
518 while (cast) {
519 if (!cast->converter) {
520 swig_type_info *tc = cast->type;
521 if (!tc->clientdata) {
522 SWIG_TypeClientData(tc, clientdata);
523 }
524 }
525 cast = cast->next;
526 }
527 }
528 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)529 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
530 SWIG_TypeClientData(ti, clientdata);
531 ti->owndata = 1;
532 }
533
534 /*
535 Search for a swig_type_info structure only by mangled name
536 Search is a O(log #types)
537
538 We start searching at module start, and finish searching when start == end.
539 Note: if start == end at the beginning of the function, we go all the way around
540 the circular list.
541 */
542 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)543 SWIG_MangledTypeQueryModule(swig_module_info *start,
544 swig_module_info *end,
545 const char *name) {
546 swig_module_info *iter = start;
547 do {
548 if (iter->size) {
549 size_t l = 0;
550 size_t r = iter->size - 1;
551 do {
552 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
553 size_t i = (l + r) >> 1;
554 const char *iname = iter->types[i]->name;
555 if (iname) {
556 int compare = strcmp(name, iname);
557 if (compare == 0) {
558 return iter->types[i];
559 } else if (compare < 0) {
560 if (i) {
561 r = i - 1;
562 } else {
563 break;
564 }
565 } else if (compare > 0) {
566 l = i + 1;
567 }
568 } else {
569 break; /* should never happen */
570 }
571 } while (l <= r);
572 }
573 iter = iter->next;
574 } while (iter != end);
575 return 0;
576 }
577
578 /*
579 Search for a swig_type_info structure for either a mangled name or a human readable name.
580 It first searches the mangled names of the types, which is a O(log #types)
581 If a type is not found it then searches the human readable names, which is O(#types).
582
583 We start searching at module start, and finish searching when start == end.
584 Note: if start == end at the beginning of the function, we go all the way around
585 the circular list.
586 */
587 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)588 SWIG_TypeQueryModule(swig_module_info *start,
589 swig_module_info *end,
590 const char *name) {
591 /* STEP 1: Search the name field using binary search */
592 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
593 if (ret) {
594 return ret;
595 } else {
596 /* STEP 2: If the type hasn't been found, do a complete search
597 of the str field (the human readable name) */
598 swig_module_info *iter = start;
599 do {
600 size_t i = 0;
601 for (; i < iter->size; ++i) {
602 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
603 return iter->types[i];
604 }
605 iter = iter->next;
606 } while (iter != end);
607 }
608
609 /* neither found a match */
610 return 0;
611 }
612
613 /*
614 Pack binary data into a string
615 */
616 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)617 SWIG_PackData(char *c, void *ptr, size_t sz) {
618 static const char hex[17] = "0123456789abcdef";
619 const unsigned char *u = (unsigned char *) ptr;
620 const unsigned char *eu = u + sz;
621 for (; u != eu; ++u) {
622 unsigned char uu = *u;
623 *(c++) = hex[(uu & 0xf0) >> 4];
624 *(c++) = hex[uu & 0xf];
625 }
626 return c;
627 }
628
629 /*
630 Unpack binary data from a string
631 */
632 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)633 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
634 unsigned char *u = (unsigned char *) ptr;
635 const unsigned char *eu = u + sz;
636 for (; u != eu; ++u) {
637 char d = *(c++);
638 unsigned char uu;
639 if ((d >= '0') && (d <= '9'))
640 uu = (unsigned char)((d - '0') << 4);
641 else if ((d >= 'a') && (d <= 'f'))
642 uu = (unsigned char)((d - ('a'-10)) << 4);
643 else
644 return (char *) 0;
645 d = *(c++);
646 if ((d >= '0') && (d <= '9'))
647 uu |= (unsigned char)(d - '0');
648 else if ((d >= 'a') && (d <= 'f'))
649 uu |= (unsigned char)(d - ('a'-10));
650 else
651 return (char *) 0;
652 *u = uu;
653 }
654 return c;
655 }
656
657 /*
658 Pack 'void *' into a string buffer.
659 */
660 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)661 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
662 char *r = buff;
663 if ((2*sizeof(void *) + 2) > bsz) return 0;
664 *(r++) = '_';
665 r = SWIG_PackData(r,&ptr,sizeof(void *));
666 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
667 strcpy(r,name);
668 return buff;
669 }
670
671 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)672 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
673 if (*c != '_') {
674 if (strcmp(c,"NULL") == 0) {
675 *ptr = (void *) 0;
676 return name;
677 } else {
678 return 0;
679 }
680 }
681 return SWIG_UnpackData(++c,ptr,sizeof(void *));
682 }
683
684 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)685 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
686 char *r = buff;
687 size_t lname = (name ? strlen(name) : 0);
688 if ((2*sz + 2 + lname) > bsz) return 0;
689 *(r++) = '_';
690 r = SWIG_PackData(r,ptr,sz);
691 if (lname) {
692 strncpy(r,name,lname+1);
693 } else {
694 *r = 0;
695 }
696 return buff;
697 }
698
699 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)700 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
701 if (*c != '_') {
702 if (strcmp(c,"NULL") == 0) {
703 memset(ptr,0,sz);
704 return name;
705 } else {
706 return 0;
707 }
708 }
709 return SWIG_UnpackData(++c,ptr,sz);
710 }
711
712 #ifdef __cplusplus
713 }
714 #endif
715
716 /* Errors in SWIG */
717 #define SWIG_UnknownError -1
718 #define SWIG_IOError -2
719 #define SWIG_RuntimeError -3
720 #define SWIG_IndexError -4
721 #define SWIG_TypeError -5
722 #define SWIG_DivisionByZero -6
723 #define SWIG_OverflowError -7
724 #define SWIG_SyntaxError -8
725 #define SWIG_ValueError -9
726 #define SWIG_SystemError -10
727 #define SWIG_AttributeError -11
728 #define SWIG_MemoryError -12
729 #define SWIG_NullReferenceError -13
730
731
732
733 #ifdef __cplusplus
734 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
735 #include <math.h>
736 #include <stdlib.h>
737 extern "C" {
738 #endif
739 #include "EXTERN.h"
740 #include "perl.h"
741 #include "XSUB.h"
742
743 /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
744
745 /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
746 #ifndef PERL_REVISION
747 # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
748 # define PERL_PATCHLEVEL_H_IMPLICIT
749 # include <patchlevel.h>
750 # endif
751 # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
752 # include <could_not_find_Perl_patchlevel.h>
753 # endif
754 # ifndef PERL_REVISION
755 # define PERL_REVISION (5)
756 # define PERL_VERSION PATCHLEVEL
757 # define PERL_SUBVERSION SUBVERSION
758 # endif
759 #endif
760
761 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
762 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
763 #endif
764
765 #ifndef SvIOK_UV
766 # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
767 #endif
768
769 #ifndef SvUOK
770 # define SvUOK(sv) SvIOK_UV(sv)
771 #endif
772
773 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
774 # define PL_sv_undef sv_undef
775 # define PL_na na
776 # define PL_errgv errgv
777 # define PL_sv_no sv_no
778 # define PL_sv_yes sv_yes
779 # define PL_markstack_ptr markstack_ptr
780 #endif
781
782 #ifndef IVSIZE
783 # ifdef LONGSIZE
784 # define IVSIZE LONGSIZE
785 # else
786 # define IVSIZE 4 /* A bold guess, but the best we can make. */
787 # endif
788 #endif
789
790 #ifndef INT2PTR
791 # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
792 # define PTRV UV
793 # define INT2PTR(any,d) (any)(d)
794 # else
795 # if PTRSIZE == LONGSIZE
796 # define PTRV unsigned long
797 # else
798 # define PTRV unsigned
799 # endif
800 # define INT2PTR(any,d) (any)(PTRV)(d)
801 # endif
802
803 # define NUM2PTR(any,d) (any)(PTRV)(d)
804 # define PTR2IV(p) INT2PTR(IV,p)
805 # define PTR2UV(p) INT2PTR(UV,p)
806 # define PTR2NV(p) NUM2PTR(NV,p)
807
808 # if PTRSIZE == LONGSIZE
809 # define PTR2ul(p) (unsigned long)(p)
810 # else
811 # define PTR2ul(p) INT2PTR(unsigned long,p)
812 # endif
813 #endif /* !INT2PTR */
814
815 #ifndef SvPV_nolen
816 # define SvPV_nolen(x) SvPV(x,PL_na)
817 #endif
818
819 #ifndef get_sv
820 # define get_sv perl_get_sv
821 #endif
822
823 #ifndef ERRSV
824 # define ERRSV get_sv("@",FALSE)
825 #endif
826
827 #ifndef pTHX_
828 #define pTHX_
829 #endif
830
831 #include <string.h>
832 #ifdef __cplusplus
833 }
834 #endif
835
836 /* -----------------------------------------------------------------------------
837 * error manipulation
838 * ----------------------------------------------------------------------------- */
839
840 SWIGINTERN const char*
SWIG_Perl_ErrorType(int code)841 SWIG_Perl_ErrorType(int code) {
842 switch(code) {
843 case SWIG_MemoryError:
844 return "MemoryError";
845 case SWIG_IOError:
846 return "IOError";
847 case SWIG_RuntimeError:
848 return "RuntimeError";
849 case SWIG_IndexError:
850 return "IndexError";
851 case SWIG_TypeError:
852 return "TypeError";
853 case SWIG_DivisionByZero:
854 return "ZeroDivisionError";
855 case SWIG_OverflowError:
856 return "OverflowError";
857 case SWIG_SyntaxError:
858 return "SyntaxError";
859 case SWIG_ValueError:
860 return "ValueError";
861 case SWIG_SystemError:
862 return "SystemError";
863 case SWIG_AttributeError:
864 return "AttributeError";
865 default:
866 return "RuntimeError";
867 }
868 }
869
870
871 /* -----------------------------------------------------------------------------
872 * perlrun.swg
873 *
874 * This file contains the runtime support for Perl modules
875 * and includes code for managing global variables and pointer
876 * type checking.
877 * ----------------------------------------------------------------------------- */
878
879 #ifdef PERL_OBJECT
880 #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
881 #define SWIG_PERL_OBJECT_CALL pPerl,
882 #else
883 #define SWIG_PERL_OBJECT_DECL
884 #define SWIG_PERL_OBJECT_CALL
885 #endif
886
887 /* Common SWIG API */
888
889 /* for raw pointers */
890 #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
891 #define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
892 #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
893 #define SWIG_AcquirePtr(ptr, src) SWIG_Perl_AcquirePtr(ptr, src)
894 #define swig_owntype int
895
896 /* for raw packed data */
897 #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
898 #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
899
900 /* for class or struct pointers */
901 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
902 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
903
904 /* for C or C++ function pointers */
905 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
906 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
907
908 /* for C++ member pointers, ie, member methods */
909 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty)
910 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type)
911
912
913 /* Runtime API */
914
915 #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule(clientdata)
916 #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer)
917
918
919 /* Error manipulation */
920
921 #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code)
922 #define SWIG_Error(code, msg) sv_setpvf(get_sv("@", GV_ADD), "%s %s", SWIG_ErrorType(code), msg)
923 #define SWIG_fail goto fail
924
925 /* Perl-specific SWIG API */
926
927 #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
928 #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
929 #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str)
930
931
932 #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1)
933 #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1)
934 #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2)
935 #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2)
936
937 /* -----------------------------------------------------------------------------
938 * pointers/data manipulation
939 * ----------------------------------------------------------------------------- */
940
941 /* For backward compatibility only */
942 #define SWIG_POINTER_EXCEPTION 0
943
944 #ifdef __cplusplus
945 extern "C" {
946 #endif
947
948 #define SWIG_OWNER SWIG_POINTER_OWN
949 #define SWIG_SHADOW SWIG_OWNER << 1
950
951 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
952
953 /* SWIG Perl macros */
954
955 /* Macro to declare an XS function */
956 #ifndef XSPROTO
957 # define XSPROTO(name) void name(pTHX_ CV* cv)
958 #endif
959
960 /* Macro to call an XS function */
961 #ifdef PERL_OBJECT
962 # define SWIG_CALLXS(_name) _name(cv,pPerl)
963 #else
964 # ifndef MULTIPLICITY
965 # define SWIG_CALLXS(_name) _name(cv)
966 # else
967 # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
968 # endif
969 #endif
970
971 #ifdef PERL_OBJECT
972 #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
973
974 #ifdef __cplusplus
975 extern "C" {
976 #endif
977 typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
978 #ifdef __cplusplus
979 }
980 #endif
981
982 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
983 #define SWIGCLASS_STATIC
984
985 #else /* PERL_OBJECT */
986
987 #define MAGIC_PPERL
988 #define SWIGCLASS_STATIC static SWIGUNUSED
989
990 #ifndef MULTIPLICITY
991 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
992
993 #ifdef __cplusplus
994 extern "C" {
995 #endif
996 typedef int (*SwigMagicFunc)(SV *, MAGIC *);
997 #ifdef __cplusplus
998 }
999 #endif
1000
1001 #else /* MULTIPLICITY */
1002
1003 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
1004
1005 #ifdef __cplusplus
1006 extern "C" {
1007 #endif
1008 typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
1009 #ifdef __cplusplus
1010 }
1011 #endif
1012
1013 #endif /* MULTIPLICITY */
1014 #endif /* PERL_OBJECT */
1015
1016 # ifdef PERL_OBJECT
1017 # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
SWIG_Perl_croak_null(CPerlObj * pPerl)1018 static void SWIGUNUSED SWIG_Perl_croak_null(CPerlObj *pPerl)
1019 # else
1020 static void SWIGUNUSED SWIG_croak_null()
1021 # endif
1022 {
1023 SV *err = get_sv("@", GV_ADD);
1024 # if (PERL_VERSION < 6)
1025 croak("%_", err);
1026 # else
1027 if (sv_isobject(err))
1028 croak(0);
1029 else
1030 croak("%s", SvPV_nolen(err));
1031 # endif
1032 }
1033
1034
1035 /*
1036 Define how strict is the cast between strings and integers/doubles
1037 when overloading between these types occurs.
1038
1039 The default is making it as strict as possible by using SWIG_AddCast
1040 when needed.
1041
1042 You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1043 disable the SWIG_AddCast, making the casting between string and
1044 numbers less strict.
1045
1046 In the end, we try to solve the overloading between strings and
1047 numerical types in the more natural way, but if you can avoid it,
1048 well, avoid it using %rename, for example.
1049 */
1050 #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1051 # ifndef SWIG_PERL_STRICT_STR2NUM
1052 # define SWIG_PERL_STRICT_STR2NUM
1053 # endif
1054 #endif
1055 #ifdef SWIG_PERL_STRICT_STR2NUM
1056 /* string takes precedence */
1057 #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
1058 #else
1059 /* number takes precedence */
1060 #define SWIG_Str2NumCast(x) x
1061 #endif
1062
1063
1064
1065 #include <stdlib.h>
1066
1067 SWIGRUNTIME const char *
SWIG_Perl_TypeProxyName(const swig_type_info * type)1068 SWIG_Perl_TypeProxyName(const swig_type_info *type) {
1069 if (!type) return NULL;
1070 if (type->clientdata != NULL) {
1071 return (const char*) type->clientdata;
1072 }
1073 else {
1074 return type->name;
1075 }
1076 }
1077
1078 /* Identical to SWIG_TypeCheck, except for strcmp comparison */
1079 SWIGRUNTIME swig_cast_info *
SWIG_TypeProxyCheck(const char * c,swig_type_info * ty)1080 SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
1081 if (ty) {
1082 swig_cast_info *iter = ty->cast;
1083 while (iter) {
1084 if (strcmp(SWIG_Perl_TypeProxyName(iter->type), c) == 0) {
1085 if (iter == ty->cast)
1086 return iter;
1087 /* Move iter to the top of the linked list */
1088 iter->prev->next = iter->next;
1089 if (iter->next)
1090 iter->next->prev = iter->prev;
1091 iter->next = ty->cast;
1092 iter->prev = 0;
1093 if (ty->cast) ty->cast->prev = iter;
1094 ty->cast = iter;
1095 return iter;
1096 }
1097 iter = iter->next;
1098 }
1099 }
1100 return 0;
1101 }
1102
1103 /* Acquire a pointer value */
1104
1105 SWIGRUNTIME int
SWIG_Perl_AcquirePtr(SWIG_MAYBE_PERL_OBJECT SV * sv,int own)1106 SWIG_Perl_AcquirePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, int own) {
1107 /* TODO */
1108 return 0;
1109 }
1110
1111 /* Function for getting a pointer value */
1112
1113 SWIGRUNTIME int
SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV * sv,void ** ptr,swig_type_info * _t,int flags,int * own)1114 SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) {
1115 swig_cast_info *tc;
1116 void *voidptr = (void *)0;
1117 SV *tsv = 0;
1118
1119 if (own)
1120 *own = 0;
1121
1122 /* If magical, apply more magic */
1123 if (SvGMAGICAL(sv))
1124 mg_get(sv);
1125
1126 /* Check to see if this is an object */
1127 if (sv_isobject(sv)) {
1128 IV tmp = 0;
1129 tsv = (SV*) SvRV(sv);
1130 if ((SvTYPE(tsv) == SVt_PVHV)) {
1131 MAGIC *mg;
1132 if (SvMAGICAL(tsv)) {
1133 mg = mg_find(tsv,'P');
1134 if (mg) {
1135 sv = mg->mg_obj;
1136 if (sv_isobject(sv)) {
1137 tsv = (SV*)SvRV(sv);
1138 tmp = SvIV(tsv);
1139 }
1140 }
1141 } else {
1142 return SWIG_ERROR;
1143 }
1144 } else {
1145 tmp = SvIV(tsv);
1146 }
1147 voidptr = INT2PTR(void *,tmp);
1148 } else if (! SvOK(sv)) { /* Check for undef */
1149 *(ptr) = (void *) 0;
1150 return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
1151 } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */
1152 if (!SvROK(sv)) {
1153 /* In Perl 5.12 and later, SVt_RV == SVt_IV, so sv could be a valid integer value. */
1154 if (SvIOK(sv)) {
1155 return SWIG_ERROR;
1156 } else {
1157 /* NULL pointer (reference to undef). */
1158 *(ptr) = (void *) 0;
1159 return SWIG_OK;
1160 }
1161 } else {
1162 return SWIG_ERROR;
1163 }
1164 } else { /* Don't know what it is */
1165 return SWIG_ERROR;
1166 }
1167 if (_t) {
1168 /* Now see if the types match */
1169 char *_c = HvNAME(SvSTASH(SvRV(sv)));
1170 tc = SWIG_TypeProxyCheck(_c,_t);
1171 #ifdef SWIG_DIRECTORS
1172 if (!tc && !sv_derived_from(sv,SWIG_Perl_TypeProxyName(_t))) {
1173 #else
1174 if (!tc) {
1175 #endif
1176 return SWIG_ERROR;
1177 }
1178 {
1179 int newmemory = 0;
1180 *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
1181 if (newmemory == SWIG_CAST_NEW_MEMORY) {
1182 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1183 if (own)
1184 *own = *own | SWIG_CAST_NEW_MEMORY;
1185 }
1186 }
1187 } else {
1188 *ptr = voidptr;
1189 }
1190
1191 /*
1192 * DISOWN implementation: we need a perl guru to check this one.
1193 */
1194 if (tsv && (flags & SWIG_POINTER_DISOWN)) {
1195 /*
1196 * almost copy paste code from below SWIG_POINTER_OWN setting
1197 */
1198 SV *obj = sv;
1199 HV *stash = SvSTASH(SvRV(obj));
1200 GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1201 if (isGV(gv)) {
1202 HV *hv = GvHVn(gv);
1203 /*
1204 * To set ownership (see below), a newSViv(1) entry is added.
1205 * Hence, to remove ownership, we delete the entry.
1206 */
1207 if (hv_exists_ent(hv, obj, 0)) {
1208 hv_delete_ent(hv, obj, 0, 0);
1209 }
1210 }
1211 }
1212 return SWIG_OK;
1213 }
1214
1215 SWIGRUNTIME int
1216 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
1217 return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0);
1218 }
1219
1220 SWIGRUNTIME void
1221 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
1222 if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) {
1223 SV *self;
1224 SV *obj=newSV(0);
1225 HV *hash=newHV();
1226 HV *stash;
1227 sv_setref_pv(obj, SWIG_Perl_TypeProxyName(t), ptr);
1228 stash=SvSTASH(SvRV(obj));
1229 if (flags & SWIG_POINTER_OWN) {
1230 HV *hv;
1231 GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1232 if (!isGV(gv))
1233 gv_init(gv, stash, "OWNER", 5, FALSE);
1234 hv=GvHVn(gv);
1235 hv_store_ent(hv, obj, newSViv(1), 0);
1236 }
1237 sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
1238 SvREFCNT_dec(obj);
1239 self=newRV_noinc((SV *)hash);
1240 sv_setsv(sv, self);
1241 SvREFCNT_dec((SV *)self);
1242 sv_bless(sv, stash);
1243 }
1244 else {
1245 sv_setref_pv(sv, SWIG_Perl_TypeProxyName(t), ptr);
1246 }
1247 }
1248
1249 SWIGRUNTIMEINLINE SV *
1250 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
1251 SV *result = sv_newmortal();
1252 SWIG_MakePtr(result, ptr, t, flags);
1253 return result;
1254 }
1255
1256 SWIGRUNTIME void
1257 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
1258 char result[1024];
1259 char *r = result;
1260 if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
1261 *(r++) = '_';
1262 r = SWIG_PackData(r,ptr,sz);
1263 strcpy(r,SWIG_Perl_TypeProxyName(type));
1264 sv_setpv(sv, result);
1265 }
1266
1267 SWIGRUNTIME SV *
1268 SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
1269 SV *result = sv_newmortal();
1270 SWIG_Perl_MakePackedObj(result, ptr, sz, type);
1271 return result;
1272 }
1273
1274 /* Convert a packed pointer value */
1275 SWIGRUNTIME int
1276 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
1277 swig_cast_info *tc;
1278 const char *c = 0;
1279
1280 if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
1281 c = SvPV_nolen(obj);
1282 /* Pointer values must start with leading underscore */
1283 if (*c != '_') return SWIG_ERROR;
1284 c++;
1285 c = SWIG_UnpackData(c,ptr,sz);
1286 if (ty) {
1287 tc = SWIG_TypeCheck(c,ty);
1288 if (!tc) return SWIG_ERROR;
1289 }
1290 return SWIG_OK;
1291 }
1292
1293
1294 /* Macros for low-level exception handling */
1295 #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1296
1297
1298 typedef XSPROTO(SwigPerlWrapper);
1299 typedef SwigPerlWrapper *SwigPerlWrapperPtr;
1300
1301 /* Structure for command table */
1302 typedef struct {
1303 const char *name;
1304 SwigPerlWrapperPtr wrapper;
1305 } swig_command_info;
1306
1307 /* Information for constant table */
1308
1309 #define SWIG_INT 1
1310 #define SWIG_FLOAT 2
1311 #define SWIG_STRING 3
1312 #define SWIG_POINTER 4
1313 #define SWIG_BINARY 5
1314
1315 /* Constant information structure */
1316 typedef struct swig_constant_info {
1317 int type;
1318 const char *name;
1319 long lvalue;
1320 double dvalue;
1321 void *pvalue;
1322 swig_type_info **ptype;
1323 } swig_constant_info;
1324
1325
1326 /* Structure for variable table */
1327 typedef struct {
1328 const char *name;
1329 SwigMagicFunc set;
1330 SwigMagicFunc get;
1331 swig_type_info **type;
1332 } swig_variable_info;
1333
1334 /* Magic variable code */
1335 #ifndef PERL_OBJECT
1336 # ifdef __cplusplus
1337 # define swig_create_magic(s,a,b,c) _swig_create_magic(s,const_cast<char*>(a),b,c)
1338 # else
1339 # define swig_create_magic(s,a,b,c) _swig_create_magic(s,(char*)(a),b,c)
1340 # endif
1341 # ifndef MULTIPLICITY
1342 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *))
1343 # else
1344 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *))
1345 # endif
1346 #else
1347 # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1348 SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *))
1349 #endif
1350 {
1351 MAGIC *mg;
1352 sv_magic(sv,sv,'U',name,strlen(name));
1353 mg = mg_find(sv,'U');
1354 mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
1355 mg->mg_virtual->svt_get = (SwigMagicFunc) get;
1356 mg->mg_virtual->svt_set = (SwigMagicFunc) set;
1357 mg->mg_virtual->svt_len = 0;
1358 mg->mg_virtual->svt_clear = 0;
1359 mg->mg_virtual->svt_free = 0;
1360 }
1361
1362
1363 SWIGRUNTIME swig_module_info *
1364 SWIG_Perl_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
1365 static void *type_pointer = (void *)0;
1366 SV *pointer;
1367
1368 /* first check if pointer already created */
1369 if (!type_pointer) {
1370 pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
1371 if (pointer && SvOK(pointer)) {
1372 type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
1373 }
1374 }
1375
1376 return (swig_module_info *) type_pointer;
1377 }
1378
1379 SWIGRUNTIME void
1380 SWIG_Perl_SetModule(swig_module_info *module) {
1381 SV *pointer;
1382
1383 /* create a new pointer */
1384 pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
1385 sv_setiv(pointer, PTR2IV(module));
1386 }
1387
1388 #ifdef __cplusplus
1389 }
1390 #endif
1391
1392 /* Workaround perl5 global namespace pollution. Note that undefining library
1393 * functions like fopen will not solve the problem on all platforms as fopen
1394 * might be a macro on Windows but not necessarily on other operating systems. */
1395 #ifdef do_open
1396 #undef do_open
1397 #endif
1398 #ifdef do_close
1399 #undef do_close
1400 #endif
1401 #ifdef do_exec
1402 #undef do_exec
1403 #endif
1404 #ifdef scalar
1405 #undef scalar
1406 #endif
1407 #ifdef list
1408 #undef list
1409 #endif
1410 #ifdef apply
1411 #undef apply
1412 #endif
1413 #ifdef convert
1414 #undef convert
1415 #endif
1416 #ifdef Error
1417 #undef Error
1418 #endif
1419 #ifdef form
1420 #undef form
1421 #endif
1422 #ifdef vform
1423 #undef vform
1424 #endif
1425 #ifdef LABEL
1426 #undef LABEL
1427 #endif
1428 #ifdef METHOD
1429 #undef METHOD
1430 #endif
1431 #ifdef Move
1432 #undef Move
1433 #endif
1434 #ifdef yylex
1435 #undef yylex
1436 #endif
1437 #ifdef yyparse
1438 #undef yyparse
1439 #endif
1440 #ifdef yyerror
1441 #undef yyerror
1442 #endif
1443 #ifdef invert
1444 #undef invert
1445 #endif
1446 #ifdef ref
1447 #undef ref
1448 #endif
1449 #ifdef read
1450 #undef read
1451 #endif
1452 #ifdef write
1453 #undef write
1454 #endif
1455 #ifdef eof
1456 #undef eof
1457 #endif
1458 #ifdef close
1459 #undef close
1460 #endif
1461 #ifdef rewind
1462 #undef rewind
1463 #endif
1464 #ifdef free
1465 #undef free
1466 #endif
1467 #ifdef malloc
1468 #undef malloc
1469 #endif
1470 #ifdef calloc
1471 #undef calloc
1472 #endif
1473 #ifdef Stat
1474 #undef Stat
1475 #endif
1476 #ifdef check
1477 #undef check
1478 #endif
1479 #ifdef seekdir
1480 #undef seekdir
1481 #endif
1482 #ifdef open
1483 #undef open
1484 #endif
1485 #ifdef readdir
1486 #undef readdir
1487 #endif
1488 #ifdef bind
1489 #undef bind
1490 #endif
1491 #ifdef access
1492 #undef access
1493 #endif
1494 #ifdef stat
1495 #undef stat
1496 #endif
1497 #ifdef seed
1498 #undef seed
1499 #endif
1500
1501 #ifdef bool
1502 /* Leave if macro is from C99 stdbool.h */
1503 #ifndef __bool_true_false_are_defined
1504 #undef bool
1505 #endif
1506 #endif
1507
1508
1509
1510
1511 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1512
1513 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1514
1515
1516
1517 /* -------- TYPES TABLE (BEGIN) -------- */
1518
1519 #define SWIGTYPE_p_FILE swig_types[0]
1520 #define SWIGTYPE_p_char swig_types[1]
1521 #define SWIGTYPE_p_double swig_types[2]
1522 #define SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void swig_types[3]
1523 #define SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void swig_types[4]
1524 #define SWIGTYPE_p_gsl_matrix swig_types[5]
1525 #define SWIGTYPE_p_gsl_spmatrix swig_types[6]
1526 #define SWIGTYPE_p_gsl_spmatrix_tree swig_types[7]
1527 #define SWIGTYPE_p_size_t swig_types[8]
1528 #define SWIGTYPE_p_void swig_types[9]
1529 static swig_type_info *swig_types[11];
1530 static swig_module_info swig_module = {swig_types, 10, 0, 0, 0, 0};
1531 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1532 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1533
1534 /* -------- TYPES TABLE (END) -------- */
1535
1536 #define SWIG_init boot_Math__GSL__SparseMatrix
1537
1538 #define SWIG_name "Math::GSL::SparseMatrixc::boot_Math__GSL__SparseMatrix"
1539 #define SWIG_prefix "Math::GSL::SparseMatrixc::"
1540
1541 #define SWIGVERSION 0x040001
1542 #define SWIG_VERSION SWIGVERSION
1543
1544
1545 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1546 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1547
1548
1549 #ifdef __cplusplus
1550 extern "C"
1551 #endif
1552 #ifndef PERL_OBJECT
1553 #ifndef MULTIPLICITY
1554 SWIGEXPORT void SWIG_init (CV* cv);
1555 #else
1556 SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
1557 #endif
1558 #else
1559 SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
1560 #endif
1561
1562
1563 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(double value)1564 SWIG_From_double SWIG_PERL_DECL_ARGS_1(double value)
1565 {
1566 return sv_2mortal(newSVnv(value));
1567 }
1568
1569
1570 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(long value)1571 SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
1572 {
1573 SV *sv;
1574 if (IVSIZE >= sizeof(value) || (value >= IV_MIN && value <= IV_MAX))
1575 sv = newSViv(value);
1576 else
1577 sv = newSVpvf("%ld", value);
1578 return sv_2mortal(sv);
1579 }
1580
1581
1582 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(int value)1583 SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value)
1584 {
1585 return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value);
1586 }
1587
1588
1589 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)1590 SWIG_pchar_descriptor(void)
1591 {
1592 static int init = 0;
1593 static swig_type_info* info = 0;
1594 if (!init) {
1595 info = SWIG_TypeQuery("_p_char");
1596 init = 1;
1597 }
1598 return info;
1599 }
1600
1601
1602 SWIGINTERN int
SWIG_AsCharPtrAndSize(SV * obj,char ** cptr,size_t * psize,int * alloc)1603 SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1604 {
1605 if (SvMAGICAL(obj)) {
1606 SV *tmp = sv_newmortal();
1607 SvSetSV(tmp, obj);
1608 obj = tmp;
1609 }
1610 if (SvPOK(obj)) {
1611 STRLEN len = 0;
1612 char *cstr = SvPV(obj, len);
1613 size_t size = len + 1;
1614 if (cptr) {
1615 if (alloc) {
1616 if (*alloc == SWIG_NEWOBJ) {
1617 *cptr = (char *)memcpy(malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
1618 } else {
1619 *cptr = cstr;
1620 *alloc = SWIG_OLDOBJ;
1621 }
1622 }
1623 }
1624 if (psize) *psize = size;
1625 return SWIG_OK;
1626 } else {
1627 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1628 if (pchar_descriptor) {
1629 char* vptr = 0;
1630 if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
1631 if (cptr) *cptr = vptr;
1632 if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1633 if (alloc) *alloc = SWIG_OLDOBJ;
1634 return SWIG_OK;
1635 }
1636 }
1637 }
1638 return SWIG_TypeError;
1639 }
1640
1641
1642
1643
1644
1645 #include <limits.h>
1646 #if !defined(SWIG_NO_LLONG_MAX)
1647 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1648 # define LLONG_MAX __LONG_LONG_MAX__
1649 # define LLONG_MIN (-LLONG_MAX - 1LL)
1650 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1651 # endif
1652 #endif
1653
1654
1655 #include <stdlib.h>
1656 #ifdef _MSC_VER
1657 # ifndef strtoull
1658 # define strtoull _strtoui64
1659 # endif
1660 # ifndef strtoll
1661 # define strtoll _strtoi64
1662 # endif
1663 #endif
1664
1665
1666 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,double * val)1667 SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
1668 {
1669 if (SvNIOK(obj)) {
1670 if (val) *val = SvNV(obj);
1671 return SWIG_OK;
1672 } else if (SvIOK(obj)) {
1673 if (val) *val = (double) SvIV(obj);
1674 return SWIG_AddCast(SWIG_OK);
1675 } else {
1676 const char *nptr = SvPV_nolen(obj);
1677 if (nptr) {
1678 char *endptr;
1679 double v;
1680 errno = 0;
1681 v = strtod(nptr, &endptr);
1682 if (errno == ERANGE) {
1683 errno = 0;
1684 return SWIG_OverflowError;
1685 } else {
1686 if (*endptr == '\0') {
1687 if (val) *val = v;
1688 return SWIG_Str2NumCast(SWIG_OK);
1689 }
1690 }
1691 }
1692 }
1693 return SWIG_TypeError;
1694 }
1695
1696
1697 #include <float.h>
1698
1699
1700 #include <math.h>
1701
1702
1703 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)1704 SWIG_CanCastAsInteger(double *d, double min, double max) {
1705 double x = *d;
1706 if ((min <= x && x <= max)) {
1707 double fx = floor(x);
1708 double cx = ceil(x);
1709 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
1710 if ((errno == EDOM) || (errno == ERANGE)) {
1711 errno = 0;
1712 } else {
1713 double summ, reps, diff;
1714 if (rd < x) {
1715 diff = x - rd;
1716 } else if (rd > x) {
1717 diff = rd - x;
1718 } else {
1719 return 1;
1720 }
1721 summ = rd + x;
1722 reps = diff/summ;
1723 if (reps < 8*DBL_EPSILON) {
1724 *d = rd;
1725 return 1;
1726 }
1727 }
1728 }
1729 return 0;
1730 }
1731
1732
1733 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,long * val)1734 SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
1735 {
1736 if (SvUOK(obj)) {
1737 UV v = SvUV(obj);
1738 if (UVSIZE < sizeof(*val) || v <= LONG_MAX) {
1739 if (val) *val = v;
1740 return SWIG_OK;
1741 }
1742 return SWIG_OverflowError;
1743 } else if (SvIOK(obj)) {
1744 IV v = SvIV(obj);
1745 if (IVSIZE <= sizeof(*val) || (v >= LONG_MIN && v <= LONG_MAX)) {
1746 if(val) *val = v;
1747 return SWIG_OK;
1748 }
1749 return SWIG_OverflowError;
1750 } else {
1751 int dispatch = 0;
1752 const char *nptr = SvPV_nolen(obj);
1753 if (nptr) {
1754 char *endptr;
1755 long v;
1756 errno = 0;
1757 v = strtol(nptr, &endptr,0);
1758 if (errno == ERANGE) {
1759 errno = 0;
1760 return SWIG_OverflowError;
1761 } else {
1762 if (*endptr == '\0') {
1763 if (val) *val = v;
1764 return SWIG_Str2NumCast(SWIG_OK);
1765 }
1766 }
1767 }
1768 if (!dispatch) {
1769 double d;
1770 int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
1771 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
1772 if (val) *val = (long)(d);
1773 return res;
1774 }
1775 }
1776 }
1777 return SWIG_TypeError;
1778 }
1779
1780
1781 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,int * val)1782 SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
1783 {
1784 long v;
1785 int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
1786 if (SWIG_IsOK(res)) {
1787 if ((v < INT_MIN || v > INT_MAX)) {
1788 return SWIG_OverflowError;
1789 } else {
1790 if (val) *val = (int)(v);
1791 }
1792 }
1793 return res;
1794 }
1795
1796
1797 SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)1798 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1799 {
1800 SV *obj = sv_newmortal();
1801 if (carray) {
1802 sv_setpvn(obj, carray, size);
1803 } else {
1804 sv_setsv(obj, &PL_sv_undef);
1805 }
1806 return obj;
1807 }
1808
1809
1810 SWIGINTERNINLINE SV *
SWIG_FromCharPtr(const char * cptr)1811 SWIG_FromCharPtr(const char *cptr)
1812 {
1813 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1814 }
1815
1816
1817 #include "gsl/gsl_nan.h"
1818 #include "gsl/gsl_errno.h"
1819 #include "gsl/gsl_math.h"
1820 #include "gsl/gsl_monte.h"
1821
1822
1823 struct perl_array {
1824 I32 len;
1825 AV *array;
1826 };
1827
1828
1829
1830 enum awType { awDouble, awFloat, awInt, awUnsigned };
1831
1832 typedef struct {
1833 I32 size;
1834 enum awType type;
1835 void * data;
1836 } array_wrapper;
1837
array_wrapper_alloc(int numelem,enum awType type)1838 array_wrapper * array_wrapper_alloc(int numelem, enum awType type){
1839 array_wrapper * rv = malloc(sizeof(array_wrapper));
1840
1841 if (rv == NULL)
1842 croak("array_wrapper_alloc: can't malloc wrapper\n");
1843
1844 switch (type){
1845 case awDouble:
1846 rv->data = malloc(sizeof(double) * numelem);
1847 break;
1848 case awFloat:
1849 rv->data = malloc(sizeof(float) * numelem);
1850 break;
1851 case awInt:
1852 rv->data = malloc(sizeof(int) * numelem);
1853 break;
1854 case awUnsigned:
1855 rv->data = malloc(sizeof(unsigned int) * numelem);
1856 break;
1857 default:
1858 croak("array_wrapper_alloc: type should be awDouble, awFloat, awInt, or awUnsigned");
1859 }
1860
1861 if (rv->data == NULL)
1862 croak("array_wrapper_alloc: can't malloc data");
1863
1864 rv->size = numelem;
1865 rv->type = type;
1866 return rv;
1867 }
1868
array_wrapper_free(array_wrapper * daw)1869 void array_wrapper_free(array_wrapper * daw){
1870 free(daw->data);
1871 free(daw);
1872 }
1873
1874
1875 /* structure to hold required information while the gsl function call
1876 for each callback
1877 */
1878 struct gsl_function_perl {
1879 gsl_function C_gsl_function;
1880 SV * function;
1881 SV * params;
1882 };
1883
1884 struct gsl_function_fdf_perl {
1885 gsl_function_fdf C_gsl_function_fdf;
1886 SV * f;
1887 SV * df;
1888 SV * fdf;
1889 SV * params;
1890 };
1891
1892 struct gsl_monte_function_perl {
1893 gsl_monte_function C_gsl_monte_function;
1894 SV * f;
1895 SV * dim;
1896 SV * params;
1897 };
1898
gsl_function_perl_free(struct gsl_function_perl * perl_f)1899 void gsl_function_perl_free(struct gsl_function_perl * perl_f){
1900 if (perl_f != NULL) {
1901 SvREFCNT_dec(perl_f->function);
1902 SvREFCNT_dec(perl_f->params);
1903 Safefree(perl_f);
1904 }
1905 }
1906
gsl_function_fdf_perl_free(struct gsl_function_fdf_perl * perl_fdf)1907 void gsl_function_fdf_perl_free(struct gsl_function_fdf_perl * perl_fdf){
1908 if (perl_fdf != NULL) {
1909 SvREFCNT_dec(perl_fdf->f);
1910 SvREFCNT_dec(perl_fdf->df);
1911 SvREFCNT_dec(perl_fdf->fdf);
1912 SvREFCNT_dec(perl_fdf->params);
1913 Safefree(perl_fdf);
1914 }
1915 }
1916
1917 /* These functions (C callbacks) calls the perl callbacks.
1918 Info for perl callback can be found using the 'void*params' parameter
1919 */
call_gsl_function_x_params(SV * function,double x,SV * params)1920 double call_gsl_function_x_params(SV* function, double x, SV *params){
1921 unsigned int count;
1922 double y;
1923 dSP;
1924
1925 //fprintf(stderr, "LOOKUP CALLBACK\n");
1926 ENTER;
1927 SAVETMPS;
1928
1929 PUSHMARK(SP);
1930 XPUSHs(sv_2mortal(newSVnv((double)x)));
1931 XPUSHs(params);
1932 PUTBACK; /* make local stack pointer global */
1933
1934 count = call_sv(function, G_SCALAR);
1935 SPAGAIN;
1936
1937 if (count != 1)
1938 croak("Expected to call subroutine in scalar context!");
1939
1940 y = POPn;
1941
1942 PUTBACK; /* make local stack pointer global */
1943 FREETMPS;
1944 LEAVE;
1945
1946 return y;
1947 }
1948
call_gsl_function(double x,void * params)1949 double call_gsl_function(double x , void *params){
1950 struct gsl_function_perl *F=(struct gsl_function_perl*)params;
1951 return call_gsl_function_x_params( F->function, x, F->params );
1952 }
1953
call_gsl_function_fdf_f(double x,void * params)1954 double call_gsl_function_fdf_f(double x , void *params){
1955 struct gsl_function_fdf_perl *F=(struct gsl_function_fdf_perl*)params;
1956 return call_gsl_function_x_params( F->f, x, F->params );
1957 }
1958
call_gsl_function_fdf_df(double x,void * params)1959 double call_gsl_function_fdf_df(double x , void *params){
1960 struct gsl_function_fdf_perl *F=(struct gsl_function_fdf_perl*)params;
1961 return call_gsl_function_x_params( F->df, x, F->params );
1962 }
1963
call_gsl_function_fdf_fdf(double x,void * params,double * f,double * df)1964 void call_gsl_function_fdf_fdf(double x , void *params, double *f, double *df ){
1965 struct gsl_function_fdf_perl *F=(struct gsl_function_fdf_perl*)params;
1966
1967 dSP;
1968
1969 ENTER;
1970 SAVETMPS;
1971
1972 PUSHMARK(SP);
1973 EXTEND(SP, 2);
1974 PUSHs(sv_2mortal(newSVnv((double)x)));
1975 PUSHs(F->params);
1976 PUTBACK; /* make local stack pointer global */
1977
1978 {
1979 unsigned int count = call_sv(F->fdf, G_ARRAY);
1980 SPAGAIN;
1981
1982 if (count != 2)
1983 croak( "Expected two return values, got %d", count );
1984 }
1985
1986 *df = POPn;
1987 *f = POPn;
1988
1989 PUTBACK; /* make local stack pointer global */
1990 FREETMPS;
1991 LEAVE;
1992 }
1993
call_gsl_monte_function(double * x_array,size_t dim,void * params)1994 double call_gsl_monte_function(double *x_array , size_t dim, void *params){
1995 struct gsl_monte_function_perl *F=(struct gsl_monte_function_perl*)params;
1996 unsigned int count;
1997 unsigned int i;
1998 AV* perl_array;
1999 double y;
2000 dSP;
2001
2002 //fprintf(stderr, "LOOKUP CALLBACK\n");
2003 ENTER;
2004 SAVETMPS;
2005
2006 PUSHMARK(SP);
2007 perl_array=newAV();
2008 sv_2mortal((SV*)perl_array);
2009 XPUSHs(sv_2mortal(newRV((SV *)perl_array)));
2010 for(i=0; i<dim; i++) {
2011 /* no mortal : it is referenced by the array */
2012 av_push(perl_array, newSVnv(x_array[i]));
2013 }
2014 XPUSHs(sv_2mortal(newSViv(dim)));
2015 XPUSHs(F->params);
2016 PUTBACK; /* make local stack pointer global */
2017
2018 count = call_sv(F->f, G_SCALAR);
2019 SPAGAIN;
2020
2021 if (count != 1)
2022 croak("Expected to call subroutine in scalar context!");
2023
2024 y = POPn;
2025
2026 PUTBACK; /* make local stack pointer global */
2027 FREETMPS;
2028 LEAVE;
2029
2030 return y;
2031 }
2032
2033
gsl_function_fdf_extract(char * param_name,HV * hash,SV * func[])2034 void gsl_function_fdf_extract( char* param_name, HV* hash, SV* func[] ) {
2035 static const char *keys[3] = { "f", "df", "fdf" };
2036
2037 int ikey;
2038
2039 for ( ikey = 0 ; ikey < 3 ; ++ikey ) {
2040 func[ikey] = 0;
2041 const char* key = keys[ikey];
2042 /* it just so happens that strlen(keys[ikey]) == ikey + 1 */
2043 SV** pp_sv = hv_fetch( hash, key, ikey+1, 0 );
2044 SV* function;
2045
2046 if ( !pp_sv )
2047 croak("Math::GSL : %s: missing key %s!", param_name, key);
2048
2049 function = *pp_sv;
2050
2051 if ( SvPOK(function) || ( SvROK( function ) && SvTYPE(SvRV(function)) == SVt_PVCV ) ) {
2052 /* hold on to SV after the enclosing hash goes away */
2053 SvREFCNT_inc( function );
2054 func[ikey] = function;
2055 }
2056 else {
2057 croak( "Math::GSL : %s: key %s is not a reference to code!", param_name, key);
2058 }
2059 }
2060 }
2061
2062
2063
2064 #include "gsl/gsl_spmatrix.h"
2065
2066
2067 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,unsigned long * val)2068 SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val)
2069 {
2070 if (SvUOK(obj)) {
2071 UV v = SvUV(obj);
2072 if (UVSIZE <= sizeof(*val) || v <= ULONG_MAX) {
2073 if (val) *val = v;
2074 return SWIG_OK;
2075 }
2076 return SWIG_OverflowError;
2077 } else if (SvIOK(obj)) {
2078 IV v = SvIV(obj);
2079 if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULONG_MAX)) {
2080 if (val) *val = v;
2081 return SWIG_OK;
2082 }
2083 return SWIG_OverflowError;
2084 } else {
2085 int dispatch = 0;
2086 const char *nptr = SvPV_nolen(obj);
2087 if (nptr) {
2088 char *endptr;
2089 unsigned long v;
2090 errno = 0;
2091 v = strtoul(nptr, &endptr,0);
2092 if (errno == ERANGE) {
2093 errno = 0;
2094 return SWIG_OverflowError;
2095 } else {
2096 if (*endptr == '\0') {
2097 if (val) *val = v;
2098 return SWIG_Str2NumCast(SWIG_OK);
2099 }
2100 }
2101 }
2102 if (!dispatch) {
2103 double d;
2104 int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
2105 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
2106 if (val) *val = (unsigned long)(d);
2107 return res;
2108 }
2109 }
2110 }
2111 return SWIG_TypeError;
2112 }
2113
2114
2115 #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
2116 # define SWIG_LONG_LONG_AVAILABLE
2117 #endif
2118
2119
2120 #ifdef SWIG_LONG_LONG_AVAILABLE
2121 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,unsigned long long * val)2122 SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long long *val)
2123 {
2124 if (SvUOK(obj)) {
2125 /* pretty sure this should be conditional on
2126 * (UVSIZE <= sizeof(*val) || v <= ULLONG_MAX) */
2127 if (val) *val = SvUV(obj);
2128 return SWIG_OK;
2129 } else if (SvIOK(obj)) {
2130 IV v = SvIV(obj);
2131 if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULLONG_MAX)) {
2132 if (val) *val = v;
2133 return SWIG_OK;
2134 } else {
2135 return SWIG_OverflowError;
2136 }
2137 } else {
2138 int dispatch = 0;
2139 const char *nptr = SvPV_nolen(obj);
2140 if (nptr) {
2141 char *endptr;
2142 unsigned long long v;
2143 errno = 0;
2144 v = strtoull(nptr, &endptr,0);
2145 if (errno == ERANGE) {
2146 errno = 0;
2147 return SWIG_OverflowError;
2148 } else {
2149 if (*endptr == '\0') {
2150 if (val) *val = v;
2151 return SWIG_Str2NumCast(SWIG_OK);
2152 }
2153 }
2154 }
2155 if (!dispatch) {
2156 const double mant_max = 1LL << DBL_MANT_DIG;
2157 double d;
2158 int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
2159 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
2160 if (val) *val = (unsigned long long)(d);
2161 return res;
2162 }
2163 }
2164 }
2165 return SWIG_TypeError;
2166 }
2167 #endif
2168
2169
2170 SWIGINTERNINLINE int
SWIG_PERL_DECL_ARGS_2(SV * obj,size_t * val)2171 SWIG_AsVal_size_t SWIG_PERL_DECL_ARGS_2(SV * obj, size_t *val)
2172 {
2173 int res = SWIG_TypeError;
2174 #ifdef SWIG_LONG_LONG_AVAILABLE
2175 if (sizeof(size_t) <= sizeof(unsigned long)) {
2176 #endif
2177 unsigned long v;
2178 res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
2179 if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2180 #ifdef SWIG_LONG_LONG_AVAILABLE
2181 } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
2182 unsigned long long v;
2183 res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
2184 if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2185 }
2186 #endif
2187 return res;
2188 }
2189
2190
2191 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(unsigned long value)2192 SWIG_From_unsigned_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long value)
2193 {
2194 SV *sv;
2195 if (UVSIZE >= sizeof(value) || value <= UV_MAX)
2196 sv = newSVuv(value);
2197 else
2198 sv = newSVpvf("%lu", value);
2199 return sv_2mortal(sv);
2200 }
2201
2202
2203 #include <stdio.h>
2204 #if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__BORLANDC__) || defined(_WATCOM)
2205 # ifndef snprintf
2206 # define snprintf _snprintf
2207 # endif
2208 #endif
2209
2210
2211 #ifdef SWIG_LONG_LONG_AVAILABLE
2212 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(unsigned long long value)2213 SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long long value)
2214 {
2215 SV *sv;
2216 if (UVSIZE >= sizeof(value) || value <= UV_MAX)
2217 sv = newSVuv((UV)(value));
2218 else {
2219 //sv = newSVpvf("%llu", value); doesn't work in non 64bit Perl
2220 char temp[256];
2221 sprintf(temp, "%llu", value);
2222 sv = newSVpv(temp, 0);
2223 }
2224 return sv_2mortal(sv);
2225 }
2226 #endif
2227
2228
2229 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(size_t value)2230 SWIG_From_size_t SWIG_PERL_DECL_ARGS_1(size_t value)
2231 {
2232 #ifdef SWIG_LONG_LONG_AVAILABLE
2233 if (sizeof(size_t) <= sizeof(unsigned long)) {
2234 #endif
2235 return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long)(value));
2236 #ifdef SWIG_LONG_LONG_AVAILABLE
2237 } else {
2238 /* assume sizeof(size_t) <= sizeof(unsigned long long) */
2239 return SWIG_From_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_1((unsigned long long)(value));
2240 }
2241 #endif
2242 }
2243
2244 #ifdef __cplusplus
2245 extern "C" {
2246 #endif
2247
2248 #ifdef PERL_OBJECT
2249 #define MAGIC_CLASS _wrap_Math__GSL__SparseMatrix_var::
2250 class _wrap_Math__GSL__SparseMatrix_var : public CPerlObj {
2251 public:
2252 #else
2253 #define MAGIC_CLASS
2254 #endif
swig_magic_readonly(pTHX_ SV * SWIGUNUSEDPARM (sv),MAGIC * SWIGUNUSEDPARM (mg))2255 SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
2256 MAGIC_PPERL
2257 croak("Value is read-only.");
2258 return 0;
2259 }
2260
2261
2262 #ifdef PERL_OBJECT
2263 };
2264 #endif
2265
2266 #ifdef __cplusplus
2267 }
2268 #endif
2269
2270 #ifdef __cplusplus
2271 extern "C" {
2272 #endif
XS(_wrap_gsl_error)2273 XS(_wrap_gsl_error) {
2274 {
2275 char *arg1 = (char *) 0 ;
2276 char *arg2 = (char *) 0 ;
2277 int arg3 ;
2278 int arg4 ;
2279 int res1 ;
2280 char *buf1 = 0 ;
2281 int alloc1 = 0 ;
2282 int res2 ;
2283 char *buf2 = 0 ;
2284 int alloc2 = 0 ;
2285 int val3 ;
2286 int ecode3 = 0 ;
2287 int val4 ;
2288 int ecode4 = 0 ;
2289 int argvi = 0;
2290 dXSARGS;
2291
2292 if ((items < 4) || (items > 4)) {
2293 SWIG_croak("Usage: gsl_error(reason,file,line,gsl_errno);");
2294 }
2295 res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2296 if (!SWIG_IsOK(res1)) {
2297 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_error" "', argument " "1"" of type '" "char const *""'");
2298 }
2299 arg1 = (char *)(buf1);
2300 res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2301 if (!SWIG_IsOK(res2)) {
2302 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_error" "', argument " "2"" of type '" "char const *""'");
2303 }
2304 arg2 = (char *)(buf2);
2305 ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
2306 if (!SWIG_IsOK(ecode3)) {
2307 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_error" "', argument " "3"" of type '" "int""'");
2308 }
2309 arg3 = (int)(val3);
2310 ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
2311 if (!SWIG_IsOK(ecode4)) {
2312 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gsl_error" "', argument " "4"" of type '" "int""'");
2313 }
2314 arg4 = (int)(val4);
2315 gsl_error((char const *)arg1,(char const *)arg2,arg3,arg4);
2316 ST(argvi) = &PL_sv_undef;
2317 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2318 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2319
2320
2321 XSRETURN(argvi);
2322 fail:
2323 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2324 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2325
2326
2327 SWIG_croak_null();
2328 }
2329 }
2330
2331
XS(_wrap_gsl_stream_printf)2332 XS(_wrap_gsl_stream_printf) {
2333 {
2334 char *arg1 = (char *) 0 ;
2335 char *arg2 = (char *) 0 ;
2336 int arg3 ;
2337 char *arg4 = (char *) 0 ;
2338 int res1 ;
2339 char *buf1 = 0 ;
2340 int alloc1 = 0 ;
2341 int res2 ;
2342 char *buf2 = 0 ;
2343 int alloc2 = 0 ;
2344 int val3 ;
2345 int ecode3 = 0 ;
2346 int res4 ;
2347 char *buf4 = 0 ;
2348 int alloc4 = 0 ;
2349 int argvi = 0;
2350 dXSARGS;
2351
2352 if ((items < 4) || (items > 4)) {
2353 SWIG_croak("Usage: gsl_stream_printf(label,file,line,reason);");
2354 }
2355 res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2356 if (!SWIG_IsOK(res1)) {
2357 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_stream_printf" "', argument " "1"" of type '" "char const *""'");
2358 }
2359 arg1 = (char *)(buf1);
2360 res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2361 if (!SWIG_IsOK(res2)) {
2362 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_stream_printf" "', argument " "2"" of type '" "char const *""'");
2363 }
2364 arg2 = (char *)(buf2);
2365 ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
2366 if (!SWIG_IsOK(ecode3)) {
2367 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_stream_printf" "', argument " "3"" of type '" "int""'");
2368 }
2369 arg3 = (int)(val3);
2370 res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
2371 if (!SWIG_IsOK(res4)) {
2372 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gsl_stream_printf" "', argument " "4"" of type '" "char const *""'");
2373 }
2374 arg4 = (char *)(buf4);
2375 gsl_stream_printf((char const *)arg1,(char const *)arg2,arg3,(char const *)arg4);
2376 ST(argvi) = &PL_sv_undef;
2377 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2378 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2379
2380 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2381 XSRETURN(argvi);
2382 fail:
2383 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2384 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2385
2386 if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2387 SWIG_croak_null();
2388 }
2389 }
2390
2391
XS(_wrap_gsl_strerror)2392 XS(_wrap_gsl_strerror) {
2393 {
2394 int arg1 ;
2395 int val1 ;
2396 int ecode1 = 0 ;
2397 int argvi = 0;
2398 char *result = 0 ;
2399 dXSARGS;
2400
2401 if ((items < 1) || (items > 1)) {
2402 SWIG_croak("Usage: gsl_strerror(gsl_errno);");
2403 }
2404 ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
2405 if (!SWIG_IsOK(ecode1)) {
2406 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_strerror" "', argument " "1"" of type '" "int""'");
2407 }
2408 arg1 = (int)(val1);
2409 result = (char *)gsl_strerror(arg1);
2410 ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2411
2412 XSRETURN(argvi);
2413 fail:
2414
2415 SWIG_croak_null();
2416 }
2417 }
2418
2419
XS(_wrap_gsl_set_error_handler)2420 XS(_wrap_gsl_set_error_handler) {
2421 {
2422 gsl_error_handler_t *arg1 = (gsl_error_handler_t *) 0 ;
2423 int argvi = 0;
2424 gsl_error_handler_t *result = 0 ;
2425 dXSARGS;
2426
2427 if ((items < 1) || (items > 1)) {
2428 SWIG_croak("Usage: gsl_set_error_handler(new_handler);");
2429 }
2430 {
2431 int res = SWIG_ConvertFunctionPtr(ST(0), (void**)(&arg1), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void);
2432 if (!SWIG_IsOK(res)) {
2433 SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_set_error_handler" "', argument " "1"" of type '" "gsl_error_handler_t *""'");
2434 }
2435 }
2436 result = (gsl_error_handler_t *)gsl_set_error_handler(arg1);
2437 ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void); argvi++ ;
2438
2439 XSRETURN(argvi);
2440 fail:
2441
2442 SWIG_croak_null();
2443 }
2444 }
2445
2446
XS(_wrap_gsl_set_error_handler_off)2447 XS(_wrap_gsl_set_error_handler_off) {
2448 {
2449 int argvi = 0;
2450 gsl_error_handler_t *result = 0 ;
2451 dXSARGS;
2452
2453 if ((items < 0) || (items > 0)) {
2454 SWIG_croak("Usage: gsl_set_error_handler_off();");
2455 }
2456 result = (gsl_error_handler_t *)gsl_set_error_handler_off();
2457 ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_int__void); argvi++ ;
2458 XSRETURN(argvi);
2459 fail:
2460 SWIG_croak_null();
2461 }
2462 }
2463
2464
XS(_wrap_gsl_set_stream_handler)2465 XS(_wrap_gsl_set_stream_handler) {
2466 {
2467 gsl_stream_handler_t *arg1 = (gsl_stream_handler_t *) 0 ;
2468 int argvi = 0;
2469 gsl_stream_handler_t *result = 0 ;
2470 dXSARGS;
2471
2472 if ((items < 1) || (items > 1)) {
2473 SWIG_croak("Usage: gsl_set_stream_handler(new_handler);");
2474 }
2475 {
2476 int res = SWIG_ConvertFunctionPtr(ST(0), (void**)(&arg1), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void);
2477 if (!SWIG_IsOK(res)) {
2478 SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gsl_set_stream_handler" "', argument " "1"" of type '" "gsl_stream_handler_t *""'");
2479 }
2480 }
2481 result = (gsl_stream_handler_t *)gsl_set_stream_handler(arg1);
2482 ST(argvi) = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void); argvi++ ;
2483
2484 XSRETURN(argvi);
2485 fail:
2486
2487 SWIG_croak_null();
2488 }
2489 }
2490
2491
XS(_wrap_gsl_set_stream)2492 XS(_wrap_gsl_set_stream) {
2493 {
2494 FILE *arg1 = (FILE *) 0 ;
2495 void *argp1 = 0 ;
2496 int res1 = 0 ;
2497 int argvi = 0;
2498 FILE *result = 0 ;
2499 dXSARGS;
2500
2501 if ((items < 1) || (items > 1)) {
2502 SWIG_croak("Usage: gsl_set_stream(new_stream);");
2503 }
2504 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FILE, 0 | 0 );
2505 if (!SWIG_IsOK(res1)) {
2506 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_set_stream" "', argument " "1"" of type '" "FILE *""'");
2507 }
2508 arg1 = (FILE *)(argp1);
2509 result = (FILE *)gsl_set_stream(arg1);
2510 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FILE, 0 | 0); argvi++ ;
2511
2512 XSRETURN(argvi);
2513 fail:
2514
2515 SWIG_croak_null();
2516 }
2517 }
2518
2519
XS(_wrap_gsl_spmatrix_tree_tree_set)2520 XS(_wrap_gsl_spmatrix_tree_tree_set) {
2521 {
2522 gsl_spmatrix_tree *arg1 = (gsl_spmatrix_tree *) 0 ;
2523 void *arg2 = (void *) 0 ;
2524 void *argp1 = 0 ;
2525 int res1 = 0 ;
2526 int res2 ;
2527 int argvi = 0;
2528 dXSARGS;
2529
2530 if ((items < 2) || (items > 2)) {
2531 SWIG_croak("Usage: gsl_spmatrix_tree_tree_set(self,tree);");
2532 }
2533 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix_tree, 0 | 0 );
2534 if (!SWIG_IsOK(res1)) {
2535 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_tree_tree_set" "', argument " "1"" of type '" "gsl_spmatrix_tree *""'");
2536 }
2537 arg1 = (gsl_spmatrix_tree *)(argp1);
2538 res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2539 if (!SWIG_IsOK(res2)) {
2540 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_tree_tree_set" "', argument " "2"" of type '" "void *""'");
2541 }
2542 if (arg1) (arg1)->tree = arg2;
2543 ST(argvi) = &PL_sv_undef;
2544
2545
2546 XSRETURN(argvi);
2547 fail:
2548
2549
2550 SWIG_croak_null();
2551 }
2552 }
2553
2554
XS(_wrap_gsl_spmatrix_tree_tree_get)2555 XS(_wrap_gsl_spmatrix_tree_tree_get) {
2556 {
2557 gsl_spmatrix_tree *arg1 = (gsl_spmatrix_tree *) 0 ;
2558 void *argp1 = 0 ;
2559 int res1 = 0 ;
2560 int argvi = 0;
2561 void *result = 0 ;
2562 dXSARGS;
2563
2564 if ((items < 1) || (items > 1)) {
2565 SWIG_croak("Usage: gsl_spmatrix_tree_tree_get(self);");
2566 }
2567 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix_tree, 0 | 0 );
2568 if (!SWIG_IsOK(res1)) {
2569 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_tree_tree_get" "', argument " "1"" of type '" "gsl_spmatrix_tree *""'");
2570 }
2571 arg1 = (gsl_spmatrix_tree *)(argp1);
2572 result = (void *) ((arg1)->tree);
2573 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ;
2574
2575 XSRETURN(argvi);
2576 fail:
2577
2578 SWIG_croak_null();
2579 }
2580 }
2581
2582
XS(_wrap_gsl_spmatrix_tree_node_array_set)2583 XS(_wrap_gsl_spmatrix_tree_node_array_set) {
2584 {
2585 gsl_spmatrix_tree *arg1 = (gsl_spmatrix_tree *) 0 ;
2586 void *arg2 = (void *) 0 ;
2587 void *argp1 = 0 ;
2588 int res1 = 0 ;
2589 int res2 ;
2590 int argvi = 0;
2591 dXSARGS;
2592
2593 if ((items < 2) || (items > 2)) {
2594 SWIG_croak("Usage: gsl_spmatrix_tree_node_array_set(self,node_array);");
2595 }
2596 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix_tree, 0 | 0 );
2597 if (!SWIG_IsOK(res1)) {
2598 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_tree_node_array_set" "', argument " "1"" of type '" "gsl_spmatrix_tree *""'");
2599 }
2600 arg1 = (gsl_spmatrix_tree *)(argp1);
2601 res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2602 if (!SWIG_IsOK(res2)) {
2603 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_tree_node_array_set" "', argument " "2"" of type '" "void *""'");
2604 }
2605 if (arg1) (arg1)->node_array = arg2;
2606 ST(argvi) = &PL_sv_undef;
2607
2608
2609 XSRETURN(argvi);
2610 fail:
2611
2612
2613 SWIG_croak_null();
2614 }
2615 }
2616
2617
XS(_wrap_gsl_spmatrix_tree_node_array_get)2618 XS(_wrap_gsl_spmatrix_tree_node_array_get) {
2619 {
2620 gsl_spmatrix_tree *arg1 = (gsl_spmatrix_tree *) 0 ;
2621 void *argp1 = 0 ;
2622 int res1 = 0 ;
2623 int argvi = 0;
2624 void *result = 0 ;
2625 dXSARGS;
2626
2627 if ((items < 1) || (items > 1)) {
2628 SWIG_croak("Usage: gsl_spmatrix_tree_node_array_get(self);");
2629 }
2630 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix_tree, 0 | 0 );
2631 if (!SWIG_IsOK(res1)) {
2632 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_tree_node_array_get" "', argument " "1"" of type '" "gsl_spmatrix_tree *""'");
2633 }
2634 arg1 = (gsl_spmatrix_tree *)(argp1);
2635 result = (void *) ((arg1)->node_array);
2636 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ;
2637
2638 XSRETURN(argvi);
2639 fail:
2640
2641 SWIG_croak_null();
2642 }
2643 }
2644
2645
XS(_wrap_gsl_spmatrix_tree_n_set)2646 XS(_wrap_gsl_spmatrix_tree_n_set) {
2647 {
2648 gsl_spmatrix_tree *arg1 = (gsl_spmatrix_tree *) 0 ;
2649 size_t arg2 ;
2650 void *argp1 = 0 ;
2651 int res1 = 0 ;
2652 size_t val2 ;
2653 int ecode2 = 0 ;
2654 int argvi = 0;
2655 dXSARGS;
2656
2657 if ((items < 2) || (items > 2)) {
2658 SWIG_croak("Usage: gsl_spmatrix_tree_n_set(self,n);");
2659 }
2660 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix_tree, 0 | 0 );
2661 if (!SWIG_IsOK(res1)) {
2662 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_tree_n_set" "', argument " "1"" of type '" "gsl_spmatrix_tree *""'");
2663 }
2664 arg1 = (gsl_spmatrix_tree *)(argp1);
2665 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2666 if (!SWIG_IsOK(ecode2)) {
2667 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_tree_n_set" "', argument " "2"" of type '" "size_t""'");
2668 }
2669 arg2 = (size_t)(val2);
2670 if (arg1) (arg1)->n = arg2;
2671 ST(argvi) = &PL_sv_undef;
2672
2673
2674 XSRETURN(argvi);
2675 fail:
2676
2677
2678 SWIG_croak_null();
2679 }
2680 }
2681
2682
XS(_wrap_gsl_spmatrix_tree_n_get)2683 XS(_wrap_gsl_spmatrix_tree_n_get) {
2684 {
2685 gsl_spmatrix_tree *arg1 = (gsl_spmatrix_tree *) 0 ;
2686 void *argp1 = 0 ;
2687 int res1 = 0 ;
2688 int argvi = 0;
2689 size_t result;
2690 dXSARGS;
2691
2692 if ((items < 1) || (items > 1)) {
2693 SWIG_croak("Usage: gsl_spmatrix_tree_n_get(self);");
2694 }
2695 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix_tree, 0 | 0 );
2696 if (!SWIG_IsOK(res1)) {
2697 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_tree_n_get" "', argument " "1"" of type '" "gsl_spmatrix_tree *""'");
2698 }
2699 arg1 = (gsl_spmatrix_tree *)(argp1);
2700 result = ((arg1)->n);
2701 ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ;
2702
2703 XSRETURN(argvi);
2704 fail:
2705
2706 SWIG_croak_null();
2707 }
2708 }
2709
2710
XS(_wrap_new_gsl_spmatrix_tree)2711 XS(_wrap_new_gsl_spmatrix_tree) {
2712 {
2713 int argvi = 0;
2714 gsl_spmatrix_tree *result = 0 ;
2715 dXSARGS;
2716
2717 if ((items < 0) || (items > 0)) {
2718 SWIG_croak("Usage: new_gsl_spmatrix_tree();");
2719 }
2720 result = (gsl_spmatrix_tree *)calloc(1, sizeof(gsl_spmatrix_tree));
2721 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_spmatrix_tree, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2722 XSRETURN(argvi);
2723 fail:
2724 SWIG_croak_null();
2725 }
2726 }
2727
2728
XS(_wrap_delete_gsl_spmatrix_tree)2729 XS(_wrap_delete_gsl_spmatrix_tree) {
2730 {
2731 gsl_spmatrix_tree *arg1 = (gsl_spmatrix_tree *) 0 ;
2732 void *argp1 = 0 ;
2733 int res1 = 0 ;
2734 int argvi = 0;
2735 dXSARGS;
2736
2737 if ((items < 1) || (items > 1)) {
2738 SWIG_croak("Usage: delete_gsl_spmatrix_tree(self);");
2739 }
2740 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix_tree, SWIG_POINTER_DISOWN | 0 );
2741 if (!SWIG_IsOK(res1)) {
2742 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsl_spmatrix_tree" "', argument " "1"" of type '" "gsl_spmatrix_tree *""'");
2743 }
2744 arg1 = (gsl_spmatrix_tree *)(argp1);
2745 free((char *) arg1);
2746 ST(argvi) = &PL_sv_undef;
2747
2748 XSRETURN(argvi);
2749 fail:
2750
2751 SWIG_croak_null();
2752 }
2753 }
2754
2755
XS(_wrap_gsl_spmatrix_size1_set)2756 XS(_wrap_gsl_spmatrix_size1_set) {
2757 {
2758 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
2759 size_t arg2 ;
2760 void *argp1 = 0 ;
2761 int res1 = 0 ;
2762 size_t val2 ;
2763 int ecode2 = 0 ;
2764 int argvi = 0;
2765 dXSARGS;
2766
2767 if ((items < 2) || (items > 2)) {
2768 SWIG_croak("Usage: gsl_spmatrix_size1_set(self,size1);");
2769 }
2770 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
2771 if (!SWIG_IsOK(res1)) {
2772 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_size1_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
2773 }
2774 arg1 = (gsl_spmatrix *)(argp1);
2775 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2776 if (!SWIG_IsOK(ecode2)) {
2777 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_size1_set" "', argument " "2"" of type '" "size_t""'");
2778 }
2779 arg2 = (size_t)(val2);
2780 if (arg1) (arg1)->size1 = arg2;
2781 ST(argvi) = &PL_sv_undef;
2782
2783
2784 XSRETURN(argvi);
2785 fail:
2786
2787
2788 SWIG_croak_null();
2789 }
2790 }
2791
2792
XS(_wrap_gsl_spmatrix_size1_get)2793 XS(_wrap_gsl_spmatrix_size1_get) {
2794 {
2795 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
2796 void *argp1 = 0 ;
2797 int res1 = 0 ;
2798 int argvi = 0;
2799 size_t result;
2800 dXSARGS;
2801
2802 if ((items < 1) || (items > 1)) {
2803 SWIG_croak("Usage: gsl_spmatrix_size1_get(self);");
2804 }
2805 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
2806 if (!SWIG_IsOK(res1)) {
2807 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_size1_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
2808 }
2809 arg1 = (gsl_spmatrix *)(argp1);
2810 result = ((arg1)->size1);
2811 ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ;
2812
2813 XSRETURN(argvi);
2814 fail:
2815
2816 SWIG_croak_null();
2817 }
2818 }
2819
2820
XS(_wrap_gsl_spmatrix_size2_set)2821 XS(_wrap_gsl_spmatrix_size2_set) {
2822 {
2823 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
2824 size_t arg2 ;
2825 void *argp1 = 0 ;
2826 int res1 = 0 ;
2827 size_t val2 ;
2828 int ecode2 = 0 ;
2829 int argvi = 0;
2830 dXSARGS;
2831
2832 if ((items < 2) || (items > 2)) {
2833 SWIG_croak("Usage: gsl_spmatrix_size2_set(self,size2);");
2834 }
2835 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
2836 if (!SWIG_IsOK(res1)) {
2837 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_size2_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
2838 }
2839 arg1 = (gsl_spmatrix *)(argp1);
2840 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2841 if (!SWIG_IsOK(ecode2)) {
2842 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_size2_set" "', argument " "2"" of type '" "size_t""'");
2843 }
2844 arg2 = (size_t)(val2);
2845 if (arg1) (arg1)->size2 = arg2;
2846 ST(argvi) = &PL_sv_undef;
2847
2848
2849 XSRETURN(argvi);
2850 fail:
2851
2852
2853 SWIG_croak_null();
2854 }
2855 }
2856
2857
XS(_wrap_gsl_spmatrix_size2_get)2858 XS(_wrap_gsl_spmatrix_size2_get) {
2859 {
2860 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
2861 void *argp1 = 0 ;
2862 int res1 = 0 ;
2863 int argvi = 0;
2864 size_t result;
2865 dXSARGS;
2866
2867 if ((items < 1) || (items > 1)) {
2868 SWIG_croak("Usage: gsl_spmatrix_size2_get(self);");
2869 }
2870 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
2871 if (!SWIG_IsOK(res1)) {
2872 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_size2_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
2873 }
2874 arg1 = (gsl_spmatrix *)(argp1);
2875 result = ((arg1)->size2);
2876 ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ;
2877
2878 XSRETURN(argvi);
2879 fail:
2880
2881 SWIG_croak_null();
2882 }
2883 }
2884
2885
XS(_wrap_gsl_spmatrix_i_set)2886 XS(_wrap_gsl_spmatrix_i_set) {
2887 {
2888 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
2889 size_t *arg2 = (size_t *) 0 ;
2890 void *argp1 = 0 ;
2891 int res1 = 0 ;
2892 void *argp2 = 0 ;
2893 int res2 = 0 ;
2894 int argvi = 0;
2895 dXSARGS;
2896
2897 if ((items < 2) || (items > 2)) {
2898 SWIG_croak("Usage: gsl_spmatrix_i_set(self,i);");
2899 }
2900 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
2901 if (!SWIG_IsOK(res1)) {
2902 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_i_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
2903 }
2904 arg1 = (gsl_spmatrix *)(argp1);
2905 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_size_t, SWIG_POINTER_DISOWN | 0 );
2906 if (!SWIG_IsOK(res2)) {
2907 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_i_set" "', argument " "2"" of type '" "size_t *""'");
2908 }
2909 arg2 = (size_t *)(argp2);
2910 if (arg1) (arg1)->i = arg2;
2911 ST(argvi) = &PL_sv_undef;
2912
2913
2914 XSRETURN(argvi);
2915 fail:
2916
2917
2918 SWIG_croak_null();
2919 }
2920 }
2921
2922
XS(_wrap_gsl_spmatrix_i_get)2923 XS(_wrap_gsl_spmatrix_i_get) {
2924 {
2925 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
2926 void *argp1 = 0 ;
2927 int res1 = 0 ;
2928 int argvi = 0;
2929 size_t *result = 0 ;
2930 dXSARGS;
2931
2932 if ((items < 1) || (items > 1)) {
2933 SWIG_croak("Usage: gsl_spmatrix_i_get(self);");
2934 }
2935 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
2936 if (!SWIG_IsOK(res1)) {
2937 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_i_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
2938 }
2939 arg1 = (gsl_spmatrix *)(argp1);
2940 result = (size_t *) ((arg1)->i);
2941 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_size_t, 0 | 0); argvi++ ;
2942
2943 XSRETURN(argvi);
2944 fail:
2945
2946 SWIG_croak_null();
2947 }
2948 }
2949
2950
XS(_wrap_gsl_spmatrix_data_set)2951 XS(_wrap_gsl_spmatrix_data_set) {
2952 {
2953 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
2954 double *arg2 = (double *) 0 ;
2955 void *argp1 = 0 ;
2956 int res1 = 0 ;
2957 int argvi = 0;
2958 dXSARGS;
2959
2960 if ((items < 2) || (items > 2)) {
2961 SWIG_croak("Usage: gsl_spmatrix_data_set(self,data);");
2962 }
2963 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
2964 if (!SWIG_IsOK(res1)) {
2965 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_data_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
2966 }
2967 arg1 = (gsl_spmatrix *)(argp1);
2968 {
2969 AV *tempav;
2970 I32 len;
2971 int i;
2972 SV **tv;
2973 if (!SvROK(ST(1)))
2974 croak("Math::GSL : $data is not a reference!");
2975 if (SvTYPE(SvRV(ST(1))) != SVt_PVAV)
2976 croak("Math::GSL : $data is not an array ref!");
2977
2978 tempav = (AV*)SvRV(ST(1));
2979 len = av_len(tempav);
2980 arg2 = (double *) malloc((len+2)*sizeof(double));
2981 for (i = 0; i <= len; i++) {
2982 tv = av_fetch(tempav, i, 0);
2983 arg2[i] = (double) SvNV(*tv);
2984 }
2985 }
2986 if (arg1) (arg1)->data = arg2;
2987 ST(argvi) = &PL_sv_undef;
2988
2989 {
2990 if (arg2) free(arg2);
2991 }
2992 XSRETURN(argvi);
2993 fail:
2994
2995 {
2996 if (arg2) free(arg2);
2997 }
2998 SWIG_croak_null();
2999 }
3000 }
3001
3002
XS(_wrap_gsl_spmatrix_data_get)3003 XS(_wrap_gsl_spmatrix_data_get) {
3004 {
3005 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3006 void *argp1 = 0 ;
3007 int res1 = 0 ;
3008 int argvi = 0;
3009 double *result = 0 ;
3010 dXSARGS;
3011
3012 if ((items < 1) || (items > 1)) {
3013 SWIG_croak("Usage: gsl_spmatrix_data_get(self);");
3014 }
3015 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3016 if (!SWIG_IsOK(res1)) {
3017 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_data_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3018 }
3019 arg1 = (gsl_spmatrix *)(argp1);
3020 result = (double *) ((arg1)->data);
3021 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); argvi++ ;
3022
3023 XSRETURN(argvi);
3024 fail:
3025
3026 SWIG_croak_null();
3027 }
3028 }
3029
3030
XS(_wrap_gsl_spmatrix_p_set)3031 XS(_wrap_gsl_spmatrix_p_set) {
3032 {
3033 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3034 size_t *arg2 = (size_t *) 0 ;
3035 void *argp1 = 0 ;
3036 int res1 = 0 ;
3037 int argvi = 0;
3038 dXSARGS;
3039
3040 if ((items < 2) || (items > 2)) {
3041 SWIG_croak("Usage: gsl_spmatrix_p_set(self,p);");
3042 }
3043 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3044 if (!SWIG_IsOK(res1)) {
3045 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_p_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3046 }
3047 arg1 = (gsl_spmatrix *)(argp1);
3048 {
3049 AV *tempav;
3050 I32 len;
3051 int i;
3052 SV **tv;
3053 if (!SvROK(ST(1)))
3054 croak("Math::GSL : $p is not a reference!");
3055 if (SvTYPE(SvRV(ST(1))) != SVt_PVAV)
3056 croak("Math::GSL : $p is not an array ref!");
3057
3058 tempav = (AV*)SvRV(ST(1));
3059 len = av_len(tempav);
3060 /* Why does this need to be len+2 ? */
3061 arg2 = (size_t *) malloc((len+2)*sizeof(size_t));
3062 for (i = 0; i <= len; i++) {
3063 tv = av_fetch(tempav, i, 0);
3064 arg2[i] = (size_t) SvIV(*tv);
3065 }
3066 }
3067 if (arg1) (arg1)->p = arg2;
3068 ST(argvi) = &PL_sv_undef;
3069
3070 {
3071 // if (arg2) free(arg2);
3072 }
3073 XSRETURN(argvi);
3074 fail:
3075
3076 {
3077 // if (arg2) free(arg2);
3078 }
3079 SWIG_croak_null();
3080 }
3081 }
3082
3083
XS(_wrap_gsl_spmatrix_p_get)3084 XS(_wrap_gsl_spmatrix_p_get) {
3085 {
3086 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3087 void *argp1 = 0 ;
3088 int res1 = 0 ;
3089 int argvi = 0;
3090 size_t *result = 0 ;
3091 dXSARGS;
3092
3093 if ((items < 1) || (items > 1)) {
3094 SWIG_croak("Usage: gsl_spmatrix_p_get(self);");
3095 }
3096 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3097 if (!SWIG_IsOK(res1)) {
3098 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_p_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3099 }
3100 arg1 = (gsl_spmatrix *)(argp1);
3101 result = (size_t *) ((arg1)->p);
3102 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_size_t, 0 | 0); argvi++ ;
3103
3104 XSRETURN(argvi);
3105 fail:
3106
3107 SWIG_croak_null();
3108 }
3109 }
3110
3111
XS(_wrap_gsl_spmatrix_nzmax_set)3112 XS(_wrap_gsl_spmatrix_nzmax_set) {
3113 {
3114 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3115 size_t arg2 ;
3116 void *argp1 = 0 ;
3117 int res1 = 0 ;
3118 size_t val2 ;
3119 int ecode2 = 0 ;
3120 int argvi = 0;
3121 dXSARGS;
3122
3123 if ((items < 2) || (items > 2)) {
3124 SWIG_croak("Usage: gsl_spmatrix_nzmax_set(self,nzmax);");
3125 }
3126 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3127 if (!SWIG_IsOK(res1)) {
3128 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_nzmax_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3129 }
3130 arg1 = (gsl_spmatrix *)(argp1);
3131 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3132 if (!SWIG_IsOK(ecode2)) {
3133 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_nzmax_set" "', argument " "2"" of type '" "size_t""'");
3134 }
3135 arg2 = (size_t)(val2);
3136 if (arg1) (arg1)->nzmax = arg2;
3137 ST(argvi) = &PL_sv_undef;
3138
3139
3140 XSRETURN(argvi);
3141 fail:
3142
3143
3144 SWIG_croak_null();
3145 }
3146 }
3147
3148
XS(_wrap_gsl_spmatrix_nzmax_get)3149 XS(_wrap_gsl_spmatrix_nzmax_get) {
3150 {
3151 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3152 void *argp1 = 0 ;
3153 int res1 = 0 ;
3154 int argvi = 0;
3155 size_t result;
3156 dXSARGS;
3157
3158 if ((items < 1) || (items > 1)) {
3159 SWIG_croak("Usage: gsl_spmatrix_nzmax_get(self);");
3160 }
3161 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3162 if (!SWIG_IsOK(res1)) {
3163 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_nzmax_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3164 }
3165 arg1 = (gsl_spmatrix *)(argp1);
3166 result = ((arg1)->nzmax);
3167 ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ;
3168
3169 XSRETURN(argvi);
3170 fail:
3171
3172 SWIG_croak_null();
3173 }
3174 }
3175
3176
XS(_wrap_gsl_spmatrix_nz_set)3177 XS(_wrap_gsl_spmatrix_nz_set) {
3178 {
3179 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3180 size_t arg2 ;
3181 void *argp1 = 0 ;
3182 int res1 = 0 ;
3183 size_t val2 ;
3184 int ecode2 = 0 ;
3185 int argvi = 0;
3186 dXSARGS;
3187
3188 if ((items < 2) || (items > 2)) {
3189 SWIG_croak("Usage: gsl_spmatrix_nz_set(self,nz);");
3190 }
3191 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3192 if (!SWIG_IsOK(res1)) {
3193 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_nz_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3194 }
3195 arg1 = (gsl_spmatrix *)(argp1);
3196 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3197 if (!SWIG_IsOK(ecode2)) {
3198 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_nz_set" "', argument " "2"" of type '" "size_t""'");
3199 }
3200 arg2 = (size_t)(val2);
3201 if (arg1) (arg1)->nz = arg2;
3202 ST(argvi) = &PL_sv_undef;
3203
3204
3205 XSRETURN(argvi);
3206 fail:
3207
3208
3209 SWIG_croak_null();
3210 }
3211 }
3212
3213
XS(_wrap_gsl_spmatrix_nz_get)3214 XS(_wrap_gsl_spmatrix_nz_get) {
3215 {
3216 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3217 void *argp1 = 0 ;
3218 int res1 = 0 ;
3219 int argvi = 0;
3220 size_t result;
3221 dXSARGS;
3222
3223 if ((items < 1) || (items > 1)) {
3224 SWIG_croak("Usage: gsl_spmatrix_nz_get(self);");
3225 }
3226 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3227 if (!SWIG_IsOK(res1)) {
3228 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_nz_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3229 }
3230 arg1 = (gsl_spmatrix *)(argp1);
3231 result = ((arg1)->nz);
3232 ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ;
3233
3234 XSRETURN(argvi);
3235 fail:
3236
3237 SWIG_croak_null();
3238 }
3239 }
3240
3241
XS(_wrap_gsl_spmatrix_tree_data_set)3242 XS(_wrap_gsl_spmatrix_tree_data_set) {
3243 {
3244 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3245 gsl_spmatrix_tree *arg2 = (gsl_spmatrix_tree *) 0 ;
3246 void *argp1 = 0 ;
3247 int res1 = 0 ;
3248 void *argp2 = 0 ;
3249 int res2 = 0 ;
3250 int argvi = 0;
3251 dXSARGS;
3252
3253 if ((items < 2) || (items > 2)) {
3254 SWIG_croak("Usage: gsl_spmatrix_tree_data_set(self,tree_data);");
3255 }
3256 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3257 if (!SWIG_IsOK(res1)) {
3258 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_tree_data_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3259 }
3260 arg1 = (gsl_spmatrix *)(argp1);
3261 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix_tree, SWIG_POINTER_DISOWN | 0 );
3262 if (!SWIG_IsOK(res2)) {
3263 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_tree_data_set" "', argument " "2"" of type '" "gsl_spmatrix_tree *""'");
3264 }
3265 arg2 = (gsl_spmatrix_tree *)(argp2);
3266 if (arg1) (arg1)->tree_data = arg2;
3267 ST(argvi) = &PL_sv_undef;
3268
3269
3270 XSRETURN(argvi);
3271 fail:
3272
3273
3274 SWIG_croak_null();
3275 }
3276 }
3277
3278
XS(_wrap_gsl_spmatrix_tree_data_get)3279 XS(_wrap_gsl_spmatrix_tree_data_get) {
3280 {
3281 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3282 void *argp1 = 0 ;
3283 int res1 = 0 ;
3284 int argvi = 0;
3285 gsl_spmatrix_tree *result = 0 ;
3286 dXSARGS;
3287
3288 if ((items < 1) || (items > 1)) {
3289 SWIG_croak("Usage: gsl_spmatrix_tree_data_get(self);");
3290 }
3291 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3292 if (!SWIG_IsOK(res1)) {
3293 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_tree_data_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3294 }
3295 arg1 = (gsl_spmatrix *)(argp1);
3296 result = (gsl_spmatrix_tree *) ((arg1)->tree_data);
3297 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_spmatrix_tree, 0 | SWIG_SHADOW); argvi++ ;
3298
3299 XSRETURN(argvi);
3300 fail:
3301
3302 SWIG_croak_null();
3303 }
3304 }
3305
3306
XS(_wrap_gsl_spmatrix_work_set)3307 XS(_wrap_gsl_spmatrix_work_set) {
3308 {
3309 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3310 void *arg2 = (void *) 0 ;
3311 void *argp1 = 0 ;
3312 int res1 = 0 ;
3313 int res2 ;
3314 int argvi = 0;
3315 dXSARGS;
3316
3317 if ((items < 2) || (items > 2)) {
3318 SWIG_croak("Usage: gsl_spmatrix_work_set(self,work);");
3319 }
3320 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3321 if (!SWIG_IsOK(res1)) {
3322 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_work_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3323 }
3324 arg1 = (gsl_spmatrix *)(argp1);
3325 res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
3326 if (!SWIG_IsOK(res2)) {
3327 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_work_set" "', argument " "2"" of type '" "void *""'");
3328 }
3329 if (arg1) (arg1)->work = arg2;
3330 ST(argvi) = &PL_sv_undef;
3331
3332
3333 XSRETURN(argvi);
3334 fail:
3335
3336
3337 SWIG_croak_null();
3338 }
3339 }
3340
3341
XS(_wrap_gsl_spmatrix_work_get)3342 XS(_wrap_gsl_spmatrix_work_get) {
3343 {
3344 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3345 void *argp1 = 0 ;
3346 int res1 = 0 ;
3347 int argvi = 0;
3348 void *result = 0 ;
3349 dXSARGS;
3350
3351 if ((items < 1) || (items > 1)) {
3352 SWIG_croak("Usage: gsl_spmatrix_work_get(self);");
3353 }
3354 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3355 if (!SWIG_IsOK(res1)) {
3356 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_work_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3357 }
3358 arg1 = (gsl_spmatrix *)(argp1);
3359 result = (void *) ((arg1)->work);
3360 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ;
3361
3362 XSRETURN(argvi);
3363 fail:
3364
3365 SWIG_croak_null();
3366 }
3367 }
3368
3369
XS(_wrap_gsl_spmatrix_sptype_set)3370 XS(_wrap_gsl_spmatrix_sptype_set) {
3371 {
3372 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3373 size_t arg2 ;
3374 void *argp1 = 0 ;
3375 int res1 = 0 ;
3376 size_t val2 ;
3377 int ecode2 = 0 ;
3378 int argvi = 0;
3379 dXSARGS;
3380
3381 if ((items < 2) || (items > 2)) {
3382 SWIG_croak("Usage: gsl_spmatrix_sptype_set(self,sptype);");
3383 }
3384 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3385 if (!SWIG_IsOK(res1)) {
3386 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_sptype_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3387 }
3388 arg1 = (gsl_spmatrix *)(argp1);
3389 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3390 if (!SWIG_IsOK(ecode2)) {
3391 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_sptype_set" "', argument " "2"" of type '" "size_t""'");
3392 }
3393 arg2 = (size_t)(val2);
3394 if (arg1) (arg1)->sptype = arg2;
3395 ST(argvi) = &PL_sv_undef;
3396
3397
3398 XSRETURN(argvi);
3399 fail:
3400
3401
3402 SWIG_croak_null();
3403 }
3404 }
3405
3406
XS(_wrap_gsl_spmatrix_sptype_get)3407 XS(_wrap_gsl_spmatrix_sptype_get) {
3408 {
3409 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3410 void *argp1 = 0 ;
3411 int res1 = 0 ;
3412 int argvi = 0;
3413 size_t result;
3414 dXSARGS;
3415
3416 if ((items < 1) || (items > 1)) {
3417 SWIG_croak("Usage: gsl_spmatrix_sptype_get(self);");
3418 }
3419 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3420 if (!SWIG_IsOK(res1)) {
3421 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_sptype_get" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3422 }
3423 arg1 = (gsl_spmatrix *)(argp1);
3424 result = ((arg1)->sptype);
3425 ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ;
3426
3427 XSRETURN(argvi);
3428 fail:
3429
3430 SWIG_croak_null();
3431 }
3432 }
3433
3434
XS(_wrap_new_gsl_spmatrix)3435 XS(_wrap_new_gsl_spmatrix) {
3436 {
3437 int argvi = 0;
3438 gsl_spmatrix *result = 0 ;
3439 dXSARGS;
3440
3441 if ((items < 0) || (items > 0)) {
3442 SWIG_croak("Usage: new_gsl_spmatrix();");
3443 }
3444 result = (gsl_spmatrix *)calloc(1, sizeof(gsl_spmatrix));
3445 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_spmatrix, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
3446 XSRETURN(argvi);
3447 fail:
3448 SWIG_croak_null();
3449 }
3450 }
3451
3452
XS(_wrap_delete_gsl_spmatrix)3453 XS(_wrap_delete_gsl_spmatrix) {
3454 {
3455 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3456 void *argp1 = 0 ;
3457 int res1 = 0 ;
3458 int argvi = 0;
3459 dXSARGS;
3460
3461 if ((items < 1) || (items > 1)) {
3462 SWIG_croak("Usage: delete_gsl_spmatrix(self);");
3463 }
3464 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, SWIG_POINTER_DISOWN | 0 );
3465 if (!SWIG_IsOK(res1)) {
3466 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gsl_spmatrix" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3467 }
3468 arg1 = (gsl_spmatrix *)(argp1);
3469 free((char *) arg1);
3470 ST(argvi) = &PL_sv_undef;
3471
3472 XSRETURN(argvi);
3473 fail:
3474
3475 SWIG_croak_null();
3476 }
3477 }
3478
3479
XS(_wrap_gsl_spmatrix_alloc)3480 XS(_wrap_gsl_spmatrix_alloc) {
3481 {
3482 size_t arg1 ;
3483 size_t arg2 ;
3484 size_t val1 ;
3485 int ecode1 = 0 ;
3486 size_t val2 ;
3487 int ecode2 = 0 ;
3488 int argvi = 0;
3489 gsl_spmatrix *result = 0 ;
3490 dXSARGS;
3491
3492 if ((items < 2) || (items > 2)) {
3493 SWIG_croak("Usage: gsl_spmatrix_alloc(n1,n2);");
3494 }
3495 ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
3496 if (!SWIG_IsOK(ecode1)) {
3497 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_spmatrix_alloc" "', argument " "1"" of type '" "size_t""'");
3498 }
3499 arg1 = (size_t)(val1);
3500 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3501 if (!SWIG_IsOK(ecode2)) {
3502 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_alloc" "', argument " "2"" of type '" "size_t""'");
3503 }
3504 arg2 = (size_t)(val2);
3505 result = (gsl_spmatrix *)gsl_spmatrix_alloc(arg1,arg2);
3506 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_spmatrix, 0 | SWIG_SHADOW); argvi++ ;
3507
3508
3509 XSRETURN(argvi);
3510 fail:
3511
3512
3513 SWIG_croak_null();
3514 }
3515 }
3516
3517
XS(_wrap_gsl_spmatrix_alloc_nzmax)3518 XS(_wrap_gsl_spmatrix_alloc_nzmax) {
3519 {
3520 size_t arg1 ;
3521 size_t arg2 ;
3522 size_t arg3 ;
3523 size_t arg4 ;
3524 size_t val1 ;
3525 int ecode1 = 0 ;
3526 size_t val2 ;
3527 int ecode2 = 0 ;
3528 size_t val3 ;
3529 int ecode3 = 0 ;
3530 size_t val4 ;
3531 int ecode4 = 0 ;
3532 int argvi = 0;
3533 gsl_spmatrix *result = 0 ;
3534 dXSARGS;
3535
3536 if ((items < 4) || (items > 4)) {
3537 SWIG_croak("Usage: gsl_spmatrix_alloc_nzmax(n1,n2,nzmax,flags);");
3538 }
3539 ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
3540 if (!SWIG_IsOK(ecode1)) {
3541 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_spmatrix_alloc_nzmax" "', argument " "1"" of type '" "size_t""'");
3542 }
3543 arg1 = (size_t)(val1);
3544 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3545 if (!SWIG_IsOK(ecode2)) {
3546 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_alloc_nzmax" "', argument " "2"" of type '" "size_t""'");
3547 }
3548 arg2 = (size_t)(val2);
3549 ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
3550 if (!SWIG_IsOK(ecode3)) {
3551 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_spmatrix_alloc_nzmax" "', argument " "3"" of type '" "size_t""'");
3552 }
3553 arg3 = (size_t)(val3);
3554 ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
3555 if (!SWIG_IsOK(ecode4)) {
3556 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gsl_spmatrix_alloc_nzmax" "', argument " "4"" of type '" "size_t""'");
3557 }
3558 arg4 = (size_t)(val4);
3559 result = (gsl_spmatrix *)gsl_spmatrix_alloc_nzmax(arg1,arg2,arg3,arg4);
3560 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_spmatrix, 0 | SWIG_SHADOW); argvi++ ;
3561
3562
3563
3564
3565 XSRETURN(argvi);
3566 fail:
3567
3568
3569
3570
3571 SWIG_croak_null();
3572 }
3573 }
3574
3575
XS(_wrap_gsl_spmatrix_free)3576 XS(_wrap_gsl_spmatrix_free) {
3577 {
3578 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3579 void *argp1 = 0 ;
3580 int res1 = 0 ;
3581 int argvi = 0;
3582 dXSARGS;
3583
3584 if ((items < 1) || (items > 1)) {
3585 SWIG_croak("Usage: gsl_spmatrix_free(m);");
3586 }
3587 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3588 if (!SWIG_IsOK(res1)) {
3589 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_free" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3590 }
3591 arg1 = (gsl_spmatrix *)(argp1);
3592 gsl_spmatrix_free(arg1);
3593 ST(argvi) = &PL_sv_undef;
3594
3595 XSRETURN(argvi);
3596 fail:
3597
3598 SWIG_croak_null();
3599 }
3600 }
3601
3602
XS(_wrap_gsl_spmatrix_realloc)3603 XS(_wrap_gsl_spmatrix_realloc) {
3604 {
3605 size_t arg1 ;
3606 gsl_spmatrix *arg2 = (gsl_spmatrix *) 0 ;
3607 size_t val1 ;
3608 int ecode1 = 0 ;
3609 void *argp2 = 0 ;
3610 int res2 = 0 ;
3611 int argvi = 0;
3612 int result;
3613 dXSARGS;
3614
3615 if ((items < 2) || (items > 2)) {
3616 SWIG_croak("Usage: gsl_spmatrix_realloc(nzmax,m);");
3617 }
3618 ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
3619 if (!SWIG_IsOK(ecode1)) {
3620 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_spmatrix_realloc" "', argument " "1"" of type '" "size_t""'");
3621 }
3622 arg1 = (size_t)(val1);
3623 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3624 if (!SWIG_IsOK(res2)) {
3625 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_realloc" "', argument " "2"" of type '" "gsl_spmatrix *""'");
3626 }
3627 arg2 = (gsl_spmatrix *)(argp2);
3628 result = (int)gsl_spmatrix_realloc(arg1,arg2);
3629 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3630
3631
3632 XSRETURN(argvi);
3633 fail:
3634
3635
3636 SWIG_croak_null();
3637 }
3638 }
3639
3640
XS(_wrap_gsl_spmatrix_set_zero)3641 XS(_wrap_gsl_spmatrix_set_zero) {
3642 {
3643 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3644 void *argp1 = 0 ;
3645 int res1 = 0 ;
3646 int argvi = 0;
3647 int result;
3648 dXSARGS;
3649
3650 if ((items < 1) || (items > 1)) {
3651 SWIG_croak("Usage: gsl_spmatrix_set_zero(m);");
3652 }
3653 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3654 if (!SWIG_IsOK(res1)) {
3655 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_set_zero" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3656 }
3657 arg1 = (gsl_spmatrix *)(argp1);
3658 result = (int)gsl_spmatrix_set_zero(arg1);
3659 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3660
3661 XSRETURN(argvi);
3662 fail:
3663
3664 SWIG_croak_null();
3665 }
3666 }
3667
3668
XS(_wrap_gsl_spmatrix_nnz)3669 XS(_wrap_gsl_spmatrix_nnz) {
3670 {
3671 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3672 void *argp1 = 0 ;
3673 int res1 = 0 ;
3674 int argvi = 0;
3675 size_t result;
3676 dXSARGS;
3677
3678 if ((items < 1) || (items > 1)) {
3679 SWIG_croak("Usage: gsl_spmatrix_nnz(m);");
3680 }
3681 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3682 if (!SWIG_IsOK(res1)) {
3683 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_nnz" "', argument " "1"" of type '" "gsl_spmatrix const *""'");
3684 }
3685 arg1 = (gsl_spmatrix *)(argp1);
3686 result = gsl_spmatrix_nnz((gsl_spmatrix const *)arg1);
3687 ST(argvi) = SWIG_From_size_t SWIG_PERL_CALL_ARGS_1((size_t)(result)); argvi++ ;
3688
3689 XSRETURN(argvi);
3690 fail:
3691
3692 SWIG_croak_null();
3693 }
3694 }
3695
3696
XS(_wrap_gsl_spmatrix_compare_idx)3697 XS(_wrap_gsl_spmatrix_compare_idx) {
3698 {
3699 size_t arg1 ;
3700 size_t arg2 ;
3701 size_t arg3 ;
3702 size_t arg4 ;
3703 size_t val1 ;
3704 int ecode1 = 0 ;
3705 size_t val2 ;
3706 int ecode2 = 0 ;
3707 size_t val3 ;
3708 int ecode3 = 0 ;
3709 size_t val4 ;
3710 int ecode4 = 0 ;
3711 int argvi = 0;
3712 int result;
3713 dXSARGS;
3714
3715 if ((items < 4) || (items > 4)) {
3716 SWIG_croak("Usage: gsl_spmatrix_compare_idx(ia,ja,ib,jb);");
3717 }
3718 ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
3719 if (!SWIG_IsOK(ecode1)) {
3720 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_spmatrix_compare_idx" "', argument " "1"" of type '" "size_t""'");
3721 }
3722 arg1 = (size_t)(val1);
3723 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3724 if (!SWIG_IsOK(ecode2)) {
3725 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_compare_idx" "', argument " "2"" of type '" "size_t""'");
3726 }
3727 arg2 = (size_t)(val2);
3728 ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
3729 if (!SWIG_IsOK(ecode3)) {
3730 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_spmatrix_compare_idx" "', argument " "3"" of type '" "size_t""'");
3731 }
3732 arg3 = (size_t)(val3);
3733 ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
3734 if (!SWIG_IsOK(ecode4)) {
3735 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gsl_spmatrix_compare_idx" "', argument " "4"" of type '" "size_t""'");
3736 }
3737 arg4 = (size_t)(val4);
3738 result = (int)gsl_spmatrix_compare_idx(arg1,arg2,arg3,arg4);
3739 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3740
3741
3742
3743
3744 XSRETURN(argvi);
3745 fail:
3746
3747
3748
3749
3750 SWIG_croak_null();
3751 }
3752 }
3753
3754
XS(_wrap_gsl_spmatrix_tree_rebuild)3755 XS(_wrap_gsl_spmatrix_tree_rebuild) {
3756 {
3757 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3758 void *argp1 = 0 ;
3759 int res1 = 0 ;
3760 int argvi = 0;
3761 int result;
3762 dXSARGS;
3763
3764 if ((items < 1) || (items > 1)) {
3765 SWIG_croak("Usage: gsl_spmatrix_tree_rebuild(m);");
3766 }
3767 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3768 if (!SWIG_IsOK(res1)) {
3769 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_tree_rebuild" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3770 }
3771 arg1 = (gsl_spmatrix *)(argp1);
3772 result = (int)gsl_spmatrix_tree_rebuild(arg1);
3773 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3774
3775 XSRETURN(argvi);
3776 fail:
3777
3778 SWIG_croak_null();
3779 }
3780 }
3781
3782
XS(_wrap_gsl_spmatrix_memcpy)3783 XS(_wrap_gsl_spmatrix_memcpy) {
3784 {
3785 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3786 gsl_spmatrix *arg2 = (gsl_spmatrix *) 0 ;
3787 void *argp1 = 0 ;
3788 int res1 = 0 ;
3789 void *argp2 = 0 ;
3790 int res2 = 0 ;
3791 int argvi = 0;
3792 int result;
3793 dXSARGS;
3794
3795 if ((items < 2) || (items > 2)) {
3796 SWIG_croak("Usage: gsl_spmatrix_memcpy(dest,src);");
3797 }
3798 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3799 if (!SWIG_IsOK(res1)) {
3800 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_memcpy" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3801 }
3802 arg1 = (gsl_spmatrix *)(argp1);
3803 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3804 if (!SWIG_IsOK(res2)) {
3805 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_memcpy" "', argument " "2"" of type '" "gsl_spmatrix const *""'");
3806 }
3807 arg2 = (gsl_spmatrix *)(argp2);
3808 result = (int)gsl_spmatrix_memcpy(arg1,(gsl_spmatrix const *)arg2);
3809 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3810
3811
3812 XSRETURN(argvi);
3813 fail:
3814
3815
3816 SWIG_croak_null();
3817 }
3818 }
3819
3820
XS(_wrap_gsl_spmatrix_get)3821 XS(_wrap_gsl_spmatrix_get) {
3822 {
3823 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3824 size_t arg2 ;
3825 size_t arg3 ;
3826 void *argp1 = 0 ;
3827 int res1 = 0 ;
3828 size_t val2 ;
3829 int ecode2 = 0 ;
3830 size_t val3 ;
3831 int ecode3 = 0 ;
3832 int argvi = 0;
3833 double result;
3834 dXSARGS;
3835
3836 if ((items < 3) || (items > 3)) {
3837 SWIG_croak("Usage: gsl_spmatrix_get(m,i,j);");
3838 }
3839 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3840 if (!SWIG_IsOK(res1)) {
3841 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_get" "', argument " "1"" of type '" "gsl_spmatrix const *""'");
3842 }
3843 arg1 = (gsl_spmatrix *)(argp1);
3844 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3845 if (!SWIG_IsOK(ecode2)) {
3846 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_get" "', argument " "2"" of type '" "size_t""'");
3847 }
3848 arg2 = (size_t)(val2);
3849 ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
3850 if (!SWIG_IsOK(ecode3)) {
3851 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_spmatrix_get" "', argument " "3"" of type '" "size_t""'");
3852 }
3853 arg3 = (size_t)(val3);
3854 result = (double)gsl_spmatrix_get((gsl_spmatrix const *)arg1,arg2,arg3);
3855 ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
3856
3857
3858
3859 XSRETURN(argvi);
3860 fail:
3861
3862
3863
3864 SWIG_croak_null();
3865 }
3866 }
3867
3868
XS(_wrap_gsl_spmatrix_set)3869 XS(_wrap_gsl_spmatrix_set) {
3870 {
3871 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3872 size_t arg2 ;
3873 size_t arg3 ;
3874 double arg4 ;
3875 void *argp1 = 0 ;
3876 int res1 = 0 ;
3877 size_t val2 ;
3878 int ecode2 = 0 ;
3879 size_t val3 ;
3880 int ecode3 = 0 ;
3881 double val4 ;
3882 int ecode4 = 0 ;
3883 int argvi = 0;
3884 int result;
3885 dXSARGS;
3886
3887 if ((items < 4) || (items > 4)) {
3888 SWIG_croak("Usage: gsl_spmatrix_set(m,i,j,x);");
3889 }
3890 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3891 if (!SWIG_IsOK(res1)) {
3892 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_set" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3893 }
3894 arg1 = (gsl_spmatrix *)(argp1);
3895 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3896 if (!SWIG_IsOK(ecode2)) {
3897 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_set" "', argument " "2"" of type '" "size_t""'");
3898 }
3899 arg2 = (size_t)(val2);
3900 ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
3901 if (!SWIG_IsOK(ecode3)) {
3902 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_spmatrix_set" "', argument " "3"" of type '" "size_t""'");
3903 }
3904 arg3 = (size_t)(val3);
3905 ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
3906 if (!SWIG_IsOK(ecode4)) {
3907 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gsl_spmatrix_set" "', argument " "4"" of type '" "double""'");
3908 }
3909 arg4 = (double)(val4);
3910 result = (int)gsl_spmatrix_set(arg1,arg2,arg3,arg4);
3911 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
3912
3913
3914
3915
3916 XSRETURN(argvi);
3917 fail:
3918
3919
3920
3921
3922 SWIG_croak_null();
3923 }
3924 }
3925
3926
XS(_wrap_gsl_spmatrix_ptr)3927 XS(_wrap_gsl_spmatrix_ptr) {
3928 {
3929 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3930 size_t arg2 ;
3931 size_t arg3 ;
3932 void *argp1 = 0 ;
3933 int res1 = 0 ;
3934 size_t val2 ;
3935 int ecode2 = 0 ;
3936 size_t val3 ;
3937 int ecode3 = 0 ;
3938 int argvi = 0;
3939 double *result = 0 ;
3940 dXSARGS;
3941
3942 if ((items < 3) || (items > 3)) {
3943 SWIG_croak("Usage: gsl_spmatrix_ptr(m,i,j);");
3944 }
3945 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3946 if (!SWIG_IsOK(res1)) {
3947 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_ptr" "', argument " "1"" of type '" "gsl_spmatrix *""'");
3948 }
3949 arg1 = (gsl_spmatrix *)(argp1);
3950 ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
3951 if (!SWIG_IsOK(ecode2)) {
3952 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_ptr" "', argument " "2"" of type '" "size_t""'");
3953 }
3954 arg2 = (size_t)(val2);
3955 ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
3956 if (!SWIG_IsOK(ecode3)) {
3957 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gsl_spmatrix_ptr" "', argument " "3"" of type '" "size_t""'");
3958 }
3959 arg3 = (size_t)(val3);
3960 result = (double *)gsl_spmatrix_ptr(arg1,arg2,arg3);
3961 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); argvi++ ;
3962
3963
3964
3965 XSRETURN(argvi);
3966 fail:
3967
3968
3969
3970 SWIG_croak_null();
3971 }
3972 }
3973
3974
XS(_wrap_gsl_spmatrix_compcol)3975 XS(_wrap_gsl_spmatrix_compcol) {
3976 {
3977 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
3978 void *argp1 = 0 ;
3979 int res1 = 0 ;
3980 int argvi = 0;
3981 gsl_spmatrix *result = 0 ;
3982 dXSARGS;
3983
3984 if ((items < 1) || (items > 1)) {
3985 SWIG_croak("Usage: gsl_spmatrix_compcol(T);");
3986 }
3987 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
3988 if (!SWIG_IsOK(res1)) {
3989 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_compcol" "', argument " "1"" of type '" "gsl_spmatrix const *""'");
3990 }
3991 arg1 = (gsl_spmatrix *)(argp1);
3992 result = (gsl_spmatrix *)gsl_spmatrix_compcol((gsl_spmatrix const *)arg1);
3993 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_spmatrix, 0 | SWIG_SHADOW); argvi++ ;
3994
3995 XSRETURN(argvi);
3996 fail:
3997
3998 SWIG_croak_null();
3999 }
4000 }
4001
4002
XS(_wrap_gsl_spmatrix_ccs)4003 XS(_wrap_gsl_spmatrix_ccs) {
4004 {
4005 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4006 void *argp1 = 0 ;
4007 int res1 = 0 ;
4008 int argvi = 0;
4009 gsl_spmatrix *result = 0 ;
4010 dXSARGS;
4011
4012 if ((items < 1) || (items > 1)) {
4013 SWIG_croak("Usage: gsl_spmatrix_ccs(T);");
4014 }
4015 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4016 if (!SWIG_IsOK(res1)) {
4017 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_ccs" "', argument " "1"" of type '" "gsl_spmatrix const *""'");
4018 }
4019 arg1 = (gsl_spmatrix *)(argp1);
4020 result = (gsl_spmatrix *)gsl_spmatrix_ccs((gsl_spmatrix const *)arg1);
4021 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_spmatrix, 0 | SWIG_SHADOW); argvi++ ;
4022
4023 XSRETURN(argvi);
4024 fail:
4025
4026 SWIG_croak_null();
4027 }
4028 }
4029
4030
XS(_wrap_gsl_spmatrix_crs)4031 XS(_wrap_gsl_spmatrix_crs) {
4032 {
4033 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4034 void *argp1 = 0 ;
4035 int res1 = 0 ;
4036 int argvi = 0;
4037 gsl_spmatrix *result = 0 ;
4038 dXSARGS;
4039
4040 if ((items < 1) || (items > 1)) {
4041 SWIG_croak("Usage: gsl_spmatrix_crs(T);");
4042 }
4043 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4044 if (!SWIG_IsOK(res1)) {
4045 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_crs" "', argument " "1"" of type '" "gsl_spmatrix const *""'");
4046 }
4047 arg1 = (gsl_spmatrix *)(argp1);
4048 result = (gsl_spmatrix *)gsl_spmatrix_crs((gsl_spmatrix const *)arg1);
4049 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_spmatrix, 0 | SWIG_SHADOW); argvi++ ;
4050
4051 XSRETURN(argvi);
4052 fail:
4053
4054 SWIG_croak_null();
4055 }
4056 }
4057
4058
XS(_wrap_gsl_spmatrix_cumsum)4059 XS(_wrap_gsl_spmatrix_cumsum) {
4060 {
4061 size_t arg1 ;
4062 size_t *arg2 = (size_t *) 0 ;
4063 size_t val1 ;
4064 int ecode1 = 0 ;
4065 void *argp2 = 0 ;
4066 int res2 = 0 ;
4067 int argvi = 0;
4068 dXSARGS;
4069
4070 if ((items < 2) || (items > 2)) {
4071 SWIG_croak("Usage: gsl_spmatrix_cumsum(n,c);");
4072 }
4073 ecode1 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
4074 if (!SWIG_IsOK(ecode1)) {
4075 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gsl_spmatrix_cumsum" "', argument " "1"" of type '" "size_t""'");
4076 }
4077 arg1 = (size_t)(val1);
4078 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_size_t, 0 | 0 );
4079 if (!SWIG_IsOK(res2)) {
4080 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_cumsum" "', argument " "2"" of type '" "size_t *""'");
4081 }
4082 arg2 = (size_t *)(argp2);
4083 gsl_spmatrix_cumsum(arg1,arg2);
4084 ST(argvi) = &PL_sv_undef;
4085
4086
4087 XSRETURN(argvi);
4088 fail:
4089
4090
4091 SWIG_croak_null();
4092 }
4093 }
4094
4095
XS(_wrap_gsl_spmatrix_fprintf)4096 XS(_wrap_gsl_spmatrix_fprintf) {
4097 {
4098 FILE *arg1 = (FILE *) 0 ;
4099 gsl_spmatrix *arg2 = (gsl_spmatrix *) 0 ;
4100 char *arg3 = (char *) 0 ;
4101 void *argp1 = 0 ;
4102 int res1 = 0 ;
4103 void *argp2 = 0 ;
4104 int res2 = 0 ;
4105 int res3 ;
4106 char *buf3 = 0 ;
4107 int alloc3 = 0 ;
4108 int argvi = 0;
4109 int result;
4110 dXSARGS;
4111
4112 if ((items < 3) || (items > 3)) {
4113 SWIG_croak("Usage: gsl_spmatrix_fprintf(stream,m,format);");
4114 }
4115 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FILE, 0 | 0 );
4116 if (!SWIG_IsOK(res1)) {
4117 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_fprintf" "', argument " "1"" of type '" "FILE *""'");
4118 }
4119 arg1 = (FILE *)(argp1);
4120 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4121 if (!SWIG_IsOK(res2)) {
4122 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_fprintf" "', argument " "2"" of type '" "gsl_spmatrix const *""'");
4123 }
4124 arg2 = (gsl_spmatrix *)(argp2);
4125 res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
4126 if (!SWIG_IsOK(res3)) {
4127 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gsl_spmatrix_fprintf" "', argument " "3"" of type '" "char const *""'");
4128 }
4129 arg3 = (char *)(buf3);
4130 result = (int)gsl_spmatrix_fprintf(arg1,(gsl_spmatrix const *)arg2,(char const *)arg3);
4131 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4132
4133
4134 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4135 XSRETURN(argvi);
4136 fail:
4137
4138
4139 if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
4140 SWIG_croak_null();
4141 }
4142 }
4143
4144
XS(_wrap_gsl_spmatrix_fscanf)4145 XS(_wrap_gsl_spmatrix_fscanf) {
4146 {
4147 FILE *arg1 = (FILE *) 0 ;
4148 void *argp1 = 0 ;
4149 int res1 = 0 ;
4150 int argvi = 0;
4151 gsl_spmatrix *result = 0 ;
4152 dXSARGS;
4153
4154 if ((items < 1) || (items > 1)) {
4155 SWIG_croak("Usage: gsl_spmatrix_fscanf(stream);");
4156 }
4157 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FILE, 0 | 0 );
4158 if (!SWIG_IsOK(res1)) {
4159 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_fscanf" "', argument " "1"" of type '" "FILE *""'");
4160 }
4161 arg1 = (FILE *)(argp1);
4162 result = (gsl_spmatrix *)gsl_spmatrix_fscanf(arg1);
4163 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_gsl_spmatrix, 0 | SWIG_SHADOW); argvi++ ;
4164
4165 XSRETURN(argvi);
4166 fail:
4167
4168 SWIG_croak_null();
4169 }
4170 }
4171
4172
XS(_wrap_gsl_spmatrix_fwrite)4173 XS(_wrap_gsl_spmatrix_fwrite) {
4174 {
4175 FILE *arg1 = (FILE *) 0 ;
4176 gsl_spmatrix *arg2 = (gsl_spmatrix *) 0 ;
4177 void *argp1 = 0 ;
4178 int res1 = 0 ;
4179 void *argp2 = 0 ;
4180 int res2 = 0 ;
4181 int argvi = 0;
4182 int result;
4183 dXSARGS;
4184
4185 if ((items < 2) || (items > 2)) {
4186 SWIG_croak("Usage: gsl_spmatrix_fwrite(stream,m);");
4187 }
4188 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FILE, 0 | 0 );
4189 if (!SWIG_IsOK(res1)) {
4190 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_fwrite" "', argument " "1"" of type '" "FILE *""'");
4191 }
4192 arg1 = (FILE *)(argp1);
4193 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4194 if (!SWIG_IsOK(res2)) {
4195 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_fwrite" "', argument " "2"" of type '" "gsl_spmatrix const *""'");
4196 }
4197 arg2 = (gsl_spmatrix *)(argp2);
4198 result = (int)gsl_spmatrix_fwrite(arg1,(gsl_spmatrix const *)arg2);
4199 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4200
4201
4202 XSRETURN(argvi);
4203 fail:
4204
4205
4206 SWIG_croak_null();
4207 }
4208 }
4209
4210
XS(_wrap_gsl_spmatrix_fread)4211 XS(_wrap_gsl_spmatrix_fread) {
4212 {
4213 FILE *arg1 = (FILE *) 0 ;
4214 gsl_spmatrix *arg2 = (gsl_spmatrix *) 0 ;
4215 void *argp1 = 0 ;
4216 int res1 = 0 ;
4217 void *argp2 = 0 ;
4218 int res2 = 0 ;
4219 int argvi = 0;
4220 int result;
4221 dXSARGS;
4222
4223 if ((items < 2) || (items > 2)) {
4224 SWIG_croak("Usage: gsl_spmatrix_fread(stream,m);");
4225 }
4226 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FILE, 0 | 0 );
4227 if (!SWIG_IsOK(res1)) {
4228 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_fread" "', argument " "1"" of type '" "FILE *""'");
4229 }
4230 arg1 = (FILE *)(argp1);
4231 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4232 if (!SWIG_IsOK(res2)) {
4233 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_fread" "', argument " "2"" of type '" "gsl_spmatrix *""'");
4234 }
4235 arg2 = (gsl_spmatrix *)(argp2);
4236 result = (int)gsl_spmatrix_fread(arg1,arg2);
4237 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4238
4239
4240 XSRETURN(argvi);
4241 fail:
4242
4243
4244 SWIG_croak_null();
4245 }
4246 }
4247
4248
XS(_wrap_gsl_spmatrix_scale)4249 XS(_wrap_gsl_spmatrix_scale) {
4250 {
4251 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4252 double arg2 ;
4253 void *argp1 = 0 ;
4254 int res1 = 0 ;
4255 double val2 ;
4256 int ecode2 = 0 ;
4257 int argvi = 0;
4258 int result;
4259 dXSARGS;
4260
4261 if ((items < 2) || (items > 2)) {
4262 SWIG_croak("Usage: gsl_spmatrix_scale(m,x);");
4263 }
4264 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4265 if (!SWIG_IsOK(res1)) {
4266 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_scale" "', argument " "1"" of type '" "gsl_spmatrix *""'");
4267 }
4268 arg1 = (gsl_spmatrix *)(argp1);
4269 ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
4270 if (!SWIG_IsOK(ecode2)) {
4271 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gsl_spmatrix_scale" "', argument " "2"" of type '" "double""'");
4272 }
4273 arg2 = (double)(val2);
4274 result = (int)gsl_spmatrix_scale(arg1,arg2);
4275 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4276
4277
4278 XSRETURN(argvi);
4279 fail:
4280
4281
4282 SWIG_croak_null();
4283 }
4284 }
4285
4286
XS(_wrap_gsl_spmatrix_minmax)4287 XS(_wrap_gsl_spmatrix_minmax) {
4288 {
4289 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4290 double *arg2 = (double *) 0 ;
4291 double *arg3 = (double *) 0 ;
4292 void *argp1 = 0 ;
4293 int res1 = 0 ;
4294 double temp2 ;
4295 int res2 = SWIG_TMPOBJ ;
4296 double temp3 ;
4297 int res3 = SWIG_TMPOBJ ;
4298 int argvi = 0;
4299 int result;
4300 dXSARGS;
4301
4302 arg2 = &temp2;
4303 arg3 = &temp3;
4304 if ((items < 1) || (items > 1)) {
4305 SWIG_croak("Usage: gsl_spmatrix_minmax(m);");
4306 }
4307 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4308 if (!SWIG_IsOK(res1)) {
4309 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_minmax" "', argument " "1"" of type '" "gsl_spmatrix const *""'");
4310 }
4311 arg1 = (gsl_spmatrix *)(argp1);
4312 result = (int)gsl_spmatrix_minmax((gsl_spmatrix const *)arg1,arg2,arg3);
4313 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4314 if (SWIG_IsTmpObj(res2)) {
4315 if (argvi >= items) EXTEND(sp, argvi+1); ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((*arg2)); argvi++ ;
4316 } else {
4317 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0) : 0;
4318 if (argvi >= items) EXTEND(sp, argvi+1); ST(argvi) = SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags); argvi++ ;
4319 }
4320 if (SWIG_IsTmpObj(res3)) {
4321 if (argvi >= items) EXTEND(sp, argvi+1); ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1((*arg3)); argvi++ ;
4322 } else {
4323 int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0) : 0;
4324 if (argvi >= items) EXTEND(sp, argvi+1); ST(argvi) = SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags); argvi++ ;
4325 }
4326
4327
4328
4329 XSRETURN(argvi);
4330 fail:
4331
4332
4333
4334 SWIG_croak_null();
4335 }
4336 }
4337
4338
XS(_wrap_gsl_spmatrix_add)4339 XS(_wrap_gsl_spmatrix_add) {
4340 {
4341 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4342 gsl_spmatrix *arg2 = (gsl_spmatrix *) 0 ;
4343 gsl_spmatrix *arg3 = (gsl_spmatrix *) 0 ;
4344 void *argp1 = 0 ;
4345 int res1 = 0 ;
4346 void *argp2 = 0 ;
4347 int res2 = 0 ;
4348 void *argp3 = 0 ;
4349 int res3 = 0 ;
4350 int argvi = 0;
4351 int result;
4352 dXSARGS;
4353
4354 if ((items < 3) || (items > 3)) {
4355 SWIG_croak("Usage: gsl_spmatrix_add(c,a,b);");
4356 }
4357 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4358 if (!SWIG_IsOK(res1)) {
4359 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_add" "', argument " "1"" of type '" "gsl_spmatrix *""'");
4360 }
4361 arg1 = (gsl_spmatrix *)(argp1);
4362 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4363 if (!SWIG_IsOK(res2)) {
4364 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_add" "', argument " "2"" of type '" "gsl_spmatrix const *""'");
4365 }
4366 arg2 = (gsl_spmatrix *)(argp2);
4367 res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4368 if (!SWIG_IsOK(res3)) {
4369 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gsl_spmatrix_add" "', argument " "3"" of type '" "gsl_spmatrix const *""'");
4370 }
4371 arg3 = (gsl_spmatrix *)(argp3);
4372 result = (int)gsl_spmatrix_add(arg1,(gsl_spmatrix const *)arg2,(gsl_spmatrix const *)arg3);
4373 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4374
4375
4376
4377 XSRETURN(argvi);
4378 fail:
4379
4380
4381
4382 SWIG_croak_null();
4383 }
4384 }
4385
4386
XS(_wrap_gsl_spmatrix_d2sp)4387 XS(_wrap_gsl_spmatrix_d2sp) {
4388 {
4389 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4390 gsl_matrix *arg2 = (gsl_matrix *) 0 ;
4391 void *argp1 = 0 ;
4392 int res1 = 0 ;
4393 void *argp2 = 0 ;
4394 int res2 = 0 ;
4395 int argvi = 0;
4396 int result;
4397 dXSARGS;
4398
4399 if ((items < 2) || (items > 2)) {
4400 SWIG_croak("Usage: gsl_spmatrix_d2sp(S,A);");
4401 }
4402 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4403 if (!SWIG_IsOK(res1)) {
4404 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_d2sp" "', argument " "1"" of type '" "gsl_spmatrix *""'");
4405 }
4406 arg1 = (gsl_spmatrix *)(argp1);
4407 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_matrix, 0 | 0 );
4408 if (!SWIG_IsOK(res2)) {
4409 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_d2sp" "', argument " "2"" of type '" "gsl_matrix const *""'");
4410 }
4411 arg2 = (gsl_matrix *)(argp2);
4412 result = (int)gsl_spmatrix_d2sp(arg1,(gsl_matrix const *)arg2);
4413 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4414
4415
4416 XSRETURN(argvi);
4417 fail:
4418
4419
4420 SWIG_croak_null();
4421 }
4422 }
4423
4424
XS(_wrap_gsl_spmatrix_sp2d)4425 XS(_wrap_gsl_spmatrix_sp2d) {
4426 {
4427 gsl_matrix *arg1 = (gsl_matrix *) 0 ;
4428 gsl_spmatrix *arg2 = (gsl_spmatrix *) 0 ;
4429 void *argp1 = 0 ;
4430 int res1 = 0 ;
4431 void *argp2 = 0 ;
4432 int res2 = 0 ;
4433 int argvi = 0;
4434 int result;
4435 dXSARGS;
4436
4437 if ((items < 2) || (items > 2)) {
4438 SWIG_croak("Usage: gsl_spmatrix_sp2d(A,S);");
4439 }
4440 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_matrix, 0 | 0 );
4441 if (!SWIG_IsOK(res1)) {
4442 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_sp2d" "', argument " "1"" of type '" "gsl_matrix *""'");
4443 }
4444 arg1 = (gsl_matrix *)(argp1);
4445 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4446 if (!SWIG_IsOK(res2)) {
4447 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_sp2d" "', argument " "2"" of type '" "gsl_spmatrix const *""'");
4448 }
4449 arg2 = (gsl_spmatrix *)(argp2);
4450 result = (int)gsl_spmatrix_sp2d(arg1,(gsl_spmatrix const *)arg2);
4451 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4452
4453
4454 XSRETURN(argvi);
4455 fail:
4456
4457
4458 SWIG_croak_null();
4459 }
4460 }
4461
4462
XS(_wrap_gsl_spmatrix_equal)4463 XS(_wrap_gsl_spmatrix_equal) {
4464 {
4465 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4466 gsl_spmatrix *arg2 = (gsl_spmatrix *) 0 ;
4467 void *argp1 = 0 ;
4468 int res1 = 0 ;
4469 void *argp2 = 0 ;
4470 int res2 = 0 ;
4471 int argvi = 0;
4472 int result;
4473 dXSARGS;
4474
4475 if ((items < 2) || (items > 2)) {
4476 SWIG_croak("Usage: gsl_spmatrix_equal(a,b);");
4477 }
4478 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4479 if (!SWIG_IsOK(res1)) {
4480 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_equal" "', argument " "1"" of type '" "gsl_spmatrix const *""'");
4481 }
4482 arg1 = (gsl_spmatrix *)(argp1);
4483 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4484 if (!SWIG_IsOK(res2)) {
4485 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_equal" "', argument " "2"" of type '" "gsl_spmatrix const *""'");
4486 }
4487 arg2 = (gsl_spmatrix *)(argp2);
4488 result = (int)gsl_spmatrix_equal((gsl_spmatrix const *)arg1,(gsl_spmatrix const *)arg2);
4489 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4490
4491
4492 XSRETURN(argvi);
4493 fail:
4494
4495
4496 SWIG_croak_null();
4497 }
4498 }
4499
4500
XS(_wrap_gsl_spmatrix_transpose)4501 XS(_wrap_gsl_spmatrix_transpose) {
4502 {
4503 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4504 void *argp1 = 0 ;
4505 int res1 = 0 ;
4506 int argvi = 0;
4507 int result;
4508 dXSARGS;
4509
4510 if ((items < 1) || (items > 1)) {
4511 SWIG_croak("Usage: gsl_spmatrix_transpose(m);");
4512 }
4513 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4514 if (!SWIG_IsOK(res1)) {
4515 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_transpose" "', argument " "1"" of type '" "gsl_spmatrix *""'");
4516 }
4517 arg1 = (gsl_spmatrix *)(argp1);
4518 result = (int)gsl_spmatrix_transpose(arg1);
4519 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4520
4521 XSRETURN(argvi);
4522 fail:
4523
4524 SWIG_croak_null();
4525 }
4526 }
4527
4528
XS(_wrap_gsl_spmatrix_transpose2)4529 XS(_wrap_gsl_spmatrix_transpose2) {
4530 {
4531 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4532 void *argp1 = 0 ;
4533 int res1 = 0 ;
4534 int argvi = 0;
4535 int result;
4536 dXSARGS;
4537
4538 if ((items < 1) || (items > 1)) {
4539 SWIG_croak("Usage: gsl_spmatrix_transpose2(m);");
4540 }
4541 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4542 if (!SWIG_IsOK(res1)) {
4543 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_transpose2" "', argument " "1"" of type '" "gsl_spmatrix *""'");
4544 }
4545 arg1 = (gsl_spmatrix *)(argp1);
4546 result = (int)gsl_spmatrix_transpose2(arg1);
4547 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4548
4549 XSRETURN(argvi);
4550 fail:
4551
4552 SWIG_croak_null();
4553 }
4554 }
4555
4556
XS(_wrap_gsl_spmatrix_transpose_memcpy)4557 XS(_wrap_gsl_spmatrix_transpose_memcpy) {
4558 {
4559 gsl_spmatrix *arg1 = (gsl_spmatrix *) 0 ;
4560 gsl_spmatrix *arg2 = (gsl_spmatrix *) 0 ;
4561 void *argp1 = 0 ;
4562 int res1 = 0 ;
4563 void *argp2 = 0 ;
4564 int res2 = 0 ;
4565 int argvi = 0;
4566 int result;
4567 dXSARGS;
4568
4569 if ((items < 2) || (items > 2)) {
4570 SWIG_croak("Usage: gsl_spmatrix_transpose_memcpy(dest,src);");
4571 }
4572 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4573 if (!SWIG_IsOK(res1)) {
4574 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gsl_spmatrix_transpose_memcpy" "', argument " "1"" of type '" "gsl_spmatrix *""'");
4575 }
4576 arg1 = (gsl_spmatrix *)(argp1);
4577 res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_gsl_spmatrix, 0 | 0 );
4578 if (!SWIG_IsOK(res2)) {
4579 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gsl_spmatrix_transpose_memcpy" "', argument " "2"" of type '" "gsl_spmatrix const *""'");
4580 }
4581 arg2 = (gsl_spmatrix *)(argp2);
4582 result = (int)gsl_spmatrix_transpose_memcpy(arg1,(gsl_spmatrix const *)arg2);
4583 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(result)); argvi++ ;
4584
4585
4586 XSRETURN(argvi);
4587 fail:
4588
4589
4590 SWIG_croak_null();
4591 }
4592 }
4593
4594
4595
4596 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4597
4598 static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
4599 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4600 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
4601 static swig_type_info _swigt__p_f_p_q_const__char_p_q_const__char_int_int__void = {"_p_f_p_q_const__char_p_q_const__char_int_int__void", "void (*)(char const *,char const *,int,int)|gsl_error_handler_t *", 0, 0, (void*)0, 0};
4602 static swig_type_info _swigt__p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void = {"_p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void", "gsl_stream_handler_t *|void (*)(char const *,char const *,int,char const *)", 0, 0, (void*)0, 0};
4603 static swig_type_info _swigt__p_gsl_matrix = {"_p_gsl_matrix", "gsl_matrix *", 0, 0, (void*)0, 0};
4604 static swig_type_info _swigt__p_gsl_spmatrix = {"_p_gsl_spmatrix", "gsl_spmatrix *", 0, 0, (void*)"Math::GSL::SparseMatrix::gsl_spmatrix", 0};
4605 static swig_type_info _swigt__p_gsl_spmatrix_tree = {"_p_gsl_spmatrix_tree", "gsl_spmatrix_tree *", 0, 0, (void*)"Math::GSL::SparseMatrix::gsl_spmatrix_tree", 0};
4606 static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
4607 static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
4608
4609 static swig_type_info *swig_type_initial[] = {
4610 &_swigt__p_FILE,
4611 &_swigt__p_char,
4612 &_swigt__p_double,
4613 &_swigt__p_f_p_q_const__char_p_q_const__char_int_int__void,
4614 &_swigt__p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void,
4615 &_swigt__p_gsl_matrix,
4616 &_swigt__p_gsl_spmatrix,
4617 &_swigt__p_gsl_spmatrix_tree,
4618 &_swigt__p_size_t,
4619 &_swigt__p_void,
4620 };
4621
4622 static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
4623 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4624 static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
4625 static swig_cast_info _swigc__p_f_p_q_const__char_p_q_const__char_int_int__void[] = { {&_swigt__p_f_p_q_const__char_p_q_const__char_int_int__void, 0, 0, 0},{0, 0, 0, 0}};
4626 static swig_cast_info _swigc__p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void[] = { {&_swigt__p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}};
4627 static swig_cast_info _swigc__p_gsl_matrix[] = { {&_swigt__p_gsl_matrix, 0, 0, 0},{0, 0, 0, 0}};
4628 static swig_cast_info _swigc__p_gsl_spmatrix[] = { {&_swigt__p_gsl_spmatrix, 0, 0, 0},{0, 0, 0, 0}};
4629 static swig_cast_info _swigc__p_gsl_spmatrix_tree[] = { {&_swigt__p_gsl_spmatrix_tree, 0, 0, 0},{0, 0, 0, 0}};
4630 static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
4631 static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
4632
4633 static swig_cast_info *swig_cast_initial[] = {
4634 _swigc__p_FILE,
4635 _swigc__p_char,
4636 _swigc__p_double,
4637 _swigc__p_f_p_q_const__char_p_q_const__char_int_int__void,
4638 _swigc__p_f_p_q_const__char_p_q_const__char_int_p_q_const__char__void,
4639 _swigc__p_gsl_matrix,
4640 _swigc__p_gsl_spmatrix,
4641 _swigc__p_gsl_spmatrix_tree,
4642 _swigc__p_size_t,
4643 _swigc__p_void,
4644 };
4645
4646
4647 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
4648
4649 static swig_constant_info swig_constants[] = {
4650 {0,0,0,0,0,0}
4651 };
4652 #ifdef __cplusplus
4653 }
4654 #endif
4655 static swig_variable_info swig_variables[] = {
4656 {0,0,0,0}
4657 };
4658 static swig_command_info swig_commands[] = {
4659 {"Math::GSL::SparseMatrixc::gsl_error", _wrap_gsl_error},
4660 {"Math::GSL::SparseMatrixc::gsl_stream_printf", _wrap_gsl_stream_printf},
4661 {"Math::GSL::SparseMatrixc::gsl_strerror", _wrap_gsl_strerror},
4662 {"Math::GSL::SparseMatrixc::gsl_set_error_handler", _wrap_gsl_set_error_handler},
4663 {"Math::GSL::SparseMatrixc::gsl_set_error_handler_off", _wrap_gsl_set_error_handler_off},
4664 {"Math::GSL::SparseMatrixc::gsl_set_stream_handler", _wrap_gsl_set_stream_handler},
4665 {"Math::GSL::SparseMatrixc::gsl_set_stream", _wrap_gsl_set_stream},
4666 {"Math::GSL::SparseMatrixc::gsl_spmatrix_tree_tree_set", _wrap_gsl_spmatrix_tree_tree_set},
4667 {"Math::GSL::SparseMatrixc::gsl_spmatrix_tree_tree_get", _wrap_gsl_spmatrix_tree_tree_get},
4668 {"Math::GSL::SparseMatrixc::gsl_spmatrix_tree_node_array_set", _wrap_gsl_spmatrix_tree_node_array_set},
4669 {"Math::GSL::SparseMatrixc::gsl_spmatrix_tree_node_array_get", _wrap_gsl_spmatrix_tree_node_array_get},
4670 {"Math::GSL::SparseMatrixc::gsl_spmatrix_tree_n_set", _wrap_gsl_spmatrix_tree_n_set},
4671 {"Math::GSL::SparseMatrixc::gsl_spmatrix_tree_n_get", _wrap_gsl_spmatrix_tree_n_get},
4672 {"Math::GSL::SparseMatrixc::new_gsl_spmatrix_tree", _wrap_new_gsl_spmatrix_tree},
4673 {"Math::GSL::SparseMatrixc::delete_gsl_spmatrix_tree", _wrap_delete_gsl_spmatrix_tree},
4674 {"Math::GSL::SparseMatrixc::gsl_spmatrix_size1_set", _wrap_gsl_spmatrix_size1_set},
4675 {"Math::GSL::SparseMatrixc::gsl_spmatrix_size1_get", _wrap_gsl_spmatrix_size1_get},
4676 {"Math::GSL::SparseMatrixc::gsl_spmatrix_size2_set", _wrap_gsl_spmatrix_size2_set},
4677 {"Math::GSL::SparseMatrixc::gsl_spmatrix_size2_get", _wrap_gsl_spmatrix_size2_get},
4678 {"Math::GSL::SparseMatrixc::gsl_spmatrix_i_set", _wrap_gsl_spmatrix_i_set},
4679 {"Math::GSL::SparseMatrixc::gsl_spmatrix_i_get", _wrap_gsl_spmatrix_i_get},
4680 {"Math::GSL::SparseMatrixc::gsl_spmatrix_data_set", _wrap_gsl_spmatrix_data_set},
4681 {"Math::GSL::SparseMatrixc::gsl_spmatrix_data_get", _wrap_gsl_spmatrix_data_get},
4682 {"Math::GSL::SparseMatrixc::gsl_spmatrix_p_set", _wrap_gsl_spmatrix_p_set},
4683 {"Math::GSL::SparseMatrixc::gsl_spmatrix_p_get", _wrap_gsl_spmatrix_p_get},
4684 {"Math::GSL::SparseMatrixc::gsl_spmatrix_nzmax_set", _wrap_gsl_spmatrix_nzmax_set},
4685 {"Math::GSL::SparseMatrixc::gsl_spmatrix_nzmax_get", _wrap_gsl_spmatrix_nzmax_get},
4686 {"Math::GSL::SparseMatrixc::gsl_spmatrix_nz_set", _wrap_gsl_spmatrix_nz_set},
4687 {"Math::GSL::SparseMatrixc::gsl_spmatrix_nz_get", _wrap_gsl_spmatrix_nz_get},
4688 {"Math::GSL::SparseMatrixc::gsl_spmatrix_tree_data_set", _wrap_gsl_spmatrix_tree_data_set},
4689 {"Math::GSL::SparseMatrixc::gsl_spmatrix_tree_data_get", _wrap_gsl_spmatrix_tree_data_get},
4690 {"Math::GSL::SparseMatrixc::gsl_spmatrix_work_set", _wrap_gsl_spmatrix_work_set},
4691 {"Math::GSL::SparseMatrixc::gsl_spmatrix_work_get", _wrap_gsl_spmatrix_work_get},
4692 {"Math::GSL::SparseMatrixc::gsl_spmatrix_sptype_set", _wrap_gsl_spmatrix_sptype_set},
4693 {"Math::GSL::SparseMatrixc::gsl_spmatrix_sptype_get", _wrap_gsl_spmatrix_sptype_get},
4694 {"Math::GSL::SparseMatrixc::new_gsl_spmatrix", _wrap_new_gsl_spmatrix},
4695 {"Math::GSL::SparseMatrixc::delete_gsl_spmatrix", _wrap_delete_gsl_spmatrix},
4696 {"Math::GSL::SparseMatrixc::gsl_spmatrix_alloc", _wrap_gsl_spmatrix_alloc},
4697 {"Math::GSL::SparseMatrixc::gsl_spmatrix_alloc_nzmax", _wrap_gsl_spmatrix_alloc_nzmax},
4698 {"Math::GSL::SparseMatrixc::gsl_spmatrix_free", _wrap_gsl_spmatrix_free},
4699 {"Math::GSL::SparseMatrixc::gsl_spmatrix_realloc", _wrap_gsl_spmatrix_realloc},
4700 {"Math::GSL::SparseMatrixc::gsl_spmatrix_set_zero", _wrap_gsl_spmatrix_set_zero},
4701 {"Math::GSL::SparseMatrixc::gsl_spmatrix_nnz", _wrap_gsl_spmatrix_nnz},
4702 {"Math::GSL::SparseMatrixc::gsl_spmatrix_compare_idx", _wrap_gsl_spmatrix_compare_idx},
4703 {"Math::GSL::SparseMatrixc::gsl_spmatrix_tree_rebuild", _wrap_gsl_spmatrix_tree_rebuild},
4704 {"Math::GSL::SparseMatrixc::gsl_spmatrix_memcpy", _wrap_gsl_spmatrix_memcpy},
4705 {"Math::GSL::SparseMatrixc::gsl_spmatrix_get", _wrap_gsl_spmatrix_get},
4706 {"Math::GSL::SparseMatrixc::gsl_spmatrix_set", _wrap_gsl_spmatrix_set},
4707 {"Math::GSL::SparseMatrixc::gsl_spmatrix_ptr", _wrap_gsl_spmatrix_ptr},
4708 {"Math::GSL::SparseMatrixc::gsl_spmatrix_compcol", _wrap_gsl_spmatrix_compcol},
4709 {"Math::GSL::SparseMatrixc::gsl_spmatrix_ccs", _wrap_gsl_spmatrix_ccs},
4710 {"Math::GSL::SparseMatrixc::gsl_spmatrix_crs", _wrap_gsl_spmatrix_crs},
4711 {"Math::GSL::SparseMatrixc::gsl_spmatrix_cumsum", _wrap_gsl_spmatrix_cumsum},
4712 {"Math::GSL::SparseMatrixc::gsl_spmatrix_fprintf", _wrap_gsl_spmatrix_fprintf},
4713 {"Math::GSL::SparseMatrixc::gsl_spmatrix_fscanf", _wrap_gsl_spmatrix_fscanf},
4714 {"Math::GSL::SparseMatrixc::gsl_spmatrix_fwrite", _wrap_gsl_spmatrix_fwrite},
4715 {"Math::GSL::SparseMatrixc::gsl_spmatrix_fread", _wrap_gsl_spmatrix_fread},
4716 {"Math::GSL::SparseMatrixc::gsl_spmatrix_scale", _wrap_gsl_spmatrix_scale},
4717 {"Math::GSL::SparseMatrixc::gsl_spmatrix_minmax", _wrap_gsl_spmatrix_minmax},
4718 {"Math::GSL::SparseMatrixc::gsl_spmatrix_add", _wrap_gsl_spmatrix_add},
4719 {"Math::GSL::SparseMatrixc::gsl_spmatrix_d2sp", _wrap_gsl_spmatrix_d2sp},
4720 {"Math::GSL::SparseMatrixc::gsl_spmatrix_sp2d", _wrap_gsl_spmatrix_sp2d},
4721 {"Math::GSL::SparseMatrixc::gsl_spmatrix_equal", _wrap_gsl_spmatrix_equal},
4722 {"Math::GSL::SparseMatrixc::gsl_spmatrix_transpose", _wrap_gsl_spmatrix_transpose},
4723 {"Math::GSL::SparseMatrixc::gsl_spmatrix_transpose2", _wrap_gsl_spmatrix_transpose2},
4724 {"Math::GSL::SparseMatrixc::gsl_spmatrix_transpose_memcpy", _wrap_gsl_spmatrix_transpose_memcpy},
4725 {0,0}
4726 };
4727 /* -----------------------------------------------------------------------------
4728 * Type initialization:
4729 * This problem is tough by the requirement that no dynamic
4730 * memory is used. Also, since swig_type_info structures store pointers to
4731 * swig_cast_info structures and swig_cast_info structures store pointers back
4732 * to swig_type_info structures, we need some lookup code at initialization.
4733 * The idea is that swig generates all the structures that are needed.
4734 * The runtime then collects these partially filled structures.
4735 * The SWIG_InitializeModule function takes these initial arrays out of
4736 * swig_module, and does all the lookup, filling in the swig_module.types
4737 * array with the correct data and linking the correct swig_cast_info
4738 * structures together.
4739 *
4740 * The generated swig_type_info structures are assigned statically to an initial
4741 * array. We just loop through that array, and handle each type individually.
4742 * First we lookup if this type has been already loaded, and if so, use the
4743 * loaded structure instead of the generated one. Then we have to fill in the
4744 * cast linked list. The cast data is initially stored in something like a
4745 * two-dimensional array. Each row corresponds to a type (there are the same
4746 * number of rows as there are in the swig_type_initial array). Each entry in
4747 * a column is one of the swig_cast_info structures for that type.
4748 * The cast_initial array is actually an array of arrays, because each row has
4749 * a variable number of columns. So to actually build the cast linked list,
4750 * we find the array of casts associated with the type, and loop through it
4751 * adding the casts to the list. The one last trick we need to do is making
4752 * sure the type pointer in the swig_cast_info struct is correct.
4753 *
4754 * First off, we lookup the cast->type name to see if it is already loaded.
4755 * There are three cases to handle:
4756 * 1) If the cast->type has already been loaded AND the type we are adding
4757 * casting info to has not been loaded (it is in this module), THEN we
4758 * replace the cast->type pointer with the type pointer that has already
4759 * been loaded.
4760 * 2) If BOTH types (the one we are adding casting info to, and the
4761 * cast->type) are loaded, THEN the cast info has already been loaded by
4762 * the previous module so we just ignore it.
4763 * 3) Finally, if cast->type has not already been loaded, then we add that
4764 * swig_cast_info to the linked list (because the cast->type) pointer will
4765 * be correct.
4766 * ----------------------------------------------------------------------------- */
4767
4768 #ifdef __cplusplus
4769 extern "C" {
4770 #if 0
4771 } /* c-mode */
4772 #endif
4773 #endif
4774
4775 #if 0
4776 #define SWIGRUNTIME_DEBUG
4777 #endif
4778
4779
4780 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)4781 SWIG_InitializeModule(void *clientdata) {
4782 size_t i;
4783 swig_module_info *module_head, *iter;
4784 int init;
4785
4786 /* check to see if the circular list has been setup, if not, set it up */
4787 if (swig_module.next==0) {
4788 /* Initialize the swig_module */
4789 swig_module.type_initial = swig_type_initial;
4790 swig_module.cast_initial = swig_cast_initial;
4791 swig_module.next = &swig_module;
4792 init = 1;
4793 } else {
4794 init = 0;
4795 }
4796
4797 /* Try and load any already created modules */
4798 module_head = SWIG_GetModule(clientdata);
4799 if (!module_head) {
4800 /* This is the first module loaded for this interpreter */
4801 /* so set the swig module into the interpreter */
4802 SWIG_SetModule(clientdata, &swig_module);
4803 } else {
4804 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
4805 iter=module_head;
4806 do {
4807 if (iter==&swig_module) {
4808 /* Our module is already in the list, so there's nothing more to do. */
4809 return;
4810 }
4811 iter=iter->next;
4812 } while (iter!= module_head);
4813
4814 /* otherwise we must add our module into the list */
4815 swig_module.next = module_head->next;
4816 module_head->next = &swig_module;
4817 }
4818
4819 /* When multiple interpreters are used, a module could have already been initialized in
4820 a different interpreter, but not yet have a pointer in this interpreter.
4821 In this case, we do not want to continue adding types... everything should be
4822 set up already */
4823 if (init == 0) return;
4824
4825 /* Now work on filling in swig_module.types */
4826 #ifdef SWIGRUNTIME_DEBUG
4827 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
4828 #endif
4829 for (i = 0; i < swig_module.size; ++i) {
4830 swig_type_info *type = 0;
4831 swig_type_info *ret;
4832 swig_cast_info *cast;
4833
4834 #ifdef SWIGRUNTIME_DEBUG
4835 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4836 #endif
4837
4838 /* if there is another module already loaded */
4839 if (swig_module.next != &swig_module) {
4840 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
4841 }
4842 if (type) {
4843 /* Overwrite clientdata field */
4844 #ifdef SWIGRUNTIME_DEBUG
4845 printf("SWIG_InitializeModule: found type %s\n", type->name);
4846 #endif
4847 if (swig_module.type_initial[i]->clientdata) {
4848 type->clientdata = swig_module.type_initial[i]->clientdata;
4849 #ifdef SWIGRUNTIME_DEBUG
4850 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
4851 #endif
4852 }
4853 } else {
4854 type = swig_module.type_initial[i];
4855 }
4856
4857 /* Insert casting types */
4858 cast = swig_module.cast_initial[i];
4859 while (cast->type) {
4860 /* Don't need to add information already in the list */
4861 ret = 0;
4862 #ifdef SWIGRUNTIME_DEBUG
4863 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
4864 #endif
4865 if (swig_module.next != &swig_module) {
4866 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
4867 #ifdef SWIGRUNTIME_DEBUG
4868 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
4869 #endif
4870 }
4871 if (ret) {
4872 if (type == swig_module.type_initial[i]) {
4873 #ifdef SWIGRUNTIME_DEBUG
4874 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
4875 #endif
4876 cast->type = ret;
4877 ret = 0;
4878 } else {
4879 /* Check for casting already in the list */
4880 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
4881 #ifdef SWIGRUNTIME_DEBUG
4882 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
4883 #endif
4884 if (!ocast) ret = 0;
4885 }
4886 }
4887
4888 if (!ret) {
4889 #ifdef SWIGRUNTIME_DEBUG
4890 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
4891 #endif
4892 if (type->cast) {
4893 type->cast->prev = cast;
4894 cast->next = type->cast;
4895 }
4896 type->cast = cast;
4897 }
4898 cast++;
4899 }
4900 /* Set entry in modules->types array equal to the type */
4901 swig_module.types[i] = type;
4902 }
4903 swig_module.types[i] = 0;
4904
4905 #ifdef SWIGRUNTIME_DEBUG
4906 printf("**** SWIG_InitializeModule: Cast List ******\n");
4907 for (i = 0; i < swig_module.size; ++i) {
4908 int j = 0;
4909 swig_cast_info *cast = swig_module.cast_initial[i];
4910 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4911 while (cast->type) {
4912 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4913 cast++;
4914 ++j;
4915 }
4916 printf("---- Total casts: %d\n",j);
4917 }
4918 printf("**** SWIG_InitializeModule: Cast List ******\n");
4919 #endif
4920 }
4921
4922 /* This function will propagate the clientdata field of type to
4923 * any new swig_type_info structures that have been added into the list
4924 * of equivalent types. It is like calling
4925 * SWIG_TypeClientData(type, clientdata) a second time.
4926 */
4927 SWIGRUNTIME void
SWIG_PropagateClientData(void)4928 SWIG_PropagateClientData(void) {
4929 size_t i;
4930 swig_cast_info *equiv;
4931 static int init_run = 0;
4932
4933 if (init_run) return;
4934 init_run = 1;
4935
4936 for (i = 0; i < swig_module.size; i++) {
4937 if (swig_module.types[i]->clientdata) {
4938 equiv = swig_module.types[i]->cast;
4939 while (equiv) {
4940 if (!equiv->converter) {
4941 if (equiv->type && !equiv->type->clientdata)
4942 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
4943 }
4944 equiv = equiv->next;
4945 }
4946 }
4947 }
4948 }
4949
4950 #ifdef __cplusplus
4951 #if 0
4952 {
4953 /* c-mode */
4954 #endif
4955 }
4956 #endif
4957
4958
4959
4960 #if defined(__cplusplus) && ! defined(XSPROTO)
4961 extern "C"
4962 #endif
4963
XS(SWIG_init)4964 XS(SWIG_init) {
4965 dXSARGS;
4966 int i;
4967 (void)items;
4968
4969 SWIG_InitializeModule(0);
4970
4971 /* Install commands */
4972 for (i = 0; swig_commands[i].name; i++) {
4973 /* Casts only needed for Perl < 5.10. */
4974 #ifdef __cplusplus
4975 newXS(const_cast<char*>(swig_commands[i].name), swig_commands[i].wrapper, const_cast<char*>(__FILE__));
4976 #else
4977 newXS((char*)swig_commands[i].name, swig_commands[i].wrapper, (char*)__FILE__);
4978 #endif
4979 }
4980
4981 /* Install variables */
4982 for (i = 0; swig_variables[i].name; i++) {
4983 SV *sv;
4984 sv = get_sv(swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
4985 if (swig_variables[i].type) {
4986 SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
4987 } else {
4988 sv_setiv(sv,(IV) 0);
4989 }
4990 swig_create_magic(sv, swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
4991 }
4992
4993 /* Install constant */
4994 for (i = 0; swig_constants[i].type; i++) {
4995 SV *sv;
4996 sv = get_sv(swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
4997 switch(swig_constants[i].type) {
4998 case SWIG_INT:
4999 sv_setiv(sv, (IV) swig_constants[i].lvalue);
5000 break;
5001 case SWIG_FLOAT:
5002 sv_setnv(sv, (double) swig_constants[i].dvalue);
5003 break;
5004 case SWIG_STRING:
5005 sv_setpv(sv, (const char *) swig_constants[i].pvalue);
5006 break;
5007 case SWIG_POINTER:
5008 SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
5009 break;
5010 case SWIG_BINARY:
5011 SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
5012 break;
5013 default:
5014 break;
5015 }
5016 SvREADONLY_on(sv);
5017 }
5018
5019 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5020 SV *sv = get_sv((char*) SWIG_prefix "GSL_VERSION", TRUE | 0x2 | GV_ADDMULTI);
5021 sv_setsv(sv, SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)(2.7)));
5022 SvREADONLY_on(sv);
5023 } while(0) /*@SWIG@*/;
5024 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5025 SV *sv = get_sv((char*) SWIG_prefix "GSL_MAJOR_VERSION", TRUE | 0x2 | GV_ADDMULTI);
5026 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(2)));
5027 SvREADONLY_on(sv);
5028 } while(0) /*@SWIG@*/;
5029 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5030 SV *sv = get_sv((char*) SWIG_prefix "GSL_MINOR_VERSION", TRUE | 0x2 | GV_ADDMULTI);
5031 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(7)));
5032 SvREADONLY_on(sv);
5033 } while(0) /*@SWIG@*/;
5034 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5035 SV *sv = get_sv((char*) SWIG_prefix "GSL_POSZERO", TRUE | 0x2 | GV_ADDMULTI);
5036 sv_setsv(sv, SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)((+0.0))));
5037 SvREADONLY_on(sv);
5038 } while(0) /*@SWIG@*/;
5039 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5040 SV *sv = get_sv((char*) SWIG_prefix "GSL_NEGZERO", TRUE | 0x2 | GV_ADDMULTI);
5041 sv_setsv(sv, SWIG_From_double SWIG_PERL_CALL_ARGS_1((double)((-0.0))));
5042 SvREADONLY_on(sv);
5043 } while(0) /*@SWIG@*/;
5044 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5045 SV *sv = get_sv((char*) SWIG_prefix "GSL_SUCCESS", TRUE | 0x2 | GV_ADDMULTI);
5046 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_SUCCESS)));
5047 SvREADONLY_on(sv);
5048 } while(0) /*@SWIG@*/;
5049 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5050 SV *sv = get_sv((char*) SWIG_prefix "GSL_FAILURE", TRUE | 0x2 | GV_ADDMULTI);
5051 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_FAILURE)));
5052 SvREADONLY_on(sv);
5053 } while(0) /*@SWIG@*/;
5054 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5055 SV *sv = get_sv((char*) SWIG_prefix "GSL_CONTINUE", TRUE | 0x2 | GV_ADDMULTI);
5056 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_CONTINUE)));
5057 SvREADONLY_on(sv);
5058 } while(0) /*@SWIG@*/;
5059 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5060 SV *sv = get_sv((char*) SWIG_prefix "GSL_EDOM", TRUE | 0x2 | GV_ADDMULTI);
5061 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EDOM)));
5062 SvREADONLY_on(sv);
5063 } while(0) /*@SWIG@*/;
5064 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5065 SV *sv = get_sv((char*) SWIG_prefix "GSL_ERANGE", TRUE | 0x2 | GV_ADDMULTI);
5066 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ERANGE)));
5067 SvREADONLY_on(sv);
5068 } while(0) /*@SWIG@*/;
5069 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5070 SV *sv = get_sv((char*) SWIG_prefix "GSL_EFAULT", TRUE | 0x2 | GV_ADDMULTI);
5071 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EFAULT)));
5072 SvREADONLY_on(sv);
5073 } while(0) /*@SWIG@*/;
5074 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5075 SV *sv = get_sv((char*) SWIG_prefix "GSL_EINVAL", TRUE | 0x2 | GV_ADDMULTI);
5076 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EINVAL)));
5077 SvREADONLY_on(sv);
5078 } while(0) /*@SWIG@*/;
5079 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5080 SV *sv = get_sv((char*) SWIG_prefix "GSL_EFAILED", TRUE | 0x2 | GV_ADDMULTI);
5081 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EFAILED)));
5082 SvREADONLY_on(sv);
5083 } while(0) /*@SWIG@*/;
5084 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5085 SV *sv = get_sv((char*) SWIG_prefix "GSL_EFACTOR", TRUE | 0x2 | GV_ADDMULTI);
5086 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EFACTOR)));
5087 SvREADONLY_on(sv);
5088 } while(0) /*@SWIG@*/;
5089 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5090 SV *sv = get_sv((char*) SWIG_prefix "GSL_ESANITY", TRUE | 0x2 | GV_ADDMULTI);
5091 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ESANITY)));
5092 SvREADONLY_on(sv);
5093 } while(0) /*@SWIG@*/;
5094 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5095 SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOMEM", TRUE | 0x2 | GV_ADDMULTI);
5096 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOMEM)));
5097 SvREADONLY_on(sv);
5098 } while(0) /*@SWIG@*/;
5099 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5100 SV *sv = get_sv((char*) SWIG_prefix "GSL_EBADFUNC", TRUE | 0x2 | GV_ADDMULTI);
5101 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EBADFUNC)));
5102 SvREADONLY_on(sv);
5103 } while(0) /*@SWIG@*/;
5104 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5105 SV *sv = get_sv((char*) SWIG_prefix "GSL_ERUNAWAY", TRUE | 0x2 | GV_ADDMULTI);
5106 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ERUNAWAY)));
5107 SvREADONLY_on(sv);
5108 } while(0) /*@SWIG@*/;
5109 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5110 SV *sv = get_sv((char*) SWIG_prefix "GSL_EMAXITER", TRUE | 0x2 | GV_ADDMULTI);
5111 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EMAXITER)));
5112 SvREADONLY_on(sv);
5113 } while(0) /*@SWIG@*/;
5114 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5115 SV *sv = get_sv((char*) SWIG_prefix "GSL_EZERODIV", TRUE | 0x2 | GV_ADDMULTI);
5116 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EZERODIV)));
5117 SvREADONLY_on(sv);
5118 } while(0) /*@SWIG@*/;
5119 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5120 SV *sv = get_sv((char*) SWIG_prefix "GSL_EBADTOL", TRUE | 0x2 | GV_ADDMULTI);
5121 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EBADTOL)));
5122 SvREADONLY_on(sv);
5123 } while(0) /*@SWIG@*/;
5124 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5125 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOL", TRUE | 0x2 | GV_ADDMULTI);
5126 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOL)));
5127 SvREADONLY_on(sv);
5128 } while(0) /*@SWIG@*/;
5129 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5130 SV *sv = get_sv((char*) SWIG_prefix "GSL_EUNDRFLW", TRUE | 0x2 | GV_ADDMULTI);
5131 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EUNDRFLW)));
5132 SvREADONLY_on(sv);
5133 } while(0) /*@SWIG@*/;
5134 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5135 SV *sv = get_sv((char*) SWIG_prefix "GSL_EOVRFLW", TRUE | 0x2 | GV_ADDMULTI);
5136 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EOVRFLW)));
5137 SvREADONLY_on(sv);
5138 } while(0) /*@SWIG@*/;
5139 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5140 SV *sv = get_sv((char*) SWIG_prefix "GSL_ELOSS", TRUE | 0x2 | GV_ADDMULTI);
5141 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ELOSS)));
5142 SvREADONLY_on(sv);
5143 } while(0) /*@SWIG@*/;
5144 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5145 SV *sv = get_sv((char*) SWIG_prefix "GSL_EROUND", TRUE | 0x2 | GV_ADDMULTI);
5146 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EROUND)));
5147 SvREADONLY_on(sv);
5148 } while(0) /*@SWIG@*/;
5149 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5150 SV *sv = get_sv((char*) SWIG_prefix "GSL_EBADLEN", TRUE | 0x2 | GV_ADDMULTI);
5151 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EBADLEN)));
5152 SvREADONLY_on(sv);
5153 } while(0) /*@SWIG@*/;
5154 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5155 SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOTSQR", TRUE | 0x2 | GV_ADDMULTI);
5156 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOTSQR)));
5157 SvREADONLY_on(sv);
5158 } while(0) /*@SWIG@*/;
5159 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5160 SV *sv = get_sv((char*) SWIG_prefix "GSL_ESING", TRUE | 0x2 | GV_ADDMULTI);
5161 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ESING)));
5162 SvREADONLY_on(sv);
5163 } while(0) /*@SWIG@*/;
5164 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5165 SV *sv = get_sv((char*) SWIG_prefix "GSL_EDIVERGE", TRUE | 0x2 | GV_ADDMULTI);
5166 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EDIVERGE)));
5167 SvREADONLY_on(sv);
5168 } while(0) /*@SWIG@*/;
5169 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5170 SV *sv = get_sv((char*) SWIG_prefix "GSL_EUNSUP", TRUE | 0x2 | GV_ADDMULTI);
5171 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EUNSUP)));
5172 SvREADONLY_on(sv);
5173 } while(0) /*@SWIG@*/;
5174 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5175 SV *sv = get_sv((char*) SWIG_prefix "GSL_EUNIMPL", TRUE | 0x2 | GV_ADDMULTI);
5176 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EUNIMPL)));
5177 SvREADONLY_on(sv);
5178 } while(0) /*@SWIG@*/;
5179 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5180 SV *sv = get_sv((char*) SWIG_prefix "GSL_ECACHE", TRUE | 0x2 | GV_ADDMULTI);
5181 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ECACHE)));
5182 SvREADONLY_on(sv);
5183 } while(0) /*@SWIG@*/;
5184 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5185 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETABLE", TRUE | 0x2 | GV_ADDMULTI);
5186 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETABLE)));
5187 SvREADONLY_on(sv);
5188 } while(0) /*@SWIG@*/;
5189 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5190 SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOPROG", TRUE | 0x2 | GV_ADDMULTI);
5191 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOPROG)));
5192 SvREADONLY_on(sv);
5193 } while(0) /*@SWIG@*/;
5194 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5195 SV *sv = get_sv((char*) SWIG_prefix "GSL_ENOPROGJ", TRUE | 0x2 | GV_ADDMULTI);
5196 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ENOPROGJ)));
5197 SvREADONLY_on(sv);
5198 } while(0) /*@SWIG@*/;
5199 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5200 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOLF", TRUE | 0x2 | GV_ADDMULTI);
5201 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOLF)));
5202 SvREADONLY_on(sv);
5203 } while(0) /*@SWIG@*/;
5204 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5205 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOLX", TRUE | 0x2 | GV_ADDMULTI);
5206 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOLX)));
5207 SvREADONLY_on(sv);
5208 } while(0) /*@SWIG@*/;
5209 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5210 SV *sv = get_sv((char*) SWIG_prefix "GSL_ETOLG", TRUE | 0x2 | GV_ADDMULTI);
5211 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_ETOLG)));
5212 SvREADONLY_on(sv);
5213 } while(0) /*@SWIG@*/;
5214 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5215 SV *sv = get_sv((char*) SWIG_prefix "GSL_EOF", TRUE | 0x2 | GV_ADDMULTI);
5216 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)(GSL_EOF)));
5217 SvREADONLY_on(sv);
5218 } while(0) /*@SWIG@*/;
5219 SWIG_TypeClientData(SWIGTYPE_p_gsl_spmatrix_tree, (void*) "Math::GSL::SparseMatrix::gsl_spmatrix_tree");
5220 SWIG_TypeClientData(SWIGTYPE_p_gsl_spmatrix, (void*) "Math::GSL::SparseMatrix::gsl_spmatrix");
5221 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5222 SV *sv = get_sv((char*) SWIG_prefix "GSL_SPMATRIX_TRIPLET", TRUE | 0x2 | GV_ADDMULTI);
5223 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)((0))));
5224 SvREADONLY_on(sv);
5225 } while(0) /*@SWIG@*/;
5226 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5227 SV *sv = get_sv((char*) SWIG_prefix "GSL_SPMATRIX_CCS", TRUE | 0x2 | GV_ADDMULTI);
5228 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)((1))));
5229 SvREADONLY_on(sv);
5230 } while(0) /*@SWIG@*/;
5231 /*@SWIG:/usr/share/swig4.0/perl5/perltypemaps.swg,65,%set_constant@*/ do {
5232 SV *sv = get_sv((char*) SWIG_prefix "GSL_SPMATRIX_CRS", TRUE | 0x2 | GV_ADDMULTI);
5233 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1((int)((2))));
5234 SvREADONLY_on(sv);
5235 } while(0) /*@SWIG@*/;
5236 ST(0) = &PL_sv_yes;
5237 XSRETURN(1);
5238 }
5239
5240