chiark / gitweb /
nlopt (2.4.2+dfsg-8) unstable; urgency=medium
[nlopt.git] / swig / nlopt-guile.cpp
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.12
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10
11 #define SWIGGUILE
12 #define SWIG_GUILE_INIT_STATIC extern
13 extern "C" {
14
15 SWIG_GUILE_INIT_STATIC void
16 SWIG_init (void);
17
18 }
19
20
21 #ifdef __cplusplus
22 /* SwigValueWrapper is described in swig.swg */
23 template<typename T> class SwigValueWrapper {
24   struct SwigMovePointer {
25     T *ptr;
26     SwigMovePointer(T *p) : ptr(p) { }
27     ~SwigMovePointer() { delete ptr; }
28     SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
29   } pointer;
30   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
31   SwigValueWrapper(const SwigValueWrapper<T>& rhs);
32 public:
33   SwigValueWrapper() : pointer(0) { }
34   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
35   operator T&() const { return *pointer.ptr; }
36   T *operator&() { return pointer.ptr; }
37 };
38
39 template <typename T> T SwigValueInit() {
40   return T();
41 }
42 #endif
43
44 /* -----------------------------------------------------------------------------
45  *  This section contains generic SWIG labels for method/variable
46  *  declarations/attributes, and other compiler dependent labels.
47  * ----------------------------------------------------------------------------- */
48
49 /* template workaround for compilers that cannot correctly implement the C++ standard */
50 #ifndef SWIGTEMPLATEDISAMBIGUATOR
51 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
52 #  define SWIGTEMPLATEDISAMBIGUATOR template
53 # elif defined(__HP_aCC)
54 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
55 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
56 #  define SWIGTEMPLATEDISAMBIGUATOR template
57 # else
58 #  define SWIGTEMPLATEDISAMBIGUATOR
59 # endif
60 #endif
61
62 /* inline attribute */
63 #ifndef SWIGINLINE
64 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
65 #   define SWIGINLINE inline
66 # else
67 #   define SWIGINLINE
68 # endif
69 #endif
70
71 /* attribute recognised by some compilers to avoid 'unused' warnings */
72 #ifndef SWIGUNUSED
73 # if defined(__GNUC__)
74 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
75 #     define SWIGUNUSED __attribute__ ((__unused__))
76 #   else
77 #     define SWIGUNUSED
78 #   endif
79 # elif defined(__ICC)
80 #   define SWIGUNUSED __attribute__ ((__unused__))
81 # else
82 #   define SWIGUNUSED
83 # endif
84 #endif
85
86 #ifndef SWIG_MSC_UNSUPPRESS_4505
87 # if defined(_MSC_VER)
88 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
89 # endif
90 #endif
91
92 #ifndef SWIGUNUSEDPARM
93 # ifdef __cplusplus
94 #   define SWIGUNUSEDPARM(p)
95 # else
96 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
97 # endif
98 #endif
99
100 /* internal SWIG method */
101 #ifndef SWIGINTERN
102 # define SWIGINTERN static SWIGUNUSED
103 #endif
104
105 /* internal inline SWIG method */
106 #ifndef SWIGINTERNINLINE
107 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
108 #endif
109
110 /* exporting methods */
111 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
112 #  ifndef GCC_HASCLASSVISIBILITY
113 #    define GCC_HASCLASSVISIBILITY
114 #  endif
115 #endif
116
117 #ifndef SWIGEXPORT
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 #   if defined(STATIC_LINKED)
120 #     define SWIGEXPORT
121 #   else
122 #     define SWIGEXPORT __declspec(dllexport)
123 #   endif
124 # else
125 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 #     define SWIGEXPORT __attribute__ ((visibility("default")))
127 #   else
128 #     define SWIGEXPORT
129 #   endif
130 # endif
131 #endif
132
133 /* calling conventions for Windows */
134 #ifndef SWIGSTDCALL
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 #   define SWIGSTDCALL __stdcall
137 # else
138 #   define SWIGSTDCALL
139 # endif
140 #endif
141
142 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
145 #endif
146
147 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
150 #endif
151
152
153 /* -----------------------------------------------------------------------------
154  * swigrun.swg
155  *
156  * This file contains generic C API SWIG runtime support for pointer
157  * type checking.
158  * ----------------------------------------------------------------------------- */
159
160 /* This should only be incremented when either the layout of swig_type_info changes,
161    or for whatever reason, the runtime changes incompatibly */
162 #define SWIG_RUNTIME_VERSION "4"
163
164 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
165 #ifdef SWIG_TYPE_TABLE
166 # define SWIG_QUOTE_STRING(x) #x
167 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
168 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
169 #else
170 # define SWIG_TYPE_TABLE_NAME
171 #endif
172
173 /*
174   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
175   creating a static or dynamic library from the SWIG runtime code.
176   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
177
178   But only do this if strictly necessary, ie, if you have problems
179   with your compiler or suchlike.
180 */
181
182 #ifndef SWIGRUNTIME
183 # define SWIGRUNTIME SWIGINTERN
184 #endif
185
186 #ifndef SWIGRUNTIMEINLINE
187 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
188 #endif
189
190 /*  Generic buffer size */
191 #ifndef SWIG_BUFFER_SIZE
192 # define SWIG_BUFFER_SIZE 1024
193 #endif
194
195 /* Flags for pointer conversions */
196 #define SWIG_POINTER_DISOWN        0x1
197 #define SWIG_CAST_NEW_MEMORY       0x2
198
199 /* Flags for new pointer objects */
200 #define SWIG_POINTER_OWN           0x1
201
202
203 /*
204    Flags/methods for returning states.
205
206    The SWIG conversion methods, as ConvertPtr, return an integer
207    that tells if the conversion was successful or not. And if not,
208    an error code can be returned (see swigerrors.swg for the codes).
209
210    Use the following macros/flags to set or process the returning
211    states.
212
213    In old versions of SWIG, code such as the following was usually written:
214
215      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
216        // success code
217      } else {
218        //fail code
219      }
220
221    Now you can be more explicit:
222
223     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
224     if (SWIG_IsOK(res)) {
225       // success code
226     } else {
227       // fail code
228     }
229
230    which is the same really, but now you can also do
231
232     Type *ptr;
233     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
234     if (SWIG_IsOK(res)) {
235       // success code
236       if (SWIG_IsNewObj(res) {
237         ...
238         delete *ptr;
239       } else {
240         ...
241       }
242     } else {
243       // fail code
244     }
245
246    I.e., now SWIG_ConvertPtr can return new objects and you can
247    identify the case and take care of the deallocation. Of course that
248    also requires SWIG_ConvertPtr to return new result values, such as
249
250       int SWIG_ConvertPtr(obj, ptr,...) {
251         if (<obj is ok>) {
252           if (<need new object>) {
253             *ptr = <ptr to new allocated object>;
254             return SWIG_NEWOBJ;
255           } else {
256             *ptr = <ptr to old object>;
257             return SWIG_OLDOBJ;
258           }
259         } else {
260           return SWIG_BADOBJ;
261         }
262       }
263
264    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
265    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
266    SWIG errors code.
267
268    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
269    allows to return the 'cast rank', for example, if you have this
270
271        int food(double)
272        int fooi(int);
273
274    and you call
275
276       food(1)   // cast rank '1'  (1 -> 1.0)
277       fooi(1)   // cast rank '0'
278
279    just use the SWIG_AddCast()/SWIG_CheckState()
280 */
281
282 #define SWIG_OK                    (0)
283 #define SWIG_ERROR                 (-1)
284 #define SWIG_IsOK(r)               (r >= 0)
285 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
286
287 /* The CastRankLimit says how many bits are used for the cast rank */
288 #define SWIG_CASTRANKLIMIT         (1 << 8)
289 /* The NewMask denotes the object was created (using new/malloc) */
290 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
291 /* The TmpMask is for in/out typemaps that use temporal objects */
292 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
293 /* Simple returning values */
294 #define SWIG_BADOBJ                (SWIG_ERROR)
295 #define SWIG_OLDOBJ                (SWIG_OK)
296 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
297 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
298 /* Check, add and del mask methods */
299 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
300 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
301 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
302 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
303 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
304 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
305
306 /* Cast-Rank Mode */
307 #if defined(SWIG_CASTRANK_MODE)
308 #  ifndef SWIG_TypeRank
309 #    define SWIG_TypeRank             unsigned long
310 #  endif
311 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
312 #    define SWIG_MAXCASTRANK          (2)
313 #  endif
314 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
315 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
316 SWIGINTERNINLINE int SWIG_AddCast(int r) {
317   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
318 }
319 SWIGINTERNINLINE int SWIG_CheckState(int r) {
320   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
321 }
322 #else /* no cast-rank mode */
323 #  define SWIG_AddCast(r) (r)
324 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
325 #endif
326
327
328 #include <string.h>
329
330 #ifdef __cplusplus
331 extern "C" {
332 #endif
333
334 typedef void *(*swig_converter_func)(void *, int *);
335 typedef struct swig_type_info *(*swig_dycast_func)(void **);
336
337 /* Structure to store information on one type */
338 typedef struct swig_type_info {
339   const char             *name;                 /* mangled name of this type */
340   const char             *str;                  /* human readable name of this type */
341   swig_dycast_func        dcast;                /* dynamic cast function down a hierarchy */
342   struct swig_cast_info  *cast;                 /* linked list of types that can cast into this type */
343   void                   *clientdata;           /* language specific type data */
344   int                    owndata;               /* flag if the structure owns the clientdata */
345 } swig_type_info;
346
347 /* Structure to store a type and conversion function used for casting */
348 typedef struct swig_cast_info {
349   swig_type_info         *type;                 /* pointer to type that is equivalent to this type */
350   swig_converter_func     converter;            /* function to cast the void pointers */
351   struct swig_cast_info  *next;                 /* pointer to next cast in linked list */
352   struct swig_cast_info  *prev;                 /* pointer to the previous cast */
353 } swig_cast_info;
354
355 /* Structure used to store module information
356  * Each module generates one structure like this, and the runtime collects
357  * all of these structures and stores them in a circularly linked list.*/
358 typedef struct swig_module_info {
359   swig_type_info         **types;               /* Array of pointers to swig_type_info structures that are in this module */
360   size_t                 size;                  /* Number of types in this module */
361   struct swig_module_info *next;                /* Pointer to next element in circularly linked list */
362   swig_type_info         **type_initial;        /* Array of initially generated type structures */
363   swig_cast_info         **cast_initial;        /* Array of initially generated casting structures */
364   void                    *clientdata;          /* Language specific module data */
365 } swig_module_info;
366
367 /*
368   Compare two type names skipping the space characters, therefore
369   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
370
371   Return 0 when the two name types are equivalent, as in
372   strncmp, but skipping ' '.
373 */
374 SWIGRUNTIME int
375 SWIG_TypeNameComp(const char *f1, const char *l1,
376                   const char *f2, const char *l2) {
377   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
378     while ((*f1 == ' ') && (f1 != l1)) ++f1;
379     while ((*f2 == ' ') && (f2 != l2)) ++f2;
380     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
381   }
382   return (int)((l1 - f1) - (l2 - f2));
383 }
384
385 /*
386   Check type equivalence in a name list like <name1>|<name2>|...
387   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
388 */
389 SWIGRUNTIME int
390 SWIG_TypeCmp(const char *nb, const char *tb) {
391   int equiv = 1;
392   const char* te = tb + strlen(tb);
393   const char* ne = nb;
394   while (equiv != 0 && *ne) {
395     for (nb = ne; *ne; ++ne) {
396       if (*ne == '|') break;
397     }
398     equiv = SWIG_TypeNameComp(nb, ne, tb, te);
399     if (*ne) ++ne;
400   }
401   return equiv;
402 }
403
404 /*
405   Check type equivalence in a name list like <name1>|<name2>|...
406   Return 0 if not equal, 1 if equal
407 */
408 SWIGRUNTIME int
409 SWIG_TypeEquiv(const char *nb, const char *tb) {
410   return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
411 }
412
413 /*
414   Check the typename
415 */
416 SWIGRUNTIME swig_cast_info *
417 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
418   if (ty) {
419     swig_cast_info *iter = ty->cast;
420     while (iter) {
421       if (strcmp(iter->type->name, c) == 0) {
422         if (iter == ty->cast)
423           return iter;
424         /* Move iter to the top of the linked list */
425         iter->prev->next = iter->next;
426         if (iter->next)
427           iter->next->prev = iter->prev;
428         iter->next = ty->cast;
429         iter->prev = 0;
430         if (ty->cast) ty->cast->prev = iter;
431         ty->cast = iter;
432         return iter;
433       }
434       iter = iter->next;
435     }
436   }
437   return 0;
438 }
439
440 /*
441   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
442 */
443 SWIGRUNTIME swig_cast_info *
444 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
445   if (ty) {
446     swig_cast_info *iter = ty->cast;
447     while (iter) {
448       if (iter->type == from) {
449         if (iter == ty->cast)
450           return iter;
451         /* Move iter to the top of the linked list */
452         iter->prev->next = iter->next;
453         if (iter->next)
454           iter->next->prev = iter->prev;
455         iter->next = ty->cast;
456         iter->prev = 0;
457         if (ty->cast) ty->cast->prev = iter;
458         ty->cast = iter;
459         return iter;
460       }
461       iter = iter->next;
462     }
463   }
464   return 0;
465 }
466
467 /*
468   Cast a pointer up an inheritance hierarchy
469 */
470 SWIGRUNTIMEINLINE void *
471 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
472   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
473 }
474
475 /*
476    Dynamic pointer casting. Down an inheritance hierarchy
477 */
478 SWIGRUNTIME swig_type_info *
479 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
480   swig_type_info *lastty = ty;
481   if (!ty || !ty->dcast) return ty;
482   while (ty && (ty->dcast)) {
483     ty = (*ty->dcast)(ptr);
484     if (ty) lastty = ty;
485   }
486   return lastty;
487 }
488
489 /*
490   Return the name associated with this type
491 */
492 SWIGRUNTIMEINLINE const char *
493 SWIG_TypeName(const swig_type_info *ty) {
494   return ty->name;
495 }
496
497 /*
498   Return the pretty name associated with this type,
499   that is an unmangled type name in a form presentable to the user.
500 */
501 SWIGRUNTIME const char *
502 SWIG_TypePrettyName(const swig_type_info *type) {
503   /* The "str" field contains the equivalent pretty names of the
504      type, separated by vertical-bar characters.  We choose
505      to print the last name, as it is often (?) the most
506      specific. */
507   if (!type) return NULL;
508   if (type->str != NULL) {
509     const char *last_name = type->str;
510     const char *s;
511     for (s = type->str; *s; s++)
512       if (*s == '|') last_name = s+1;
513     return last_name;
514   }
515   else
516     return type->name;
517 }
518
519 /*
520    Set the clientdata field for a type
521 */
522 SWIGRUNTIME void
523 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
524   swig_cast_info *cast = ti->cast;
525   /* if (ti->clientdata == clientdata) return; */
526   ti->clientdata = clientdata;
527
528   while (cast) {
529     if (!cast->converter) {
530       swig_type_info *tc = cast->type;
531       if (!tc->clientdata) {
532         SWIG_TypeClientData(tc, clientdata);
533       }
534     }
535     cast = cast->next;
536   }
537 }
538 SWIGRUNTIME void
539 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
540   SWIG_TypeClientData(ti, clientdata);
541   ti->owndata = 1;
542 }
543
544 /*
545   Search for a swig_type_info structure only by mangled name
546   Search is a O(log #types)
547
548   We start searching at module start, and finish searching when start == end.
549   Note: if start == end at the beginning of the function, we go all the way around
550   the circular list.
551 */
552 SWIGRUNTIME swig_type_info *
553 SWIG_MangledTypeQueryModule(swig_module_info *start,
554                             swig_module_info *end,
555                             const char *name) {
556   swig_module_info *iter = start;
557   do {
558     if (iter->size) {
559       register size_t l = 0;
560       register size_t r = iter->size - 1;
561       do {
562         /* since l+r >= 0, we can (>> 1) instead (/ 2) */
563         register size_t i = (l + r) >> 1;
564         const char *iname = iter->types[i]->name;
565         if (iname) {
566           register int compare = strcmp(name, iname);
567           if (compare == 0) {
568             return iter->types[i];
569           } else if (compare < 0) {
570             if (i) {
571               r = i - 1;
572             } else {
573               break;
574             }
575           } else if (compare > 0) {
576             l = i + 1;
577           }
578         } else {
579           break; /* should never happen */
580         }
581       } while (l <= r);
582     }
583     iter = iter->next;
584   } while (iter != end);
585   return 0;
586 }
587
588 /*
589   Search for a swig_type_info structure for either a mangled name or a human readable name.
590   It first searches the mangled names of the types, which is a O(log #types)
591   If a type is not found it then searches the human readable names, which is O(#types).
592
593   We start searching at module start, and finish searching when start == end.
594   Note: if start == end at the beginning of the function, we go all the way around
595   the circular list.
596 */
597 SWIGRUNTIME swig_type_info *
598 SWIG_TypeQueryModule(swig_module_info *start,
599                      swig_module_info *end,
600                      const char *name) {
601   /* STEP 1: Search the name field using binary search */
602   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
603   if (ret) {
604     return ret;
605   } else {
606     /* STEP 2: If the type hasn't been found, do a complete search
607        of the str field (the human readable name) */
608     swig_module_info *iter = start;
609     do {
610       register size_t i = 0;
611       for (; i < iter->size; ++i) {
612         if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
613           return iter->types[i];
614       }
615       iter = iter->next;
616     } while (iter != end);
617   }
618
619   /* neither found a match */
620   return 0;
621 }
622
623 /*
624    Pack binary data into a string
625 */
626 SWIGRUNTIME char *
627 SWIG_PackData(char *c, void *ptr, size_t sz) {
628   static const char hex[17] = "0123456789abcdef";
629   register const unsigned char *u = (unsigned char *) ptr;
630   register const unsigned char *eu =  u + sz;
631   for (; u != eu; ++u) {
632     register unsigned char uu = *u;
633     *(c++) = hex[(uu & 0xf0) >> 4];
634     *(c++) = hex[uu & 0xf];
635   }
636   return c;
637 }
638
639 /*
640    Unpack binary data from a string
641 */
642 SWIGRUNTIME const char *
643 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
644   register unsigned char *u = (unsigned char *) ptr;
645   register const unsigned char *eu = u + sz;
646   for (; u != eu; ++u) {
647     register char d = *(c++);
648     register unsigned char uu;
649     if ((d >= '0') && (d <= '9'))
650       uu = ((d - '0') << 4);
651     else if ((d >= 'a') && (d <= 'f'))
652       uu = ((d - ('a'-10)) << 4);
653     else
654       return (char *) 0;
655     d = *(c++);
656     if ((d >= '0') && (d <= '9'))
657       uu |= (d - '0');
658     else if ((d >= 'a') && (d <= 'f'))
659       uu |= (d - ('a'-10));
660     else
661       return (char *) 0;
662     *u = uu;
663   }
664   return c;
665 }
666
667 /*
668    Pack 'void *' into a string buffer.
669 */
670 SWIGRUNTIME char *
671 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
672   char *r = buff;
673   if ((2*sizeof(void *) + 2) > bsz) return 0;
674   *(r++) = '_';
675   r = SWIG_PackData(r,&ptr,sizeof(void *));
676   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
677   strcpy(r,name);
678   return buff;
679 }
680
681 SWIGRUNTIME const char *
682 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
683   if (*c != '_') {
684     if (strcmp(c,"NULL") == 0) {
685       *ptr = (void *) 0;
686       return name;
687     } else {
688       return 0;
689     }
690   }
691   return SWIG_UnpackData(++c,ptr,sizeof(void *));
692 }
693
694 SWIGRUNTIME char *
695 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
696   char *r = buff;
697   size_t lname = (name ? strlen(name) : 0);
698   if ((2*sz + 2 + lname) > bsz) return 0;
699   *(r++) = '_';
700   r = SWIG_PackData(r,ptr,sz);
701   if (lname) {
702     strncpy(r,name,lname+1);
703   } else {
704     *r = 0;
705   }
706   return buff;
707 }
708
709 SWIGRUNTIME const char *
710 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
711   if (*c != '_') {
712     if (strcmp(c,"NULL") == 0) {
713       memset(ptr,0,sz);
714       return name;
715     } else {
716       return 0;
717     }
718   }
719   return SWIG_UnpackData(++c,ptr,sz);
720 }
721
722 #ifdef __cplusplus
723 }
724 #endif
725
726 /* -----------------------------------------------------------------------------
727  * guile_scm_run.swg
728  * ----------------------------------------------------------------------------- */
729
730 #include <libguile.h>
731 #include <stdio.h>
732 #include <string.h>
733 #include <stdlib.h>
734 #include <assert.h>
735
736 #ifdef __cplusplus
737 extern "C" {
738 #endif
739
740
741 /* In the code below, use guile 2.0 compatible functions where possible.
742    Functions that don't exist in older versions will be mapped to
743    a deprecated equivalent for those versions only */
744 #if defined (SCM_MAJOR_VERSION) && (SCM_MAJOR_VERSION < 2)
745
746 static SCM
747 scm_module_variable (SCM module, SCM sym)
748 {
749   return scm_sym2var (sym, scm_module_lookup_closure (module), SCM_BOOL_F);
750 }
751
752 #endif
753
754 #if SCM_MAJOR_VERSION >= 2
755 // scm_c_define_gsubr takes a different parameter type
756 // depending on the guile version
757
758 typedef scm_t_subr swig_guile_proc;
759 #else
760 typedef SCM (*swig_guile_proc)();
761 #endif
762 typedef SCM (*guile_destructor)(SCM);
763
764 typedef struct swig_guile_clientdata {
765   guile_destructor destroy;
766   SCM goops_class;
767 } swig_guile_clientdata;
768
769 #if SCM_MAJOR_VERSION <= 2
770 #define scm_to_utf8_string scm_to_locale_string
771 #define scm_from_utf8_string scm_from_locale_string
772 #endif
773 #define SWIG_scm2str(s) \
774   SWIG_Guile_scm2newstr(s, NULL)
775 #define SWIG_str02scm(str) \
776   str ? scm_from_utf8_string(str) : SCM_BOOL_F 
777 # define SWIG_malloc(size) \
778   scm_malloc(size)
779 # define SWIG_free(mem) \
780   free(mem)
781 #define SWIG_ConvertPtr(s, result, type, flags) \
782   SWIG_Guile_ConvertPtr(s, result, type, flags)
783 #define SWIG_MustGetPtr(s, type, argnum, flags) \
784   SWIG_Guile_MustGetPtr(s, type, argnum, flags, FUNC_NAME)
785 #define SWIG_NewPointerObj(ptr, type, owner) \
786   SWIG_Guile_NewPointerObj((void*)ptr, type, owner)
787 #define SWIG_PointerAddress(object) \
788   SWIG_Guile_PointerAddress(object)
789 #define SWIG_PointerType(object) \
790   SWIG_Guile_PointerType(object)
791 #define SWIG_IsPointerOfType(object, type) \
792   SWIG_Guile_IsPointerOfType(object, type)
793 #define SWIG_IsPointer(object) \
794   SWIG_Guile_IsPointer(object)
795 #define SWIG_contract_assert(expr, msg)                         \
796   if (!(expr))                                                  \
797     scm_error(scm_from_locale_symbol("swig-contract-assertion-failed"), \
798               (char *) FUNC_NAME, (char *) msg,                 \
799               SCM_EOL, SCM_BOOL_F); else
800
801 /* for C++ member pointers, ie, member methods */
802 #define SWIG_ConvertMember(obj, ptr, sz, ty) \
803   SWIG_Guile_ConvertMember(obj, ptr, sz, ty, FUNC_NAME)
804 #define SWIG_NewMemberObj(ptr, sz, type) \
805   SWIG_Guile_NewMemberObj(ptr, sz, type, FUNC_NAME)
806   
807 /* Runtime API */
808 static swig_module_info *SWIG_Guile_GetModule(void *SWIGUNUSEDPARM(clientdata));
809 #define SWIG_GetModule(clientdata) SWIG_Guile_GetModule(clientdata)
810 #define SWIG_SetModule(clientdata, pointer) SWIG_Guile_SetModule(pointer)
811   
812 SWIGINTERN char *
813 SWIG_Guile_scm2newstr(SCM str, size_t *len) {
814 #define FUNC_NAME "SWIG_Guile_scm2newstr"
815   char *ret;
816
817   SCM_ASSERT (scm_is_string(str), str, 1, FUNC_NAME);
818
819   ret = scm_to_utf8_string(str);
820   if (!ret) return NULL;
821
822   if (len) *len = strlen(ret) - 1;
823   return ret;
824 #undef FUNC_NAME
825 }
826
827 static int swig_initialized = 0;
828 static scm_t_bits swig_tag = 0;
829 static scm_t_bits swig_collectable_tag = 0;
830 static scm_t_bits swig_destroyed_tag = 0;
831 static scm_t_bits swig_member_function_tag = 0;
832 static SCM swig_make_func = SCM_EOL;
833 static SCM swig_keyword = SCM_EOL;
834 static SCM swig_symbol = SCM_EOL;
835
836 #define SWIG_Guile_GetSmob(x) \
837   ( !scm_is_null(x) && SCM_INSTANCEP(x) && scm_is_true(scm_slot_exists_p(x, swig_symbol)) \
838       ? scm_slot_ref(x, swig_symbol) : (x) )
839
840 SWIGINTERN SCM
841 SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
842 {
843   if (ptr == NULL)
844     return SCM_EOL;
845   else {
846     SCM smob;
847     swig_guile_clientdata *cdata = (swig_guile_clientdata *) type->clientdata;
848     if (owner)
849       SCM_NEWSMOB2(smob, swig_collectable_tag, ptr, (void *) type);
850     else
851       SCM_NEWSMOB2(smob, swig_tag, ptr, (void *) type);
852
853     if (!cdata || SCM_NULLP(cdata->goops_class) || swig_make_func == SCM_EOL ) {
854       return smob;
855     } else {
856       /* the scm_make() C function only handles the creation of gf,
857          methods and classes (no instances) the (make ...) function is
858          later redefined in goops.scm.  So we need to call that
859          Scheme function. */
860       return scm_apply(swig_make_func,
861                        scm_list_3(cdata->goops_class,
862                                   swig_keyword,
863                                   smob),
864                        SCM_EOL);
865     }
866   }
867 }
868
869 SWIGINTERN unsigned long
870 SWIG_Guile_PointerAddress(SCM object)
871 {
872   SCM smob = SWIG_Guile_GetSmob(object);
873   if (SCM_NULLP(smob)) return 0;
874   else if (SCM_SMOB_PREDICATE(swig_tag, smob)
875            || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
876            || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
877     return (unsigned long) (void *) SCM_CELL_WORD_1(smob);
878   }
879   else scm_wrong_type_arg("SWIG-Guile-PointerAddress", 1, object);
880 }
881
882 SWIGINTERN swig_type_info *
883 SWIG_Guile_PointerType(SCM object)
884 {
885   SCM smob = SWIG_Guile_GetSmob(object);
886   if (SCM_NULLP(smob)) return NULL;
887   else if (SCM_SMOB_PREDICATE(swig_tag, smob)
888            || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
889            || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
890     return (swig_type_info *) SCM_CELL_WORD_2(smob);
891   }
892   else scm_wrong_type_arg("SWIG-Guile-PointerType", 1, object);
893 }
894   
895 SWIGINTERN int
896 SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
897 {
898   swig_cast_info *cast;
899   swig_type_info *from;
900   SCM smob = SWIG_Guile_GetSmob(s);
901
902   if (SCM_NULLP(smob)) {
903     *result = NULL;
904     return SWIG_OK;
905   } else if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
906     /* we do not accept smobs representing destroyed pointers */
907     from = (swig_type_info *) SCM_CELL_WORD_2(smob);
908     if (!from) return SWIG_ERROR;
909     if (type) {
910       cast = SWIG_TypeCheckStruct(from, type);
911       if (cast) {
912         int newmemory = 0;
913         *result = SWIG_TypeCast(cast, (void *) SCM_CELL_WORD_1(smob), &newmemory);
914         assert(!newmemory); /* newmemory handling not yet implemented */
915         return SWIG_OK;
916       } else {
917         return SWIG_ERROR;
918       }
919     } else {
920       *result = (void *) SCM_CELL_WORD_1(smob);
921       return SWIG_OK;
922     }
923   }
924   return SWIG_ERROR;
925 }
926
927 SWIGINTERNINLINE void *
928 SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
929                        int argnum, int flags, const char *func_name)
930 {
931   void *result;
932   int res = SWIG_Guile_ConvertPtr(s, &result, type, flags);
933   if (!SWIG_IsOK(res)) {
934     /* type mismatch */
935     scm_wrong_type_arg((char *) func_name, argnum, s);
936   }
937   return result;
938 }
939
940 SWIGINTERNINLINE int
941 SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
942 {
943   void *result;
944   if (SWIG_Guile_ConvertPtr(s, &result, type, 0)) {
945     /* type mismatch */
946     return 0;
947   }
948   else return 1;
949 }
950
951 SWIGINTERNINLINE int
952 SWIG_Guile_IsPointer (SCM s)
953 {
954   /* module might not be initialized yet, so initialize it */
955   SWIG_GetModule(0);
956   return SWIG_Guile_IsPointerOfType (s, NULL);
957 }
958
959 /* Mark a pointer object non-collectable */
960 SWIGINTERN void
961 SWIG_Guile_MarkPointerNoncollectable(SCM s)
962 {
963   SCM smob = SWIG_Guile_GetSmob(s);
964   if (!SCM_NULLP(smob)) {
965     if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
966       SCM_SET_CELL_TYPE(smob, swig_tag);
967     }
968     else scm_wrong_type_arg(NULL, 0, s);
969   }
970 }
971
972 /* Mark a pointer object destroyed */
973 SWIGINTERN void
974 SWIG_Guile_MarkPointerDestroyed(SCM s)
975 {
976   SCM smob = SWIG_Guile_GetSmob(s);
977   if (!SCM_NULLP(smob)) {
978     if (SCM_SMOB_PREDICATE(swig_tag, smob) || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)) {
979       SCM_SET_CELL_TYPE(smob, swig_destroyed_tag);
980     }
981     else scm_wrong_type_arg(NULL, 0, s);
982   }
983 }
984
985 /* Member functions */
986
987 SWIGINTERN SCM
988 SWIG_Guile_NewMemberObj(void *ptr, size_t sz, swig_type_info *type,
989                         const char *func_name)
990 {
991   SCM smob;
992   void *copy = malloc(sz);
993   memcpy(copy, ptr, sz);
994   SCM_NEWSMOB2(smob, swig_member_function_tag, copy, (void *) type);
995   return smob;
996 }
997
998 SWIGINTERN int
999 SWIG_Guile_ConvertMember(SCM smob, void *ptr, size_t sz, swig_type_info *type,
1000                          const char *func_name)
1001 {
1002   swig_cast_info *cast;
1003   swig_type_info *from;
1004
1005   if (SCM_SMOB_PREDICATE(swig_member_function_tag, smob)) {
1006     from = (swig_type_info *) SCM_CELL_WORD_2(smob);
1007     if (!from) return SWIG_ERROR;
1008     if (type) {
1009       cast = SWIG_TypeCheckStruct(from, type);
1010       if (!cast) return SWIG_ERROR;
1011     }
1012     memcpy(ptr, (void *) SCM_CELL_WORD_1(smob), sz);
1013     return SWIG_OK;
1014   }
1015   return SWIG_ERROR;
1016 }
1017      
1018
1019 /* Init */
1020
1021 SWIGINTERN int
1022 print_swig_aux (SCM swig_smob, SCM port, scm_print_state *pstate, 
1023                 const char *attribute)
1024 {
1025   swig_type_info *type;
1026   
1027   type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob);
1028   if (type) {
1029     scm_puts((char *) "#<", port);
1030     scm_puts((char *) attribute, port);
1031     scm_puts((char *) "swig-pointer ", port);
1032     scm_puts((char *) SWIG_TypePrettyName(type), port);
1033     scm_puts((char *) " ", port);
1034     scm_intprint((long) SCM_CELL_WORD_1(swig_smob), 16, port);
1035     scm_puts((char *) ">", port);
1036     /* non-zero means success */
1037     return 1;
1038   } else {
1039     return 0;
1040   }
1041 }
1042
1043   
1044 SWIGINTERN int
1045 print_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
1046 {
1047   return print_swig_aux(swig_smob, port, pstate, "");
1048 }
1049
1050 SWIGINTERN int
1051 print_collectable_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
1052 {
1053   return print_swig_aux(swig_smob, port, pstate, "collectable-");
1054 }
1055
1056 SWIGINTERN int
1057 print_destroyed_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
1058 {
1059   return print_swig_aux(swig_smob, port, pstate, "destroyed-");
1060 }
1061
1062 SWIGINTERN int
1063 print_member_function_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
1064 {
1065   swig_type_info *type;
1066   type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob);
1067   if (type) {
1068     scm_puts((char *) "#<", port);
1069     scm_puts((char *) "swig-member-function-pointer ", port);
1070     scm_puts((char *) SWIG_TypePrettyName(type), port);
1071     scm_puts((char *) " >", port);
1072     /* non-zero means success */
1073     return 1;
1074   } else {
1075     return 0;
1076   }
1077 }
1078
1079 SWIGINTERN SCM
1080 equalp_swig (SCM A, SCM B)
1081 {
1082   if (SCM_CELL_WORD_0(A) == SCM_CELL_WORD_0(B) && SCM_CELL_WORD_1(A) == SCM_CELL_WORD_1(B) 
1083       && SCM_CELL_WORD_2(A) == SCM_CELL_WORD_2(B))
1084     return SCM_BOOL_T;
1085   else return SCM_BOOL_F;
1086 }
1087
1088 SWIGINTERN size_t
1089 free_swig(SCM A)
1090 {
1091   swig_type_info *type = (swig_type_info *) SCM_CELL_WORD_2(A);
1092   if (type) {
1093     if (type->clientdata && ((swig_guile_clientdata *)type->clientdata)->destroy)
1094       ((swig_guile_clientdata *)type->clientdata)->destroy(A);
1095   } 
1096   return 0;
1097 }
1098
1099 SWIGINTERN size_t
1100 free_swig_member_function(SCM A)
1101 {
1102   free((swig_type_info *) SCM_CELL_WORD_1(A));
1103   return 0;
1104 }
1105
1106 SWIGINTERN int
1107 ensure_smob_tag(SCM swig_module,
1108                 scm_t_bits *tag_variable,
1109                 const char *smob_name,
1110                 const char *scheme_variable_name)
1111 {
1112   SCM variable = scm_module_variable(swig_module,
1113                              scm_from_locale_symbol(scheme_variable_name));
1114   if (scm_is_false(variable)) {
1115     *tag_variable = scm_make_smob_type((char*)scheme_variable_name, 0);
1116     scm_c_module_define(swig_module, scheme_variable_name, 
1117                         scm_from_ulong(*tag_variable));
1118     return 1;
1119   }
1120   else {
1121     *tag_variable = scm_to_ulong(SCM_VARIABLE_REF(variable));
1122     return 0;
1123   }
1124 }
1125
1126 SWIGINTERN SCM
1127 SWIG_Guile_Init ()
1128 {
1129   static SCM swig_module;
1130   
1131   if (swig_initialized) return swig_module;
1132   swig_initialized = 1;
1133
1134   swig_module = scm_c_resolve_module("Swig swigrun");
1135   if (ensure_smob_tag(swig_module, &swig_tag,
1136                       "swig-pointer", "swig-pointer-tag")) {
1137     scm_set_smob_print(swig_tag, print_swig);
1138     scm_set_smob_equalp(swig_tag, equalp_swig);
1139   }
1140   if (ensure_smob_tag(swig_module, &swig_collectable_tag,
1141                       "collectable-swig-pointer", "collectable-swig-pointer-tag")) {
1142     scm_set_smob_print(swig_collectable_tag, print_collectable_swig);
1143     scm_set_smob_equalp(swig_collectable_tag, equalp_swig);
1144     scm_set_smob_free(swig_collectable_tag, free_swig);
1145   }
1146   if (ensure_smob_tag(swig_module, &swig_destroyed_tag,
1147                       "destroyed-swig-pointer", "destroyed-swig-pointer-tag")) {
1148     scm_set_smob_print(swig_destroyed_tag, print_destroyed_swig);
1149     scm_set_smob_equalp(swig_destroyed_tag, equalp_swig);
1150   }
1151   if (ensure_smob_tag(swig_module, &swig_member_function_tag,
1152                       "swig-member-function-pointer", "swig-member-function-pointer-tag")) {
1153     scm_set_smob_print(swig_member_function_tag, print_member_function_swig);
1154     scm_set_smob_free(swig_member_function_tag, free_swig_member_function);
1155   }
1156   swig_make_func = scm_permanent_object(
1157   scm_variable_ref(scm_c_module_lookup(scm_c_resolve_module("oop goops"), "make")));
1158   swig_keyword = scm_permanent_object(scm_from_locale_keyword((char*) "init-smob"));
1159   swig_symbol = scm_permanent_object(scm_from_locale_symbol("swig-smob"));
1160 #ifdef SWIG_INIT_RUNTIME_MODULE
1161   SWIG_INIT_RUNTIME_MODULE
1162 #endif
1163
1164   return swig_module;
1165 }
1166
1167 SWIGINTERN swig_module_info *
1168 SWIG_Guile_GetModule(void *SWIGUNUSEDPARM(clientdata))
1169 {
1170   SCM module;
1171   SCM variable;
1172
1173   module = SWIG_Guile_Init();
1174
1175   variable = scm_module_variable(module,
1176                  scm_from_locale_symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME));
1177   if (scm_is_false(variable)) {
1178     return NULL;
1179   } else {
1180     return (swig_module_info *) scm_to_ulong(SCM_VARIABLE_REF(variable));
1181   }
1182 }
1183
1184 SWIGINTERN void
1185 SWIG_Guile_SetModule(swig_module_info *swig_module)
1186 {
1187   SCM module;
1188   SCM variable;
1189
1190   module = SWIG_Guile_Init();
1191     
1192   scm_module_define(module,
1193                     scm_from_locale_symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME),
1194                     scm_from_ulong((unsigned long) swig_module));
1195 }
1196
1197 SWIGINTERN int
1198 SWIG_Guile_GetArgs (SCM *dest, SCM rest,
1199                     int reqargs, int optargs,
1200                     const char *procname)
1201 {
1202   int i;
1203   int num_args_passed = 0;
1204   for (i = 0; i<reqargs; i++) {
1205     if (!SCM_CONSP(rest))
1206       scm_wrong_num_args(scm_from_utf8_string(procname ? (char *) procname : "unknown procedure"));
1207     *dest++ = SCM_CAR(rest);
1208     rest = SCM_CDR(rest);
1209     num_args_passed++;
1210   }
1211   for (i = 0; i<optargs && SCM_CONSP(rest); i++) {
1212     *dest++ = SCM_CAR(rest);
1213     rest = SCM_CDR(rest);
1214     num_args_passed++;
1215   }
1216   for (; i<optargs; i++)
1217     *dest++ = SCM_UNDEFINED;
1218   if (!SCM_NULLP(rest))
1219       scm_wrong_num_args(scm_from_utf8_string(procname ? (char *) procname : "unknown procedure"));
1220   return num_args_passed;
1221 }
1222
1223 #ifdef __cplusplus
1224 }
1225 #endif
1226
1227
1228
1229 #define GUILE_MAYBE_VALUES \
1230       if (gswig_list_p) gswig_result = scm_values(gswig_result);
1231
1232 #define GUILE_MAYBE_VECTOR \
1233       if (gswig_list_p) gswig_result = scm_vector(gswig_result);
1234
1235 #define SWIG_APPEND_VALUE(object)                                               \
1236     if (gswig_result == SCM_UNSPECIFIED)                                                \
1237         gswig_result = object;                                                  \
1238     else {                                                                      \
1239       if (!gswig_list_p) {                                                      \
1240               gswig_list_p = 1;                                                 \
1241               gswig_result = scm_listify(gswig_result, object, SCM_UNDEFINED);  \
1242       }                                                                 \
1243       else                                                                      \
1244             gswig_result = scm_append(scm_listify(gswig_result, scm_listify(object, SCM_UNDEFINED), SCM_UNDEFINED));            \
1245     }
1246
1247
1248 static swig_guile_clientdata _swig_guile_clientdatanlopt_doublevector = { NULL, SCM_EOL };
1249 static swig_guile_clientdata _swig_guile_clientdatanlopt_roundoff_limited = { NULL, SCM_EOL };
1250 static swig_guile_clientdata _swig_guile_clientdatanlopt_forced_stop = { NULL, SCM_EOL };
1251 static swig_guile_clientdata _swig_guile_clientdatanlopt_opt = { NULL, SCM_EOL };
1252
1253 /* -------- TYPES TABLE (BEGIN) -------- */
1254
1255 #define SWIGTYPE_p_double swig_types[0]
1256 #define SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double swig_types[1]
1257 #define SWIGTYPE_p_int swig_types[2]
1258 #define SWIGTYPE_p_nlopt__forced_stop swig_types[3]
1259 #define SWIGTYPE_p_nlopt__opt swig_types[4]
1260 #define SWIGTYPE_p_nlopt__roundoff_limited swig_types[5]
1261 #define SWIGTYPE_p_nlopt_func swig_types[6]
1262 #define SWIGTYPE_p_nlopt_mfunc swig_types[7]
1263 #define SWIGTYPE_p_nlopt_munge swig_types[8]
1264 #define SWIGTYPE_p_nlopt_opt swig_types[9]
1265 #define SWIGTYPE_p_nlopt_result swig_types[10]
1266 #define SWIGTYPE_p_std__out_of_range swig_types[11]
1267 #define SWIGTYPE_p_std__vectorT_double_t swig_types[12]
1268 #define SWIGTYPE_p_unsigned_long swig_types[13]
1269 static swig_type_info *swig_types[15];
1270 static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
1271 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1272 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1273
1274 /* -------- TYPES TABLE (END) -------- */
1275
1276
1277 #include "nlopt.hpp"
1278
1279
1280 #include <stdexcept>
1281
1282
1283 #include <string>
1284
1285 inline std::string SWIG_scm2string(SCM x) {
1286     char* temp;
1287     temp = SWIG_scm2str(x);
1288     std::string s(temp);
1289     if (temp) SWIG_free(temp);
1290     return s;
1291 }
1292
1293
1294 #include <vector>
1295 #include <algorithm>
1296 #include <stdexcept>
1297
1298 SWIGINTERN double std_vector_Sl_double_Sg__pop(std::vector< double > *self){
1299                 if (self->size() == 0)
1300                     throw std::out_of_range("pop from empty vector");
1301                 double x = self->back();
1302                 self->pop_back();
1303                 return x;
1304             }
1305 SWIGINTERN double std_vector_Sl_double_Sg__ref(std::vector< double > *self,int i){
1306                 int size = int(self->size());
1307                 if (i>=0 && i<size)
1308                     return (*self)[i];
1309                 else
1310                     throw std::out_of_range("vector index out of range");
1311             }
1312 SWIGINTERN void std_vector_Sl_double_Sg__set(std::vector< double > *self,int i,double x){
1313                 int size = int(self->size());
1314                 if (i>=0 && i<size)
1315                     (*self)[i] = x;
1316                 else
1317                     throw std::out_of_range("vector index out of range");
1318             }
1319
1320 // work around obsolete stuff used by swig guile
1321 #if SCM_MAJOR_VERSION >= 2
1322 #  define gh_symbol2scm scm_from_latin1_symbol
1323 #else
1324 #  define gh_symbol2scm scm_str2symbol
1325 #endif
1326
1327
1328 // because our f_data pointer to the Scheme function is stored on the
1329 // heap, rather than the stack, it may be missed by the Guile garbage
1330 // collection and be accidentally freed.  Hence, use NLopts munge
1331 // feature to prevent this, by incrementing Guile's reference count.
1332 static void *free_guilefunc(void *p) { 
1333   scm_gc_unprotect_object((SCM) p); return p; }
1334 static void *dup_guilefunc(void *p) { 
1335   scm_gc_protect_object((SCM) p); return p; }
1336
1337 // func wrapper around Guile function val = f(x, grad)
1338 static double func_guile(unsigned n, const double *x, double *grad, void *f) {
1339   SCM xscm = scm_c_make_vector(n, SCM_UNSPECIFIED);
1340   for (unsigned i = 0; i < n; ++i)
1341     SCM_SIMPLE_VECTOR_SET(xscm, i, scm_make_real(x[i]));
1342   SCM grad_scm = grad ? scm_c_make_vector(n, SCM_UNSPECIFIED) : SCM_BOOL_F;
1343   SCM ret = scm_call_2((SCM) f, xscm, grad_scm);
1344   if (!scm_real_p(ret))
1345     throw std::invalid_argument("invalid result passed to nlopt");
1346   if (grad) {
1347     for (unsigned i = 0; i < n; ++i) {
1348       if (!scm_real_p(ret)) 
1349         throw std::invalid_argument("invalid gradient passed to nlopt");
1350       grad[i] = scm_to_double(SCM_SIMPLE_VECTOR_REF(grad_scm, i));
1351     }
1352   }
1353   return scm_to_double(ret);
1354 }
1355
1356 static int gswig_const_NLOPT_GN_DIRECT = nlopt::GN_DIRECT;
1357 static int gswig_const_NLOPT_GN_DIRECT_L = nlopt::GN_DIRECT_L;
1358 static int gswig_const_NLOPT_GN_DIRECT_L_RAND = nlopt::GN_DIRECT_L_RAND;
1359 static int gswig_const_NLOPT_GN_DIRECT_NOSCAL = nlopt::GN_DIRECT_NOSCAL;
1360 static int gswig_const_NLOPT_GN_DIRECT_L_NOSCAL = nlopt::GN_DIRECT_L_NOSCAL;
1361 static int gswig_const_NLOPT_GN_DIRECT_L_RAND_NOSCAL = nlopt::GN_DIRECT_L_RAND_NOSCAL;
1362 static int gswig_const_NLOPT_GN_ORIG_DIRECT = nlopt::GN_ORIG_DIRECT;
1363 static int gswig_const_NLOPT_GN_ORIG_DIRECT_L = nlopt::GN_ORIG_DIRECT_L;
1364 static int gswig_const_NLOPT_GD_STOGO = nlopt::GD_STOGO;
1365 static int gswig_const_NLOPT_GD_STOGO_RAND = nlopt::GD_STOGO_RAND;
1366 static int gswig_const_NLOPT_LD_LBFGS_NOCEDAL = nlopt::LD_LBFGS_NOCEDAL;
1367 static int gswig_const_NLOPT_LD_LBFGS = nlopt::LD_LBFGS;
1368 static int gswig_const_NLOPT_LN_PRAXIS = nlopt::LN_PRAXIS;
1369 static int gswig_const_NLOPT_LD_VAR1 = nlopt::LD_VAR1;
1370 static int gswig_const_NLOPT_LD_VAR2 = nlopt::LD_VAR2;
1371 static int gswig_const_NLOPT_LD_TNEWTON = nlopt::LD_TNEWTON;
1372 static int gswig_const_NLOPT_LD_TNEWTON_RESTART = nlopt::LD_TNEWTON_RESTART;
1373 static int gswig_const_NLOPT_LD_TNEWTON_PRECOND = nlopt::LD_TNEWTON_PRECOND;
1374 static int gswig_const_NLOPT_LD_TNEWTON_PRECOND_RESTART = nlopt::LD_TNEWTON_PRECOND_RESTART;
1375 static int gswig_const_NLOPT_GN_CRS2_LM = nlopt::GN_CRS2_LM;
1376 static int gswig_const_NLOPT_GN_MLSL = nlopt::GN_MLSL;
1377 static int gswig_const_NLOPT_GD_MLSL = nlopt::GD_MLSL;
1378 static int gswig_const_NLOPT_GN_MLSL_LDS = nlopt::GN_MLSL_LDS;
1379 static int gswig_const_NLOPT_GD_MLSL_LDS = nlopt::GD_MLSL_LDS;
1380 static int gswig_const_NLOPT_LD_MMA = nlopt::LD_MMA;
1381 static int gswig_const_NLOPT_LN_COBYLA = nlopt::LN_COBYLA;
1382 static int gswig_const_NLOPT_LN_NEWUOA = nlopt::LN_NEWUOA;
1383 static int gswig_const_NLOPT_LN_NEWUOA_BOUND = nlopt::LN_NEWUOA_BOUND;
1384 static int gswig_const_NLOPT_LN_NELDERMEAD = nlopt::LN_NELDERMEAD;
1385 static int gswig_const_NLOPT_LN_SBPLX = nlopt::LN_SBPLX;
1386 static int gswig_const_NLOPT_LN_AUGLAG = nlopt::LN_AUGLAG;
1387 static int gswig_const_NLOPT_LD_AUGLAG = nlopt::LD_AUGLAG;
1388 static int gswig_const_NLOPT_LN_AUGLAG_EQ = nlopt::LN_AUGLAG_EQ;
1389 static int gswig_const_NLOPT_LD_AUGLAG_EQ = nlopt::LD_AUGLAG_EQ;
1390 static int gswig_const_NLOPT_LN_BOBYQA = nlopt::LN_BOBYQA;
1391 static int gswig_const_NLOPT_GN_ISRES = nlopt::GN_ISRES;
1392 static int gswig_const_NLOPT_AUGLAG = nlopt::AUGLAG;
1393 static int gswig_const_NLOPT_AUGLAG_EQ = nlopt::AUGLAG_EQ;
1394 static int gswig_const_NLOPT_G_MLSL = nlopt::G_MLSL;
1395 static int gswig_const_NLOPT_G_MLSL_LDS = nlopt::G_MLSL_LDS;
1396 static int gswig_const_NLOPT_LD_SLSQP = nlopt::LD_SLSQP;
1397 static int gswig_const_NLOPT_LD_CCSAQ = nlopt::LD_CCSAQ;
1398 static int gswig_const_NLOPT_GN_ESCH = nlopt::GN_ESCH;
1399 static int gswig_const_NLOPT_NUM_ALGORITHMS = nlopt::NUM_ALGORITHMS;
1400 static int gswig_const_NLOPT_FAILURE = nlopt::FAILURE;
1401 static int gswig_const_NLOPT_INVALID_ARGS = nlopt::INVALID_ARGS;
1402 static int gswig_const_NLOPT_OUT_OF_MEMORY = nlopt::OUT_OF_MEMORY;
1403 static int gswig_const_NLOPT_ROUNDOFF_LIMITED = nlopt::ROUNDOFF_LIMITED;
1404 static int gswig_const_NLOPT_FORCED_STOP = nlopt::FORCED_STOP;
1405 static int gswig_const_NLOPT_SUCCESS = nlopt::SUCCESS;
1406 static int gswig_const_NLOPT_STOPVAL_REACHED = nlopt::STOPVAL_REACHED;
1407 static int gswig_const_NLOPT_FTOL_REACHED = nlopt::FTOL_REACHED;
1408 static int gswig_const_NLOPT_XTOL_REACHED = nlopt::XTOL_REACHED;
1409 static int gswig_const_NLOPT_MAXEVAL_REACHED = nlopt::MAXEVAL_REACHED;
1410 static int gswig_const_NLOPT_MAXTIME_REACHED = nlopt::MAXTIME_REACHED;
1411 static SCM
1412 _wrap_new_nlopt_doublevector__SWIG_0 (int argc, SCM *argv)
1413 {
1414 #define FUNC_NAME "new-nlopt-doublevector"
1415   unsigned int arg1 ;
1416   SCM gswig_result;
1417   SWIGUNUSED int gswig_list_p = 0;
1418   std::vector< double > *result = 0 ;
1419   
1420   {
1421     arg1 = (unsigned int) scm_to_uint(argv[0]);
1422   }
1423   result = (std::vector< double > *)new std::vector< double >(arg1);
1424   {
1425     gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__vectorT_double_t, 1);
1426   }
1427   
1428   return gswig_result;
1429 #undef FUNC_NAME
1430 }
1431
1432
1433 static SCM
1434 _wrap_new_nlopt_doublevector__SWIG_1 (int argc, SCM *argv)
1435 {
1436 #define FUNC_NAME "new-nlopt-doublevector"
1437   SCM gswig_result;
1438   SWIGUNUSED int gswig_list_p = 0;
1439   std::vector< double > *result = 0 ;
1440   
1441   result = (std::vector< double > *)new std::vector< double >();
1442   {
1443     gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__vectorT_double_t, 1);
1444   }
1445   
1446   return gswig_result;
1447 #undef FUNC_NAME
1448 }
1449
1450
1451 static SCM
1452 _wrap_new_nlopt_doublevector__SWIG_2 (int argc, SCM *argv)
1453 {
1454 #define FUNC_NAME "new-nlopt-doublevector"
1455   unsigned int arg1 ;
1456   double *arg2 = 0 ;
1457   double temp2 ;
1458   SCM gswig_result;
1459   SWIGUNUSED int gswig_list_p = 0;
1460   std::vector< double > *result = 0 ;
1461   
1462   {
1463     arg1 = (unsigned int) scm_to_uint(argv[0]);
1464   }
1465   {
1466     temp2 = scm_to_double(argv[1]);
1467     arg2 = (double *) &temp2;
1468   }
1469   result = (std::vector< double > *)new std::vector< double >(arg1,(double const &)*arg2);
1470   {
1471     gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__vectorT_double_t, 1);
1472   }
1473   
1474   
1475   return gswig_result;
1476 #undef FUNC_NAME
1477 }
1478
1479
1480 static SCM
1481 _wrap_new_nlopt_doublevector__SWIG_3 (int argc, SCM *argv)
1482 {
1483 #define FUNC_NAME "new-nlopt-doublevector"
1484   std::vector< double > *arg1 = 0 ;
1485   std::vector< double > temp1 ;
1486   SCM gswig_result;
1487   SWIGUNUSED int gswig_list_p = 0;
1488   std::vector< double > *result = 0 ;
1489   
1490   {
1491     if (scm_is_vector(argv[0])) {
1492       unsigned long size = scm_c_vector_length(argv[0]);
1493       temp1 = std::vector<double >(size);
1494       arg1 = &temp1;
1495       for (unsigned long i=0; i<size; i++) {
1496         SCM o = scm_vector_ref(argv[0],scm_from_ulong(i));
1497         if (scm_is_number(o))
1498         temp1[i] = (double)(scm_to_double(o));
1499         else
1500         scm_wrong_type_arg(FUNC_NAME, 1, argv[0]);
1501       }
1502     } else if (scm_is_null(argv[0])) {
1503       temp1 = std::vector<double >();
1504       arg1 = &temp1;
1505     } else if (scm_is_pair(argv[0])) {
1506       SCM v = scm_vector(argv[0]);
1507       unsigned long size = scm_c_vector_length(v);
1508       temp1 = std::vector<double >(size);
1509       arg1 = &temp1;
1510       for (unsigned long i=0; i<size; i++) {
1511         SCM o = scm_vector_ref(v,scm_from_ulong(i));
1512         if (scm_is_number(o))
1513         temp1[i] = (double)(scm_to_double(o));
1514         else
1515         scm_wrong_type_arg(FUNC_NAME, 1, argv[0]);
1516       }
1517     } else {
1518       arg1 = (std::vector< double > *) SWIG_MustGetPtr(argv[0],SWIGTYPE_p_std__vectorT_double_t,1, 0);
1519     }
1520   }
1521   result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1);
1522   {
1523     gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__vectorT_double_t, 1);
1524   }
1525   
1526   
1527   return gswig_result;
1528 #undef FUNC_NAME
1529 }
1530
1531
1532 static SCM
1533 _wrap_new_nlopt_doublevector(SCM rest)
1534 {
1535 #define FUNC_NAME "new-nlopt-doublevector"
1536   SCM argv[2];
1537   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "new-nlopt-doublevector");
1538   if (argc == 0) {
1539     return _wrap_new_nlopt_doublevector__SWIG_1(argc,argv);
1540   }
1541   if (argc == 1) {
1542     int _v;
1543     {
1544       _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0;
1545     }
1546     if (_v) {
1547       return _wrap_new_nlopt_doublevector__SWIG_0(argc,argv);
1548     }
1549   }
1550   if (argc == 1) {
1551     int _v;
1552     {
1553       /* native sequence? */
1554       if (scm_is_vector(argv[0])) {
1555         unsigned int size = scm_c_vector_length(argv[0]);
1556         if (size == 0) {
1557           /* an empty sequence can be of any type */
1558           _v = 1;
1559         } else {
1560           /* check the first element only */
1561           double* x;
1562           SCM o = scm_vector_ref(argv[0],scm_from_ulong(0));
1563           _v = scm_is_number(o) ? 1 : 0;
1564         }
1565       } else if (scm_is_null(argv[0])) {
1566         /* again, an empty sequence can be of any type */
1567         _v = 1;
1568       } else if (scm_is_pair(argv[0])) {
1569         /* check the first element only */
1570         double* x;
1571         SCM head = SCM_CAR(argv[0]);
1572         _v = scm_is_number(head) ? 1 : 0;
1573       } else {
1574         /* wrapped vector? */
1575         std::vector<double >* v;
1576         _v = (SWIG_ConvertPtr(argv[0],(void **) &v, 
1577             SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
1578       }
1579     }
1580     if (_v) {
1581       return _wrap_new_nlopt_doublevector__SWIG_3(argc,argv);
1582     }
1583   }
1584   if (argc == 2) {
1585     int _v;
1586     {
1587       _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0;
1588     }
1589     if (_v) {
1590       {
1591         _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
1592       }
1593       if (_v) {
1594         return _wrap_new_nlopt_doublevector__SWIG_2(argc,argv);
1595       }
1596     }
1597   }
1598   
1599   scm_misc_error("new-nlopt-doublevector", "No matching method for generic function `new_nlopt_doublevector'", SCM_EOL);
1600 #undef FUNC_NAME
1601 }
1602
1603
1604 static SCM
1605 _wrap_nlopt_doublevector_length (SCM s_0)
1606 {
1607 #define FUNC_NAME "nlopt-doublevector-length"
1608   std::vector< double > *arg1 = (std::vector< double > *) 0 ;
1609   std::vector< double > temp1 ;
1610   SCM gswig_result;
1611   SWIGUNUSED int gswig_list_p = 0;
1612   unsigned int result;
1613   
1614   {
1615     if (scm_is_vector(s_0)) {
1616       unsigned long size = scm_c_vector_length(s_0);
1617       temp1 = std::vector<double >(size);
1618       arg1 = &temp1;
1619       for (unsigned long i=0; i<size; i++) {
1620         SCM o = scm_vector_ref(s_0,scm_from_ulong(i));
1621         if (scm_is_number(o))
1622         temp1[i] = (double)(scm_to_double(o));
1623         else
1624         scm_wrong_type_arg(FUNC_NAME, 1, s_0);
1625       }
1626     } else if (scm_is_null(s_0)) {
1627       temp1 = std::vector<double >();
1628       arg1 = &temp1;
1629     } else if (scm_is_pair(s_0)) {
1630       SCM v = scm_vector(s_0);
1631       unsigned long size = scm_c_vector_length(v);
1632       temp1 = std::vector<double >(size);
1633       arg1 = &temp1;
1634       for (unsigned long i=0; i<size; i++) {
1635         SCM o = scm_vector_ref(v,scm_from_ulong(i));
1636         if (scm_is_number(o))
1637         temp1[i] = (double)(scm_to_double(o));
1638         else
1639         scm_wrong_type_arg(FUNC_NAME, 1, s_0);
1640       }
1641     } else {
1642       arg1 = (std::vector< double > *) SWIG_MustGetPtr(s_0,SWIGTYPE_p_std__vectorT_double_t,1, 0);
1643     }
1644   }
1645   result = (unsigned int)((std::vector< double > const *)arg1)->size();
1646   {
1647     gswig_result = scm_from_ulong(result);
1648   }
1649   
1650   
1651   return gswig_result;
1652 #undef FUNC_NAME
1653 }
1654
1655
1656 static SCM
1657 _wrap_nlopt_doublevector_emptyq___ (SCM s_0)
1658 {
1659 #define FUNC_NAME "nlopt-doublevector-empty?"
1660   std::vector< double > *arg1 = (std::vector< double > *) 0 ;
1661   std::vector< double > temp1 ;
1662   SCM gswig_result;
1663   SWIGUNUSED int gswig_list_p = 0;
1664   bool result;
1665   
1666   {
1667     if (scm_is_vector(s_0)) {
1668       unsigned long size = scm_c_vector_length(s_0);
1669       temp1 = std::vector<double >(size);
1670       arg1 = &temp1;
1671       for (unsigned long i=0; i<size; i++) {
1672         SCM o = scm_vector_ref(s_0,scm_from_ulong(i));
1673         if (scm_is_number(o))
1674         temp1[i] = (double)(scm_to_double(o));
1675         else
1676         scm_wrong_type_arg(FUNC_NAME, 1, s_0);
1677       }
1678     } else if (scm_is_null(s_0)) {
1679       temp1 = std::vector<double >();
1680       arg1 = &temp1;
1681     } else if (scm_is_pair(s_0)) {
1682       SCM v = scm_vector(s_0);
1683       unsigned long size = scm_c_vector_length(v);
1684       temp1 = std::vector<double >(size);
1685       arg1 = &temp1;
1686       for (unsigned long i=0; i<size; i++) {
1687         SCM o = scm_vector_ref(v,scm_from_ulong(i));
1688         if (scm_is_number(o))
1689         temp1[i] = (double)(scm_to_double(o));
1690         else
1691         scm_wrong_type_arg(FUNC_NAME, 1, s_0);
1692       }
1693     } else {
1694       arg1 = (std::vector< double > *) SWIG_MustGetPtr(s_0,SWIGTYPE_p_std__vectorT_double_t,1, 0);
1695     }
1696   }
1697   result = (bool)((std::vector< double > const *)arg1)->empty();
1698   {
1699     gswig_result = scm_from_bool(result);
1700   }
1701   
1702   
1703   return gswig_result;
1704 #undef FUNC_NAME
1705 }
1706
1707
1708 static SCM
1709 _wrap_nlopt_doublevector_clearN___ (SCM s_0)
1710 {
1711 #define FUNC_NAME "nlopt-doublevector-clear!"
1712   std::vector< double > *arg1 = (std::vector< double > *) 0 ;
1713   SCM gswig_result;
1714   SWIGUNUSED int gswig_list_p = 0;
1715   
1716   {
1717     arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
1718   }
1719   (arg1)->clear();
1720   gswig_result = SCM_UNSPECIFIED;
1721   
1722   
1723   return gswig_result;
1724 #undef FUNC_NAME
1725 }
1726
1727
1728 static SCM
1729 _wrap_nlopt_doublevector_pushN___ (SCM s_0, SCM s_1)
1730 {
1731 #define FUNC_NAME "nlopt-doublevector-push!"
1732   std::vector< double > *arg1 = (std::vector< double > *) 0 ;
1733   double arg2 ;
1734   SCM gswig_result;
1735   SWIGUNUSED int gswig_list_p = 0;
1736   
1737   {
1738     arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
1739   }
1740   {
1741     arg2 = (double) scm_to_double(s_1);
1742   }
1743   (arg1)->push_back(arg2);
1744   gswig_result = SCM_UNSPECIFIED;
1745   
1746   
1747   return gswig_result;
1748 #undef FUNC_NAME
1749 }
1750
1751
1752 static SCM
1753 _wrap_nlopt_doublevector_popN___ (SCM s_0)
1754 {
1755 #define FUNC_NAME "nlopt-doublevector-pop!"
1756   std::vector< double > *arg1 = (std::vector< double > *) 0 ;
1757   SCM gswig_result;
1758   SWIGUNUSED int gswig_list_p = 0;
1759   double result;
1760   
1761   {
1762     arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
1763   }
1764   try {
1765     result = (double)std_vector_Sl_double_Sg__pop(arg1);
1766   }
1767   catch(std::out_of_range &_e) {
1768     {
1769       std::out_of_range * temp = new std::out_of_range(_e);
1770       scm_throw(scm_from_locale_symbol((char *) "swig-exception"),
1771         scm_listify(SWIG_NewPointerObj(temp, SWIGTYPE_p_std__out_of_range, 1),
1772           SCM_UNDEFINED));
1773     }
1774   }
1775   
1776   {
1777     gswig_result = scm_from_double(result);
1778   }
1779   
1780   
1781   return gswig_result;
1782 #undef FUNC_NAME
1783 }
1784
1785
1786 static SCM
1787 _wrap_nlopt_doublevector_ref (SCM s_0, SCM s_1)
1788 {
1789 #define FUNC_NAME "nlopt-doublevector-ref"
1790   std::vector< double > *arg1 = (std::vector< double > *) 0 ;
1791   int arg2 ;
1792   SCM gswig_result;
1793   SWIGUNUSED int gswig_list_p = 0;
1794   double result;
1795   
1796   {
1797     arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
1798   }
1799   {
1800     arg2 = (int) scm_to_int(s_1);
1801   }
1802   try {
1803     result = (double)std_vector_Sl_double_Sg__ref(arg1,arg2);
1804   }
1805   catch(std::out_of_range &_e) {
1806     {
1807       std::out_of_range * temp = new std::out_of_range(_e);
1808       scm_throw(scm_from_locale_symbol((char *) "swig-exception"),
1809         scm_listify(SWIG_NewPointerObj(temp, SWIGTYPE_p_std__out_of_range, 1),
1810           SCM_UNDEFINED));
1811     }
1812   }
1813   
1814   {
1815     gswig_result = scm_from_double(result);
1816   }
1817   
1818   
1819   return gswig_result;
1820 #undef FUNC_NAME
1821 }
1822
1823
1824 static SCM
1825 _wrap_nlopt_doublevector_setN___ (SCM s_0, SCM s_1, SCM s_2)
1826 {
1827 #define FUNC_NAME "nlopt-doublevector-set!"
1828   std::vector< double > *arg1 = (std::vector< double > *) 0 ;
1829   int arg2 ;
1830   double arg3 ;
1831   SCM gswig_result;
1832   SWIGUNUSED int gswig_list_p = 0;
1833   
1834   {
1835     arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
1836   }
1837   {
1838     arg2 = (int) scm_to_int(s_1);
1839   }
1840   {
1841     arg3 = (double) scm_to_double(s_2);
1842   }
1843   try {
1844     std_vector_Sl_double_Sg__set(arg1,arg2,arg3);
1845   }
1846   catch(std::out_of_range &_e) {
1847     {
1848       std::out_of_range * temp = new std::out_of_range(_e);
1849       scm_throw(scm_from_locale_symbol((char *) "swig-exception"),
1850         scm_listify(SWIG_NewPointerObj(temp, SWIGTYPE_p_std__out_of_range, 1),
1851           SCM_UNDEFINED));
1852     }
1853   }
1854   
1855   gswig_result = SCM_UNSPECIFIED;
1856   
1857   
1858   return gswig_result;
1859 #undef FUNC_NAME
1860 }
1861
1862
1863 static SCM
1864 _wrap_delete_nlopt_doublevector (SCM s_0)
1865 {
1866 #define FUNC_NAME "delete-nlopt-doublevector"
1867   std::vector< double > *arg1 = (std::vector< double > *) 0 ;
1868   SCM gswig_result;
1869   SWIGUNUSED int gswig_list_p = 0;
1870   
1871   {
1872     arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
1873   }
1874   delete arg1;
1875   gswig_result = SCM_UNSPECIFIED;
1876   
1877   SWIG_Guile_MarkPointerDestroyed(s_0);
1878   
1879   return gswig_result;
1880 #undef FUNC_NAME
1881 }
1882
1883
1884 static SCM
1885 _wrap_nlopt_get_initial_step (SCM s_0, SCM s_1)
1886 {
1887 #define FUNC_NAME "nlopt-get-initial-step"
1888   nlopt_opt arg1 ;
1889   double *arg2 = (double *) 0 ;
1890   nlopt_opt *argp1 ;
1891   SCM gswig_result;
1892   SWIGUNUSED int gswig_list_p = 0;
1893   nlopt_result result;
1894   
1895   {
1896     argp1 = (nlopt_opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt_opt, 1, 0);
1897     arg1 = *argp1;
1898   }
1899   {
1900     arg2 = (double *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_double, 2, 0);
1901   }
1902   result = nlopt_get_initial_step(arg1,arg2);
1903   {
1904     nlopt_result * resultptr;
1905     resultptr = new nlopt_result((const nlopt_result &) result);
1906     gswig_result =  SWIG_NewPointerObj (resultptr, SWIGTYPE_p_nlopt_result, 1);
1907   }
1908   
1909   
1910   return gswig_result;
1911 #undef FUNC_NAME
1912 }
1913
1914
1915 static SCM
1916 _wrap_NLOPT_GN_DIRECT(SCM s_0)
1917 {
1918 #define FUNC_NAME "NLOPT-GN-DIRECT"
1919   SCM gswig_result;
1920   
1921   {
1922     gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT);
1923   }
1924   
1925   return gswig_result;
1926 #undef FUNC_NAME
1927 }
1928
1929
1930 static SCM
1931 _wrap_NLOPT_GN_DIRECT_L(SCM s_0)
1932 {
1933 #define FUNC_NAME "NLOPT-GN-DIRECT-L"
1934   SCM gswig_result;
1935   
1936   {
1937     gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_L);
1938   }
1939   
1940   return gswig_result;
1941 #undef FUNC_NAME
1942 }
1943
1944
1945 static SCM
1946 _wrap_NLOPT_GN_DIRECT_L_RAND(SCM s_0)
1947 {
1948 #define FUNC_NAME "NLOPT-GN-DIRECT-L-RAND"
1949   SCM gswig_result;
1950   
1951   {
1952     gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_L_RAND);
1953   }
1954   
1955   return gswig_result;
1956 #undef FUNC_NAME
1957 }
1958
1959
1960 static SCM
1961 _wrap_NLOPT_GN_DIRECT_NOSCAL(SCM s_0)
1962 {
1963 #define FUNC_NAME "NLOPT-GN-DIRECT-NOSCAL"
1964   SCM gswig_result;
1965   
1966   {
1967     gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_NOSCAL);
1968   }
1969   
1970   return gswig_result;
1971 #undef FUNC_NAME
1972 }
1973
1974
1975 static SCM
1976 _wrap_NLOPT_GN_DIRECT_L_NOSCAL(SCM s_0)
1977 {
1978 #define FUNC_NAME "NLOPT-GN-DIRECT-L-NOSCAL"
1979   SCM gswig_result;
1980   
1981   {
1982     gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_L_NOSCAL);
1983   }
1984   
1985   return gswig_result;
1986 #undef FUNC_NAME
1987 }
1988
1989
1990 static SCM
1991 _wrap_NLOPT_GN_DIRECT_L_RAND_NOSCAL(SCM s_0)
1992 {
1993 #define FUNC_NAME "NLOPT-GN-DIRECT-L-RAND-NOSCAL"
1994   SCM gswig_result;
1995   
1996   {
1997     gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_L_RAND_NOSCAL);
1998   }
1999   
2000   return gswig_result;
2001 #undef FUNC_NAME
2002 }
2003
2004
2005 static SCM
2006 _wrap_NLOPT_GN_ORIG_DIRECT(SCM s_0)
2007 {
2008 #define FUNC_NAME "NLOPT-GN-ORIG-DIRECT"
2009   SCM gswig_result;
2010   
2011   {
2012     gswig_result = scm_from_long(gswig_const_NLOPT_GN_ORIG_DIRECT);
2013   }
2014   
2015   return gswig_result;
2016 #undef FUNC_NAME
2017 }
2018
2019
2020 static SCM
2021 _wrap_NLOPT_GN_ORIG_DIRECT_L(SCM s_0)
2022 {
2023 #define FUNC_NAME "NLOPT-GN-ORIG-DIRECT-L"
2024   SCM gswig_result;
2025   
2026   {
2027     gswig_result = scm_from_long(gswig_const_NLOPT_GN_ORIG_DIRECT_L);
2028   }
2029   
2030   return gswig_result;
2031 #undef FUNC_NAME
2032 }
2033
2034
2035 static SCM
2036 _wrap_NLOPT_GD_STOGO(SCM s_0)
2037 {
2038 #define FUNC_NAME "NLOPT-GD-STOGO"
2039   SCM gswig_result;
2040   
2041   {
2042     gswig_result = scm_from_long(gswig_const_NLOPT_GD_STOGO);
2043   }
2044   
2045   return gswig_result;
2046 #undef FUNC_NAME
2047 }
2048
2049
2050 static SCM
2051 _wrap_NLOPT_GD_STOGO_RAND(SCM s_0)
2052 {
2053 #define FUNC_NAME "NLOPT-GD-STOGO-RAND"
2054   SCM gswig_result;
2055   
2056   {
2057     gswig_result = scm_from_long(gswig_const_NLOPT_GD_STOGO_RAND);
2058   }
2059   
2060   return gswig_result;
2061 #undef FUNC_NAME
2062 }
2063
2064
2065 static SCM
2066 _wrap_NLOPT_LD_LBFGS_NOCEDAL(SCM s_0)
2067 {
2068 #define FUNC_NAME "NLOPT-LD-LBFGS-NOCEDAL"
2069   SCM gswig_result;
2070   
2071   {
2072     gswig_result = scm_from_long(gswig_const_NLOPT_LD_LBFGS_NOCEDAL);
2073   }
2074   
2075   return gswig_result;
2076 #undef FUNC_NAME
2077 }
2078
2079
2080 static SCM
2081 _wrap_NLOPT_LD_LBFGS(SCM s_0)
2082 {
2083 #define FUNC_NAME "NLOPT-LD-LBFGS"
2084   SCM gswig_result;
2085   
2086   {
2087     gswig_result = scm_from_long(gswig_const_NLOPT_LD_LBFGS);
2088   }
2089   
2090   return gswig_result;
2091 #undef FUNC_NAME
2092 }
2093
2094
2095 static SCM
2096 _wrap_NLOPT_LN_PRAXIS(SCM s_0)
2097 {
2098 #define FUNC_NAME "NLOPT-LN-PRAXIS"
2099   SCM gswig_result;
2100   
2101   {
2102     gswig_result = scm_from_long(gswig_const_NLOPT_LN_PRAXIS);
2103   }
2104   
2105   return gswig_result;
2106 #undef FUNC_NAME
2107 }
2108
2109
2110 static SCM
2111 _wrap_NLOPT_LD_VAR1(SCM s_0)
2112 {
2113 #define FUNC_NAME "NLOPT-LD-VAR1"
2114   SCM gswig_result;
2115   
2116   {
2117     gswig_result = scm_from_long(gswig_const_NLOPT_LD_VAR1);
2118   }
2119   
2120   return gswig_result;
2121 #undef FUNC_NAME
2122 }
2123
2124
2125 static SCM
2126 _wrap_NLOPT_LD_VAR2(SCM s_0)
2127 {
2128 #define FUNC_NAME "NLOPT-LD-VAR2"
2129   SCM gswig_result;
2130   
2131   {
2132     gswig_result = scm_from_long(gswig_const_NLOPT_LD_VAR2);
2133   }
2134   
2135   return gswig_result;
2136 #undef FUNC_NAME
2137 }
2138
2139
2140 static SCM
2141 _wrap_NLOPT_LD_TNEWTON(SCM s_0)
2142 {
2143 #define FUNC_NAME "NLOPT-LD-TNEWTON"
2144   SCM gswig_result;
2145   
2146   {
2147     gswig_result = scm_from_long(gswig_const_NLOPT_LD_TNEWTON);
2148   }
2149   
2150   return gswig_result;
2151 #undef FUNC_NAME
2152 }
2153
2154
2155 static SCM
2156 _wrap_NLOPT_LD_TNEWTON_RESTART(SCM s_0)
2157 {
2158 #define FUNC_NAME "NLOPT-LD-TNEWTON-RESTART"
2159   SCM gswig_result;
2160   
2161   {
2162     gswig_result = scm_from_long(gswig_const_NLOPT_LD_TNEWTON_RESTART);
2163   }
2164   
2165   return gswig_result;
2166 #undef FUNC_NAME
2167 }
2168
2169
2170 static SCM
2171 _wrap_NLOPT_LD_TNEWTON_PRECOND(SCM s_0)
2172 {
2173 #define FUNC_NAME "NLOPT-LD-TNEWTON-PRECOND"
2174   SCM gswig_result;
2175   
2176   {
2177     gswig_result = scm_from_long(gswig_const_NLOPT_LD_TNEWTON_PRECOND);
2178   }
2179   
2180   return gswig_result;
2181 #undef FUNC_NAME
2182 }
2183
2184
2185 static SCM
2186 _wrap_NLOPT_LD_TNEWTON_PRECOND_RESTART(SCM s_0)
2187 {
2188 #define FUNC_NAME "NLOPT-LD-TNEWTON-PRECOND-RESTART"
2189   SCM gswig_result;
2190   
2191   {
2192     gswig_result = scm_from_long(gswig_const_NLOPT_LD_TNEWTON_PRECOND_RESTART);
2193   }
2194   
2195   return gswig_result;
2196 #undef FUNC_NAME
2197 }
2198
2199
2200 static SCM
2201 _wrap_NLOPT_GN_CRS2_LM(SCM s_0)
2202 {
2203 #define FUNC_NAME "NLOPT-GN-CRS2-LM"
2204   SCM gswig_result;
2205   
2206   {
2207     gswig_result = scm_from_long(gswig_const_NLOPT_GN_CRS2_LM);
2208   }
2209   
2210   return gswig_result;
2211 #undef FUNC_NAME
2212 }
2213
2214
2215 static SCM
2216 _wrap_NLOPT_GN_MLSL(SCM s_0)
2217 {
2218 #define FUNC_NAME "NLOPT-GN-MLSL"
2219   SCM gswig_result;
2220   
2221   {
2222     gswig_result = scm_from_long(gswig_const_NLOPT_GN_MLSL);
2223   }
2224   
2225   return gswig_result;
2226 #undef FUNC_NAME
2227 }
2228
2229
2230 static SCM
2231 _wrap_NLOPT_GD_MLSL(SCM s_0)
2232 {
2233 #define FUNC_NAME "NLOPT-GD-MLSL"
2234   SCM gswig_result;
2235   
2236   {
2237     gswig_result = scm_from_long(gswig_const_NLOPT_GD_MLSL);
2238   }
2239   
2240   return gswig_result;
2241 #undef FUNC_NAME
2242 }
2243
2244
2245 static SCM
2246 _wrap_NLOPT_GN_MLSL_LDS(SCM s_0)
2247 {
2248 #define FUNC_NAME "NLOPT-GN-MLSL-LDS"
2249   SCM gswig_result;
2250   
2251   {
2252     gswig_result = scm_from_long(gswig_const_NLOPT_GN_MLSL_LDS);
2253   }
2254   
2255   return gswig_result;
2256 #undef FUNC_NAME
2257 }
2258
2259
2260 static SCM
2261 _wrap_NLOPT_GD_MLSL_LDS(SCM s_0)
2262 {
2263 #define FUNC_NAME "NLOPT-GD-MLSL-LDS"
2264   SCM gswig_result;
2265   
2266   {
2267     gswig_result = scm_from_long(gswig_const_NLOPT_GD_MLSL_LDS);
2268   }
2269   
2270   return gswig_result;
2271 #undef FUNC_NAME
2272 }
2273
2274
2275 static SCM
2276 _wrap_NLOPT_LD_MMA(SCM s_0)
2277 {
2278 #define FUNC_NAME "NLOPT-LD-MMA"
2279   SCM gswig_result;
2280   
2281   {
2282     gswig_result = scm_from_long(gswig_const_NLOPT_LD_MMA);
2283   }
2284   
2285   return gswig_result;
2286 #undef FUNC_NAME
2287 }
2288
2289
2290 static SCM
2291 _wrap_NLOPT_LN_COBYLA(SCM s_0)
2292 {
2293 #define FUNC_NAME "NLOPT-LN-COBYLA"
2294   SCM gswig_result;
2295   
2296   {
2297     gswig_result = scm_from_long(gswig_const_NLOPT_LN_COBYLA);
2298   }
2299   
2300   return gswig_result;
2301 #undef FUNC_NAME
2302 }
2303
2304
2305 static SCM
2306 _wrap_NLOPT_LN_NEWUOA(SCM s_0)
2307 {
2308 #define FUNC_NAME "NLOPT-LN-NEWUOA"
2309   SCM gswig_result;
2310   
2311   {
2312     gswig_result = scm_from_long(gswig_const_NLOPT_LN_NEWUOA);
2313   }
2314   
2315   return gswig_result;
2316 #undef FUNC_NAME
2317 }
2318
2319
2320 static SCM
2321 _wrap_NLOPT_LN_NEWUOA_BOUND(SCM s_0)
2322 {
2323 #define FUNC_NAME "NLOPT-LN-NEWUOA-BOUND"
2324   SCM gswig_result;
2325   
2326   {
2327     gswig_result = scm_from_long(gswig_const_NLOPT_LN_NEWUOA_BOUND);
2328   }
2329   
2330   return gswig_result;
2331 #undef FUNC_NAME
2332 }
2333
2334
2335 static SCM
2336 _wrap_NLOPT_LN_NELDERMEAD(SCM s_0)
2337 {
2338 #define FUNC_NAME "NLOPT-LN-NELDERMEAD"
2339   SCM gswig_result;
2340   
2341   {
2342     gswig_result = scm_from_long(gswig_const_NLOPT_LN_NELDERMEAD);
2343   }
2344   
2345   return gswig_result;
2346 #undef FUNC_NAME
2347 }
2348
2349
2350 static SCM
2351 _wrap_NLOPT_LN_SBPLX(SCM s_0)
2352 {
2353 #define FUNC_NAME "NLOPT-LN-SBPLX"
2354   SCM gswig_result;
2355   
2356   {
2357     gswig_result = scm_from_long(gswig_const_NLOPT_LN_SBPLX);
2358   }
2359   
2360   return gswig_result;
2361 #undef FUNC_NAME
2362 }
2363
2364
2365 static SCM
2366 _wrap_NLOPT_LN_AUGLAG(SCM s_0)
2367 {
2368 #define FUNC_NAME "NLOPT-LN-AUGLAG"
2369   SCM gswig_result;
2370   
2371   {
2372     gswig_result = scm_from_long(gswig_const_NLOPT_LN_AUGLAG);
2373   }
2374   
2375   return gswig_result;
2376 #undef FUNC_NAME
2377 }
2378
2379
2380 static SCM
2381 _wrap_NLOPT_LD_AUGLAG(SCM s_0)
2382 {
2383 #define FUNC_NAME "NLOPT-LD-AUGLAG"
2384   SCM gswig_result;
2385   
2386   {
2387     gswig_result = scm_from_long(gswig_const_NLOPT_LD_AUGLAG);
2388   }
2389   
2390   return gswig_result;
2391 #undef FUNC_NAME
2392 }
2393
2394
2395 static SCM
2396 _wrap_NLOPT_LN_AUGLAG_EQ(SCM s_0)
2397 {
2398 #define FUNC_NAME "NLOPT-LN-AUGLAG-EQ"
2399   SCM gswig_result;
2400   
2401   {
2402     gswig_result = scm_from_long(gswig_const_NLOPT_LN_AUGLAG_EQ);
2403   }
2404   
2405   return gswig_result;
2406 #undef FUNC_NAME
2407 }
2408
2409
2410 static SCM
2411 _wrap_NLOPT_LD_AUGLAG_EQ(SCM s_0)
2412 {
2413 #define FUNC_NAME "NLOPT-LD-AUGLAG-EQ"
2414   SCM gswig_result;
2415   
2416   {
2417     gswig_result = scm_from_long(gswig_const_NLOPT_LD_AUGLAG_EQ);
2418   }
2419   
2420   return gswig_result;
2421 #undef FUNC_NAME
2422 }
2423
2424
2425 static SCM
2426 _wrap_NLOPT_LN_BOBYQA(SCM s_0)
2427 {
2428 #define FUNC_NAME "NLOPT-LN-BOBYQA"
2429   SCM gswig_result;
2430   
2431   {
2432     gswig_result = scm_from_long(gswig_const_NLOPT_LN_BOBYQA);
2433   }
2434   
2435   return gswig_result;
2436 #undef FUNC_NAME
2437 }
2438
2439
2440 static SCM
2441 _wrap_NLOPT_GN_ISRES(SCM s_0)
2442 {
2443 #define FUNC_NAME "NLOPT-GN-ISRES"
2444   SCM gswig_result;
2445   
2446   {
2447     gswig_result = scm_from_long(gswig_const_NLOPT_GN_ISRES);
2448   }
2449   
2450   return gswig_result;
2451 #undef FUNC_NAME
2452 }
2453
2454
2455 static SCM
2456 _wrap_NLOPT_AUGLAG(SCM s_0)
2457 {
2458 #define FUNC_NAME "NLOPT-AUGLAG"
2459   SCM gswig_result;
2460   
2461   {
2462     gswig_result = scm_from_long(gswig_const_NLOPT_AUGLAG);
2463   }
2464   
2465   return gswig_result;
2466 #undef FUNC_NAME
2467 }
2468
2469
2470 static SCM
2471 _wrap_NLOPT_AUGLAG_EQ(SCM s_0)
2472 {
2473 #define FUNC_NAME "NLOPT-AUGLAG-EQ"
2474   SCM gswig_result;
2475   
2476   {
2477     gswig_result = scm_from_long(gswig_const_NLOPT_AUGLAG_EQ);
2478   }
2479   
2480   return gswig_result;
2481 #undef FUNC_NAME
2482 }
2483
2484
2485 static SCM
2486 _wrap_NLOPT_G_MLSL(SCM s_0)
2487 {
2488 #define FUNC_NAME "NLOPT-G-MLSL"
2489   SCM gswig_result;
2490   
2491   {
2492     gswig_result = scm_from_long(gswig_const_NLOPT_G_MLSL);
2493   }
2494   
2495   return gswig_result;
2496 #undef FUNC_NAME
2497 }
2498
2499
2500 static SCM
2501 _wrap_NLOPT_G_MLSL_LDS(SCM s_0)
2502 {
2503 #define FUNC_NAME "NLOPT-G-MLSL-LDS"
2504   SCM gswig_result;
2505   
2506   {
2507     gswig_result = scm_from_long(gswig_const_NLOPT_G_MLSL_LDS);
2508   }
2509   
2510   return gswig_result;
2511 #undef FUNC_NAME
2512 }
2513
2514
2515 static SCM
2516 _wrap_NLOPT_LD_SLSQP(SCM s_0)
2517 {
2518 #define FUNC_NAME "NLOPT-LD-SLSQP"
2519   SCM gswig_result;
2520   
2521   {
2522     gswig_result = scm_from_long(gswig_const_NLOPT_LD_SLSQP);
2523   }
2524   
2525   return gswig_result;
2526 #undef FUNC_NAME
2527 }
2528
2529
2530 static SCM
2531 _wrap_NLOPT_LD_CCSAQ(SCM s_0)
2532 {
2533 #define FUNC_NAME "NLOPT-LD-CCSAQ"
2534   SCM gswig_result;
2535   
2536   {
2537     gswig_result = scm_from_long(gswig_const_NLOPT_LD_CCSAQ);
2538   }
2539   
2540   return gswig_result;
2541 #undef FUNC_NAME
2542 }
2543
2544
2545 static SCM
2546 _wrap_NLOPT_GN_ESCH(SCM s_0)
2547 {
2548 #define FUNC_NAME "NLOPT-GN-ESCH"
2549   SCM gswig_result;
2550   
2551   {
2552     gswig_result = scm_from_long(gswig_const_NLOPT_GN_ESCH);
2553   }
2554   
2555   return gswig_result;
2556 #undef FUNC_NAME
2557 }
2558
2559
2560 static SCM
2561 _wrap_NLOPT_NUM_ALGORITHMS(SCM s_0)
2562 {
2563 #define FUNC_NAME "NLOPT-NUM-ALGORITHMS"
2564   SCM gswig_result;
2565   
2566   {
2567     gswig_result = scm_from_long(gswig_const_NLOPT_NUM_ALGORITHMS);
2568   }
2569   
2570   return gswig_result;
2571 #undef FUNC_NAME
2572 }
2573
2574
2575 static SCM
2576 _wrap_NLOPT_FAILURE(SCM s_0)
2577 {
2578 #define FUNC_NAME "NLOPT-FAILURE"
2579   SCM gswig_result;
2580   
2581   {
2582     gswig_result = scm_from_long(gswig_const_NLOPT_FAILURE);
2583   }
2584   
2585   return gswig_result;
2586 #undef FUNC_NAME
2587 }
2588
2589
2590 static SCM
2591 _wrap_NLOPT_INVALID_ARGS(SCM s_0)
2592 {
2593 #define FUNC_NAME "NLOPT-INVALID-ARGS"
2594   SCM gswig_result;
2595   
2596   {
2597     gswig_result = scm_from_long(gswig_const_NLOPT_INVALID_ARGS);
2598   }
2599   
2600   return gswig_result;
2601 #undef FUNC_NAME
2602 }
2603
2604
2605 static SCM
2606 _wrap_NLOPT_OUT_OF_MEMORY(SCM s_0)
2607 {
2608 #define FUNC_NAME "NLOPT-OUT-OF-MEMORY"
2609   SCM gswig_result;
2610   
2611   {
2612     gswig_result = scm_from_long(gswig_const_NLOPT_OUT_OF_MEMORY);
2613   }
2614   
2615   return gswig_result;
2616 #undef FUNC_NAME
2617 }
2618
2619
2620 static SCM
2621 _wrap_NLOPT_ROUNDOFF_LIMITED(SCM s_0)
2622 {
2623 #define FUNC_NAME "NLOPT-ROUNDOFF-LIMITED"
2624   SCM gswig_result;
2625   
2626   {
2627     gswig_result = scm_from_long(gswig_const_NLOPT_ROUNDOFF_LIMITED);
2628   }
2629   
2630   return gswig_result;
2631 #undef FUNC_NAME
2632 }
2633
2634
2635 static SCM
2636 _wrap_NLOPT_FORCED_STOP(SCM s_0)
2637 {
2638 #define FUNC_NAME "NLOPT-FORCED-STOP"
2639   SCM gswig_result;
2640   
2641   {
2642     gswig_result = scm_from_long(gswig_const_NLOPT_FORCED_STOP);
2643   }
2644   
2645   return gswig_result;
2646 #undef FUNC_NAME
2647 }
2648
2649
2650 static SCM
2651 _wrap_NLOPT_SUCCESS(SCM s_0)
2652 {
2653 #define FUNC_NAME "NLOPT-SUCCESS"
2654   SCM gswig_result;
2655   
2656   {
2657     gswig_result = scm_from_long(gswig_const_NLOPT_SUCCESS);
2658   }
2659   
2660   return gswig_result;
2661 #undef FUNC_NAME
2662 }
2663
2664
2665 static SCM
2666 _wrap_NLOPT_STOPVAL_REACHED(SCM s_0)
2667 {
2668 #define FUNC_NAME "NLOPT-STOPVAL-REACHED"
2669   SCM gswig_result;
2670   
2671   {
2672     gswig_result = scm_from_long(gswig_const_NLOPT_STOPVAL_REACHED);
2673   }
2674   
2675   return gswig_result;
2676 #undef FUNC_NAME
2677 }
2678
2679
2680 static SCM
2681 _wrap_NLOPT_FTOL_REACHED(SCM s_0)
2682 {
2683 #define FUNC_NAME "NLOPT-FTOL-REACHED"
2684   SCM gswig_result;
2685   
2686   {
2687     gswig_result = scm_from_long(gswig_const_NLOPT_FTOL_REACHED);
2688   }
2689   
2690   return gswig_result;
2691 #undef FUNC_NAME
2692 }
2693
2694
2695 static SCM
2696 _wrap_NLOPT_XTOL_REACHED(SCM s_0)
2697 {
2698 #define FUNC_NAME "NLOPT-XTOL-REACHED"
2699   SCM gswig_result;
2700   
2701   {
2702     gswig_result = scm_from_long(gswig_const_NLOPT_XTOL_REACHED);
2703   }
2704   
2705   return gswig_result;
2706 #undef FUNC_NAME
2707 }
2708
2709
2710 static SCM
2711 _wrap_NLOPT_MAXEVAL_REACHED(SCM s_0)
2712 {
2713 #define FUNC_NAME "NLOPT-MAXEVAL-REACHED"
2714   SCM gswig_result;
2715   
2716   {
2717     gswig_result = scm_from_long(gswig_const_NLOPT_MAXEVAL_REACHED);
2718   }
2719   
2720   return gswig_result;
2721 #undef FUNC_NAME
2722 }
2723
2724
2725 static SCM
2726 _wrap_NLOPT_MAXTIME_REACHED(SCM s_0)
2727 {
2728 #define FUNC_NAME "NLOPT-MAXTIME-REACHED"
2729   SCM gswig_result;
2730   
2731   {
2732     gswig_result = scm_from_long(gswig_const_NLOPT_MAXTIME_REACHED);
2733   }
2734   
2735   return gswig_result;
2736 #undef FUNC_NAME
2737 }
2738
2739
2740 static SCM
2741 _wrap_new_nlopt_roundoff_limited ()
2742 {
2743 #define FUNC_NAME "new-nlopt-roundoff-limited"
2744   SCM gswig_result;
2745   SWIGUNUSED int gswig_list_p = 0;
2746   nlopt::roundoff_limited *result = 0 ;
2747   
2748   result = (nlopt::roundoff_limited *)new nlopt::roundoff_limited();
2749   {
2750     gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__roundoff_limited, 1);
2751   }
2752   
2753   return gswig_result;
2754 #undef FUNC_NAME
2755 }
2756
2757
2758 static SCM
2759 _wrap_delete_nlopt_roundoff_limited (SCM s_0)
2760 {
2761 #define FUNC_NAME "delete-nlopt-roundoff-limited"
2762   nlopt::roundoff_limited *arg1 = (nlopt::roundoff_limited *) 0 ;
2763   SCM gswig_result;
2764   SWIGUNUSED int gswig_list_p = 0;
2765   
2766   {
2767     arg1 = (nlopt::roundoff_limited *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__roundoff_limited, 1, 0);
2768   }
2769   delete arg1;
2770   gswig_result = SCM_UNSPECIFIED;
2771   
2772   SWIG_Guile_MarkPointerDestroyed(s_0);
2773   
2774   return gswig_result;
2775 #undef FUNC_NAME
2776 }
2777
2778
2779 static SCM
2780 _wrap_new_nlopt_forced_stop ()
2781 {
2782 #define FUNC_NAME "new-nlopt-forced-stop"
2783   SCM gswig_result;
2784   SWIGUNUSED int gswig_list_p = 0;
2785   nlopt::forced_stop *result = 0 ;
2786   
2787   result = (nlopt::forced_stop *)new nlopt::forced_stop();
2788   {
2789     gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__forced_stop, 1);
2790   }
2791   
2792   return gswig_result;
2793 #undef FUNC_NAME
2794 }
2795
2796
2797 static SCM
2798 _wrap_delete_nlopt_forced_stop (SCM s_0)
2799 {
2800 #define FUNC_NAME "delete-nlopt-forced-stop"
2801   nlopt::forced_stop *arg1 = (nlopt::forced_stop *) 0 ;
2802   SCM gswig_result;
2803   SWIGUNUSED int gswig_list_p = 0;
2804   
2805   {
2806     arg1 = (nlopt::forced_stop *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__forced_stop, 1, 0);
2807   }
2808   delete arg1;
2809   gswig_result = SCM_UNSPECIFIED;
2810   
2811   SWIG_Guile_MarkPointerDestroyed(s_0);
2812   
2813   return gswig_result;
2814 #undef FUNC_NAME
2815 }
2816
2817
2818 static SCM
2819 _wrap_new_nlopt_opt__SWIG_0 (int argc, SCM *argv)
2820 {
2821 #define FUNC_NAME "new-nlopt-opt"
2822   SCM gswig_result;
2823   SWIGUNUSED int gswig_list_p = 0;
2824   nlopt::opt *result = 0 ;
2825   
2826   try {
2827     result = (nlopt::opt *)new nlopt::opt();
2828   }
2829   catch(std::bad_alloc &_e) {
2830     scm_throw(gh_symbol2scm("bad-alloc"), 
2831       scm_list_1(scm_from_locale_string((_e).what())));
2832     
2833   }
2834   
2835   {
2836     gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__opt, 1);
2837   }
2838   
2839   return gswig_result;
2840 #undef FUNC_NAME
2841 }
2842
2843
2844 static SCM
2845 _wrap_delete_nlopt_opt (SCM s_0)
2846 {
2847 #define FUNC_NAME "delete-nlopt-opt"
2848   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
2849   SCM gswig_result;
2850   SWIGUNUSED int gswig_list_p = 0;
2851   
2852   {
2853     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
2854   }
2855   delete arg1;
2856   gswig_result = SCM_UNSPECIFIED;
2857   
2858   SWIG_Guile_MarkPointerDestroyed(s_0);
2859   
2860   return gswig_result;
2861 #undef FUNC_NAME
2862 }
2863
2864
2865 static SCM
2866 _wrap_new_nlopt_opt__SWIG_1 (int argc, SCM *argv)
2867 {
2868 #define FUNC_NAME "new-nlopt-opt"
2869   nlopt::algorithm arg1 ;
2870   unsigned int arg2 ;
2871   SCM gswig_result;
2872   SWIGUNUSED int gswig_list_p = 0;
2873   nlopt::opt *result = 0 ;
2874   
2875   {
2876     arg1 = (nlopt::algorithm) scm_to_int(argv[0]); 
2877   }
2878   {
2879     arg2 = (unsigned int) scm_to_uint(argv[1]);
2880   }
2881   try {
2882     result = (nlopt::opt *)new nlopt::opt(arg1,arg2);
2883   }
2884   catch(std::bad_alloc &_e) {
2885     scm_throw(gh_symbol2scm("bad-alloc"), 
2886       scm_list_1(scm_from_locale_string((_e).what())));
2887     
2888   }
2889   
2890   {
2891     gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__opt, 1);
2892   }
2893   
2894   return gswig_result;
2895 #undef FUNC_NAME
2896 }
2897
2898
2899 static SCM
2900 _wrap_new_nlopt_opt__SWIG_2 (int argc, SCM *argv)
2901 {
2902 #define FUNC_NAME "new-nlopt-opt"
2903   nlopt::opt *arg1 = 0 ;
2904   SCM gswig_result;
2905   SWIGUNUSED int gswig_list_p = 0;
2906   nlopt::opt *result = 0 ;
2907   
2908   {
2909     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
2910   }
2911   try {
2912     result = (nlopt::opt *)new nlopt::opt((nlopt::opt const &)*arg1);
2913   }
2914   catch(std::bad_alloc &_e) {
2915     scm_throw(gh_symbol2scm("bad-alloc"), 
2916       scm_list_1(scm_from_locale_string((_e).what())));
2917     
2918   }
2919   
2920   {
2921     gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__opt, 1);
2922   }
2923   
2924   
2925   return gswig_result;
2926 #undef FUNC_NAME
2927 }
2928
2929
2930 static SCM
2931 _wrap_new_nlopt_opt(SCM rest)
2932 {
2933 #define FUNC_NAME "new-nlopt-opt"
2934   SCM argv[2];
2935   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "new-nlopt-opt");
2936   if (argc == 0) {
2937     return _wrap_new_nlopt_opt__SWIG_0(argc,argv);
2938   }
2939   if (argc == 1) {
2940     int _v;
2941     {
2942       void *ptr;
2943       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
2944       _v = SWIG_CheckState(res);
2945     }
2946     if (_v) {
2947       return _wrap_new_nlopt_opt__SWIG_2(argc,argv);
2948     }
2949   }
2950   if (argc == 2) {
2951     int _v;
2952     {
2953       _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0;
2954     }
2955     if (_v) {
2956       {
2957         _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0;
2958       }
2959       if (_v) {
2960         return _wrap_new_nlopt_opt__SWIG_1(argc,argv);
2961       }
2962     }
2963   }
2964   
2965   scm_misc_error("new-nlopt-opt", "No matching method for generic function `new_nlopt_opt'", SCM_EOL);
2966 #undef FUNC_NAME
2967 }
2968
2969
2970 static SCM
2971 _wrap_nlopt_opt_optimize__SWIG_0 (int argc, SCM *argv)
2972 {
2973 #define FUNC_NAME "nlopt-opt-optimize"
2974   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
2975   std::vector< double > *arg2 = 0 ;
2976   double *arg3 = 0 ;
2977   SCM gswig_result;
2978   SWIGUNUSED int gswig_list_p = 0;
2979   nlopt::result result;
2980   
2981   {
2982     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
2983   }
2984   {
2985     arg2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
2986   }
2987   {
2988     arg3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0);
2989   }
2990   try {
2991     result = (nlopt::result)(arg1)->optimize(*arg2,*arg3);
2992   }
2993   catch(nlopt::roundoff_limited &_e) {
2994     scm_throw(gh_symbol2scm("roundoff-limited"), SCM_EOL);
2995     
2996   }
2997   catch(nlopt::forced_stop &_e) {
2998     scm_throw(gh_symbol2scm("forced-stop"), SCM_EOL);
2999     
3000   }
3001   catch(std::runtime_error &_e) {
3002     scm_throw(gh_symbol2scm("runtime-error"), 
3003       scm_list_1(scm_from_locale_string((_e).what())));
3004     
3005   }
3006   catch(std::bad_alloc &_e) {
3007     scm_throw(gh_symbol2scm("bad-alloc"), 
3008       scm_list_1(scm_from_locale_string((_e).what())));
3009     
3010   }
3011   catch(std::invalid_argument &_e) {
3012     scm_throw(gh_symbol2scm("invalid-argument"), 
3013       scm_list_1(scm_from_locale_string((_e).what())));
3014     
3015   }
3016   
3017   {
3018     gswig_result = scm_from_long(result); 
3019   }
3020   
3021   
3022   
3023   
3024   return gswig_result;
3025 #undef FUNC_NAME
3026 }
3027
3028
3029 static SCM
3030 _wrap_nlopt_opt_optimize__SWIG_1 (int argc, SCM *argv)
3031 {
3032 #define FUNC_NAME "nlopt-opt-optimize"
3033   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3034   std::vector< double > *arg2 = 0 ;
3035   std::vector< double > temp2 ;
3036   SCM gswig_result;
3037   SWIGUNUSED int gswig_list_p = 0;
3038   std::vector< double > result;
3039   
3040   {
3041     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3042   }
3043   {
3044     if (scm_is_vector(argv[1])) {
3045       unsigned long size = scm_c_vector_length(argv[1]);
3046       temp2 = std::vector<double >(size);
3047       arg2 = &temp2;
3048       for (unsigned long i=0; i<size; i++) {
3049         SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
3050         if (scm_is_number(o))
3051         temp2[i] = (double)(scm_to_double(o));
3052         else
3053         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
3054       }
3055     } else if (scm_is_null(argv[1])) {
3056       temp2 = std::vector<double >();
3057       arg2 = &temp2;
3058     } else if (scm_is_pair(argv[1])) {
3059       SCM v = scm_vector(argv[1]);
3060       unsigned long size = scm_c_vector_length(v);
3061       temp2 = std::vector<double >(size);
3062       arg2 = &temp2;
3063       for (unsigned long i=0; i<size; i++) {
3064         SCM o = scm_vector_ref(v,scm_from_ulong(i));
3065         if (scm_is_number(o))
3066         temp2[i] = (double)(scm_to_double(o));
3067         else
3068         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
3069       }
3070     } else {
3071       arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
3072     }
3073   }
3074   try {
3075     result = (arg1)->optimize((std::vector< double > const &)*arg2);
3076   }
3077   catch(nlopt::roundoff_limited &_e) {
3078     scm_throw(gh_symbol2scm("roundoff-limited"), SCM_EOL);
3079     
3080   }
3081   catch(nlopt::forced_stop &_e) {
3082     scm_throw(gh_symbol2scm("forced-stop"), SCM_EOL);
3083     
3084   }
3085   catch(std::runtime_error &_e) {
3086     scm_throw(gh_symbol2scm("runtime-error"), 
3087       scm_list_1(scm_from_locale_string((_e).what())));
3088     
3089   }
3090   catch(std::bad_alloc &_e) {
3091     scm_throw(gh_symbol2scm("bad-alloc"), 
3092       scm_list_1(scm_from_locale_string((_e).what())));
3093     
3094   }
3095   catch(std::invalid_argument &_e) {
3096     scm_throw(gh_symbol2scm("invalid-argument"), 
3097       scm_list_1(scm_from_locale_string((_e).what())));
3098     
3099   }
3100   
3101   {
3102     gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
3103     for (unsigned int i=0; i<(&result)->size(); i++) {
3104       SCM x = scm_from_double(((std::vector< double > &)result)[i]);
3105       scm_vector_set_x(gswig_result,scm_from_long(i),x);
3106     }
3107   }
3108   
3109   
3110   
3111   return gswig_result;
3112 #undef FUNC_NAME
3113 }
3114
3115
3116 static SCM
3117 _wrap_nlopt_opt_optimize(SCM rest)
3118 {
3119 #define FUNC_NAME "nlopt-opt-optimize"
3120   SCM argv[3];
3121   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "nlopt-opt-optimize");
3122   if (argc == 2) {
3123     int _v;
3124     {
3125       void *ptr;
3126       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
3127       _v = SWIG_CheckState(res);
3128     }
3129     if (_v) {
3130       {
3131         /* native sequence? */
3132         if (scm_is_vector(argv[1])) {
3133           unsigned int size = scm_c_vector_length(argv[1]);
3134           if (size == 0) {
3135             /* an empty sequence can be of any type */
3136             _v = 1;
3137           } else {
3138             /* check the first element only */
3139             double* x;
3140             SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
3141             _v = scm_is_number(o) ? 1 : 0;
3142           }
3143         } else if (scm_is_null(argv[1])) {
3144           /* again, an empty sequence can be of any type */
3145           _v = 1;
3146         } else if (scm_is_pair(argv[1])) {
3147           /* check the first element only */
3148           double* x;
3149           SCM head = SCM_CAR(argv[1]);
3150           _v = scm_is_number(head) ? 1 : 0;
3151         } else {
3152           /* wrapped vector? */
3153           std::vector<double >* v;
3154           _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
3155               SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
3156         }
3157       }
3158       if (_v) {
3159         return _wrap_nlopt_opt_optimize__SWIG_1(argc,argv);
3160       }
3161     }
3162   }
3163   if (argc == 3) {
3164     int _v;
3165     {
3166       void *ptr;
3167       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
3168       _v = SWIG_CheckState(res);
3169     }
3170     if (_v) {
3171       {
3172         void *ptr;
3173         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, 0);
3174         _v = SWIG_CheckState(res);
3175       }
3176       if (_v) {
3177         {
3178           void *ptr;
3179           int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, 0);
3180           _v = SWIG_CheckState(res);
3181         }
3182         if (_v) {
3183           return _wrap_nlopt_opt_optimize__SWIG_0(argc,argv);
3184         }
3185       }
3186     }
3187   }
3188   
3189   scm_misc_error("nlopt-opt-optimize", "No matching method for generic function `nlopt_opt_optimize'", SCM_EOL);
3190 #undef FUNC_NAME
3191 }
3192
3193
3194 static SCM
3195 _wrap_nlopt_opt_last_optimize_result (SCM s_0)
3196 {
3197 #define FUNC_NAME "nlopt-opt-last-optimize-result"
3198   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3199   SCM gswig_result;
3200   SWIGUNUSED int gswig_list_p = 0;
3201   nlopt::result result;
3202   
3203   {
3204     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
3205   }
3206   result = (nlopt::result)((nlopt::opt const *)arg1)->last_optimize_result();
3207   {
3208     gswig_result = scm_from_long(result); 
3209   }
3210   
3211   
3212   return gswig_result;
3213 #undef FUNC_NAME
3214 }
3215
3216
3217 static SCM
3218 _wrap_nlopt_opt_last_optimum_value (SCM s_0)
3219 {
3220 #define FUNC_NAME "nlopt-opt-last-optimum-value"
3221   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3222   SCM gswig_result;
3223   SWIGUNUSED int gswig_list_p = 0;
3224   double result;
3225   
3226   {
3227     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
3228   }
3229   result = (double)((nlopt::opt const *)arg1)->last_optimum_value();
3230   {
3231     gswig_result = scm_from_double(result);
3232   }
3233   
3234   
3235   return gswig_result;
3236 #undef FUNC_NAME
3237 }
3238
3239
3240 static SCM
3241 _wrap_nlopt_opt_get_algorithm (SCM s_0)
3242 {
3243 #define FUNC_NAME "nlopt-opt-get-algorithm"
3244   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3245   SCM gswig_result;
3246   SWIGUNUSED int gswig_list_p = 0;
3247   nlopt::algorithm result;
3248   
3249   {
3250     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
3251   }
3252   result = (nlopt::algorithm)((nlopt::opt const *)arg1)->get_algorithm();
3253   {
3254     gswig_result = scm_from_long(result); 
3255   }
3256   
3257   
3258   return gswig_result;
3259 #undef FUNC_NAME
3260 }
3261
3262
3263 static SCM
3264 _wrap_nlopt_opt_get_algorithm_name (SCM s_0)
3265 {
3266 #define FUNC_NAME "nlopt-opt-get-algorithm-name"
3267   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3268   SCM gswig_result;
3269   SWIGUNUSED int gswig_list_p = 0;
3270   char *result = 0 ;
3271   
3272   {
3273     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
3274   }
3275   result = (char *)((nlopt::opt const *)arg1)->get_algorithm_name();
3276   {
3277     gswig_result = SWIG_str02scm((const char *)result);
3278   }
3279   
3280   
3281   return gswig_result;
3282 #undef FUNC_NAME
3283 }
3284
3285
3286 static SCM
3287 _wrap_nlopt_opt_get_dimension (SCM s_0)
3288 {
3289 #define FUNC_NAME "nlopt-opt-get-dimension"
3290   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3291   SCM gswig_result;
3292   SWIGUNUSED int gswig_list_p = 0;
3293   unsigned int result;
3294   
3295   {
3296     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
3297   }
3298   result = (unsigned int)((nlopt::opt const *)arg1)->get_dimension();
3299   {
3300     gswig_result = scm_from_ulong(result);
3301   }
3302   
3303   
3304   return gswig_result;
3305 #undef FUNC_NAME
3306 }
3307
3308
3309 static SCM
3310 _wrap_nlopt_opt_set_min_objective__SWIG_0 (int argc, SCM *argv)
3311 {
3312 #define FUNC_NAME "nlopt-opt-set-min-objective"
3313   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3314   nlopt::func arg2 ;
3315   void *arg3 = (void *) 0 ;
3316   nlopt::func *argp2 ;
3317   SCM gswig_result;
3318   SWIGUNUSED int gswig_list_p = 0;
3319   
3320   {
3321     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3322   }
3323   {
3324     argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
3325     arg2 = *argp2;
3326   }
3327   {
3328     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
3329   }
3330   try {
3331     (arg1)->set_min_objective(arg2,arg3);
3332   }
3333   catch(std::bad_alloc &_e) {
3334     scm_throw(gh_symbol2scm("bad-alloc"), 
3335       scm_list_1(scm_from_locale_string((_e).what())));
3336     
3337   }
3338   catch(std::invalid_argument &_e) {
3339     scm_throw(gh_symbol2scm("invalid-argument"), 
3340       scm_list_1(scm_from_locale_string((_e).what())));
3341     
3342   }
3343   
3344   gswig_result = SCM_UNSPECIFIED;
3345   
3346   
3347   
3348   return gswig_result;
3349 #undef FUNC_NAME
3350 }
3351
3352
3353 static SCM
3354 _wrap_nlopt_opt_set_min_objective__SWIG_1 (int argc, SCM *argv)
3355 {
3356 #define FUNC_NAME "nlopt-opt-set-min-objective"
3357   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3358   nlopt::vfunc arg2 = (nlopt::vfunc) 0 ;
3359   void *arg3 = (void *) 0 ;
3360   SCM gswig_result;
3361   SWIGUNUSED int gswig_list_p = 0;
3362   
3363   {
3364     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3365   }
3366   {
3367     arg2 = (nlopt::vfunc)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 2, 0);
3368   }
3369   {
3370     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
3371   }
3372   try {
3373     (arg1)->set_min_objective(arg2,arg3);
3374   }
3375   catch(std::bad_alloc &_e) {
3376     scm_throw(gh_symbol2scm("bad-alloc"), 
3377       scm_list_1(scm_from_locale_string((_e).what())));
3378     
3379   }
3380   catch(std::invalid_argument &_e) {
3381     scm_throw(gh_symbol2scm("invalid-argument"), 
3382       scm_list_1(scm_from_locale_string((_e).what())));
3383     
3384   }
3385   
3386   gswig_result = SCM_UNSPECIFIED;
3387   
3388   
3389   
3390   
3391   return gswig_result;
3392 #undef FUNC_NAME
3393 }
3394
3395
3396 static SCM
3397 _wrap_nlopt_opt_set_max_objective__SWIG_0 (int argc, SCM *argv)
3398 {
3399 #define FUNC_NAME "nlopt-opt-set-max-objective"
3400   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3401   nlopt::func arg2 ;
3402   void *arg3 = (void *) 0 ;
3403   nlopt::func *argp2 ;
3404   SCM gswig_result;
3405   SWIGUNUSED int gswig_list_p = 0;
3406   
3407   {
3408     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3409   }
3410   {
3411     argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
3412     arg2 = *argp2;
3413   }
3414   {
3415     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
3416   }
3417   try {
3418     (arg1)->set_max_objective(arg2,arg3);
3419   }
3420   catch(std::bad_alloc &_e) {
3421     scm_throw(gh_symbol2scm("bad-alloc"), 
3422       scm_list_1(scm_from_locale_string((_e).what())));
3423     
3424   }
3425   catch(std::invalid_argument &_e) {
3426     scm_throw(gh_symbol2scm("invalid-argument"), 
3427       scm_list_1(scm_from_locale_string((_e).what())));
3428     
3429   }
3430   
3431   gswig_result = SCM_UNSPECIFIED;
3432   
3433   
3434   
3435   return gswig_result;
3436 #undef FUNC_NAME
3437 }
3438
3439
3440 static SCM
3441 _wrap_nlopt_opt_set_max_objective__SWIG_1 (int argc, SCM *argv)
3442 {
3443 #define FUNC_NAME "nlopt-opt-set-max-objective"
3444   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3445   nlopt::vfunc arg2 = (nlopt::vfunc) 0 ;
3446   void *arg3 = (void *) 0 ;
3447   SCM gswig_result;
3448   SWIGUNUSED int gswig_list_p = 0;
3449   
3450   {
3451     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3452   }
3453   {
3454     arg2 = (nlopt::vfunc)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 2, 0);
3455   }
3456   {
3457     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
3458   }
3459   try {
3460     (arg1)->set_max_objective(arg2,arg3);
3461   }
3462   catch(std::bad_alloc &_e) {
3463     scm_throw(gh_symbol2scm("bad-alloc"), 
3464       scm_list_1(scm_from_locale_string((_e).what())));
3465     
3466   }
3467   catch(std::invalid_argument &_e) {
3468     scm_throw(gh_symbol2scm("invalid-argument"), 
3469       scm_list_1(scm_from_locale_string((_e).what())));
3470     
3471   }
3472   
3473   gswig_result = SCM_UNSPECIFIED;
3474   
3475   
3476   
3477   
3478   return gswig_result;
3479 #undef FUNC_NAME
3480 }
3481
3482
3483 static SCM
3484 _wrap_nlopt_opt_set_min_objective__SWIG_2 (int argc, SCM *argv)
3485 {
3486 #define FUNC_NAME "nlopt-opt-set-min-objective"
3487   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3488   nlopt::func arg2 ;
3489   void *arg3 = (void *) 0 ;
3490   nlopt_munge arg4 ;
3491   nlopt_munge arg5 ;
3492   SCM gswig_result;
3493   SWIGUNUSED int gswig_list_p = 0;
3494   
3495   {
3496     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3497   }
3498   {
3499     arg2 = func_guile;
3500     arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
3501     arg4 = free_guilefunc;
3502     arg5 = dup_guilefunc;
3503   }
3504   try {
3505     (arg1)->set_min_objective(arg2,arg3,arg4,arg5);
3506   }
3507   catch(std::bad_alloc &_e) {
3508     scm_throw(gh_symbol2scm("bad-alloc"), 
3509       scm_list_1(scm_from_locale_string((_e).what())));
3510     
3511   }
3512   catch(std::invalid_argument &_e) {
3513     scm_throw(gh_symbol2scm("invalid-argument"), 
3514       scm_list_1(scm_from_locale_string((_e).what())));
3515     
3516   }
3517   
3518   gswig_result = SCM_UNSPECIFIED;
3519   
3520   
3521   
3522   return gswig_result;
3523 #undef FUNC_NAME
3524 }
3525
3526
3527 static SCM
3528 _wrap_nlopt_opt_set_min_objective(SCM rest)
3529 {
3530 #define FUNC_NAME "nlopt-opt-set-min-objective"
3531   SCM argv[3];
3532   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "nlopt-opt-set-min-objective");
3533   if (argc == 2) {
3534     int _v;
3535     {
3536       void *ptr;
3537       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
3538       _v = SWIG_CheckState(res);
3539     }
3540     if (_v) {
3541       {
3542         _v = SCM_NFALSEP(scm_procedure_p(argv[1]));
3543       }
3544       if (_v) {
3545         if (argc <= 2) {
3546           return _wrap_nlopt_opt_set_min_objective__SWIG_2(argc,argv);
3547         }
3548         if (argc <= 3) {
3549           return _wrap_nlopt_opt_set_min_objective__SWIG_2(argc,argv);
3550         }
3551         if (argc <= 4) {
3552           return _wrap_nlopt_opt_set_min_objective__SWIG_2(argc,argv);
3553         }
3554         return _wrap_nlopt_opt_set_min_objective__SWIG_2(argc,argv);
3555       }
3556     }
3557   }
3558   if (argc == 3) {
3559     int _v;
3560     {
3561       void *ptr;
3562       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
3563       _v = SWIG_CheckState(res);
3564     }
3565     if (_v) {
3566       {
3567         void *ptr;
3568         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
3569         _v = SWIG_CheckState(res);
3570       }
3571       if (_v) {
3572         {
3573           void *ptr;
3574           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
3575           _v = SWIG_CheckState(res);
3576         }
3577         if (_v) {
3578           return _wrap_nlopt_opt_set_min_objective__SWIG_1(argc,argv);
3579         }
3580       }
3581     }
3582   }
3583   if (argc == 3) {
3584     int _v;
3585     {
3586       void *ptr;
3587       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
3588       _v = SWIG_CheckState(res);
3589     }
3590     if (_v) {
3591       {
3592         void *ptr;
3593         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, 0);
3594         _v = SWIG_CheckState(res);
3595       }
3596       if (_v) {
3597         {
3598           void *ptr;
3599           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
3600           _v = SWIG_CheckState(res);
3601         }
3602         if (_v) {
3603           return _wrap_nlopt_opt_set_min_objective__SWIG_0(argc,argv);
3604         }
3605       }
3606     }
3607   }
3608   
3609   scm_misc_error("nlopt-opt-set-min-objective", "No matching method for generic function `nlopt_opt_set_min_objective'", SCM_EOL);
3610 #undef FUNC_NAME
3611 }
3612
3613
3614 static SCM
3615 _wrap_nlopt_opt_set_max_objective__SWIG_2 (int argc, SCM *argv)
3616 {
3617 #define FUNC_NAME "nlopt-opt-set-max-objective"
3618   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3619   nlopt::func arg2 ;
3620   void *arg3 = (void *) 0 ;
3621   nlopt_munge arg4 ;
3622   nlopt_munge arg5 ;
3623   SCM gswig_result;
3624   SWIGUNUSED int gswig_list_p = 0;
3625   
3626   {
3627     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3628   }
3629   {
3630     arg2 = func_guile;
3631     arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
3632     arg4 = free_guilefunc;
3633     arg5 = dup_guilefunc;
3634   }
3635   try {
3636     (arg1)->set_max_objective(arg2,arg3,arg4,arg5);
3637   }
3638   catch(std::bad_alloc &_e) {
3639     scm_throw(gh_symbol2scm("bad-alloc"), 
3640       scm_list_1(scm_from_locale_string((_e).what())));
3641     
3642   }
3643   catch(std::invalid_argument &_e) {
3644     scm_throw(gh_symbol2scm("invalid-argument"), 
3645       scm_list_1(scm_from_locale_string((_e).what())));
3646     
3647   }
3648   
3649   gswig_result = SCM_UNSPECIFIED;
3650   
3651   
3652   
3653   return gswig_result;
3654 #undef FUNC_NAME
3655 }
3656
3657
3658 static SCM
3659 _wrap_nlopt_opt_set_max_objective(SCM rest)
3660 {
3661 #define FUNC_NAME "nlopt-opt-set-max-objective"
3662   SCM argv[3];
3663   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "nlopt-opt-set-max-objective");
3664   if (argc == 2) {
3665     int _v;
3666     {
3667       void *ptr;
3668       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
3669       _v = SWIG_CheckState(res);
3670     }
3671     if (_v) {
3672       {
3673         _v = SCM_NFALSEP(scm_procedure_p(argv[1]));
3674       }
3675       if (_v) {
3676         if (argc <= 2) {
3677           return _wrap_nlopt_opt_set_max_objective__SWIG_2(argc,argv);
3678         }
3679         if (argc <= 3) {
3680           return _wrap_nlopt_opt_set_max_objective__SWIG_2(argc,argv);
3681         }
3682         if (argc <= 4) {
3683           return _wrap_nlopt_opt_set_max_objective__SWIG_2(argc,argv);
3684         }
3685         return _wrap_nlopt_opt_set_max_objective__SWIG_2(argc,argv);
3686       }
3687     }
3688   }
3689   if (argc == 3) {
3690     int _v;
3691     {
3692       void *ptr;
3693       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
3694       _v = SWIG_CheckState(res);
3695     }
3696     if (_v) {
3697       {
3698         void *ptr;
3699         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
3700         _v = SWIG_CheckState(res);
3701       }
3702       if (_v) {
3703         {
3704           void *ptr;
3705           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
3706           _v = SWIG_CheckState(res);
3707         }
3708         if (_v) {
3709           return _wrap_nlopt_opt_set_max_objective__SWIG_1(argc,argv);
3710         }
3711       }
3712     }
3713   }
3714   if (argc == 3) {
3715     int _v;
3716     {
3717       void *ptr;
3718       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
3719       _v = SWIG_CheckState(res);
3720     }
3721     if (_v) {
3722       {
3723         void *ptr;
3724         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, 0);
3725         _v = SWIG_CheckState(res);
3726       }
3727       if (_v) {
3728         {
3729           void *ptr;
3730           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
3731           _v = SWIG_CheckState(res);
3732         }
3733         if (_v) {
3734           return _wrap_nlopt_opt_set_max_objective__SWIG_0(argc,argv);
3735         }
3736       }
3737     }
3738   }
3739   
3740   scm_misc_error("nlopt-opt-set-max-objective", "No matching method for generic function `nlopt_opt_set_max_objective'", SCM_EOL);
3741 #undef FUNC_NAME
3742 }
3743
3744
3745 static SCM
3746 _wrap_nlopt_opt_remove_inequality_constraints (SCM s_0)
3747 {
3748 #define FUNC_NAME "nlopt-opt-remove-inequality-constraints"
3749   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3750   SCM gswig_result;
3751   SWIGUNUSED int gswig_list_p = 0;
3752   
3753   {
3754     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
3755   }
3756   try {
3757     (arg1)->remove_inequality_constraints();
3758   }
3759   catch(std::invalid_argument &_e) {
3760     scm_throw(gh_symbol2scm("invalid-argument"), 
3761       scm_list_1(scm_from_locale_string((_e).what())));
3762     
3763   }
3764   
3765   gswig_result = SCM_UNSPECIFIED;
3766   
3767   
3768   return gswig_result;
3769 #undef FUNC_NAME
3770 }
3771
3772
3773 static SCM
3774 _wrap_nlopt_opt_add_inequality_constraint__SWIG_0 (int argc, SCM *argv)
3775 {
3776 #define FUNC_NAME "nlopt-opt-add-inequality-constraint"
3777   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3778   nlopt::func arg2 ;
3779   void *arg3 = (void *) 0 ;
3780   double arg4 ;
3781   nlopt::func *argp2 ;
3782   SCM gswig_result;
3783   SWIGUNUSED int gswig_list_p = 0;
3784   
3785   {
3786     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3787   }
3788   {
3789     argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
3790     arg2 = *argp2;
3791   }
3792   {
3793     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
3794   }
3795   {
3796     arg4 = (double) scm_to_double(argv[3]);
3797   }
3798   try {
3799     (arg1)->add_inequality_constraint(arg2,arg3,arg4);
3800   }
3801   catch(std::bad_alloc &_e) {
3802     scm_throw(gh_symbol2scm("bad-alloc"), 
3803       scm_list_1(scm_from_locale_string((_e).what())));
3804     
3805   }
3806   catch(std::invalid_argument &_e) {
3807     scm_throw(gh_symbol2scm("invalid-argument"), 
3808       scm_list_1(scm_from_locale_string((_e).what())));
3809     
3810   }
3811   
3812   gswig_result = SCM_UNSPECIFIED;
3813   
3814   
3815   
3816   return gswig_result;
3817 #undef FUNC_NAME
3818 }
3819
3820
3821 static SCM
3822 _wrap_nlopt_opt_add_inequality_constraint__SWIG_1 (int argc, SCM *argv)
3823 {
3824 #define FUNC_NAME "nlopt-opt-add-inequality-constraint"
3825   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3826   nlopt::func arg2 ;
3827   void *arg3 = (void *) 0 ;
3828   nlopt::func *argp2 ;
3829   SCM gswig_result;
3830   SWIGUNUSED int gswig_list_p = 0;
3831   
3832   {
3833     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3834   }
3835   {
3836     argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
3837     arg2 = *argp2;
3838   }
3839   {
3840     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
3841   }
3842   try {
3843     (arg1)->add_inequality_constraint(arg2,arg3);
3844   }
3845   catch(std::bad_alloc &_e) {
3846     scm_throw(gh_symbol2scm("bad-alloc"), 
3847       scm_list_1(scm_from_locale_string((_e).what())));
3848     
3849   }
3850   catch(std::invalid_argument &_e) {
3851     scm_throw(gh_symbol2scm("invalid-argument"), 
3852       scm_list_1(scm_from_locale_string((_e).what())));
3853     
3854   }
3855   
3856   gswig_result = SCM_UNSPECIFIED;
3857   
3858   
3859   
3860   return gswig_result;
3861 #undef FUNC_NAME
3862 }
3863
3864
3865 static SCM
3866 _wrap_nlopt_opt_add_inequality_constraint__SWIG_2 (int argc, SCM *argv)
3867 {
3868 #define FUNC_NAME "nlopt-opt-add-inequality-constraint"
3869   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3870   nlopt::vfunc arg2 = (nlopt::vfunc) 0 ;
3871   void *arg3 = (void *) 0 ;
3872   double arg4 ;
3873   SCM gswig_result;
3874   SWIGUNUSED int gswig_list_p = 0;
3875   
3876   {
3877     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3878   }
3879   {
3880     arg2 = (nlopt::vfunc)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 2, 0);
3881   }
3882   {
3883     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
3884   }
3885   {
3886     arg4 = (double) scm_to_double(argv[3]);
3887   }
3888   try {
3889     (arg1)->add_inequality_constraint(arg2,arg3,arg4);
3890   }
3891   catch(std::bad_alloc &_e) {
3892     scm_throw(gh_symbol2scm("bad-alloc"), 
3893       scm_list_1(scm_from_locale_string((_e).what())));
3894     
3895   }
3896   catch(std::invalid_argument &_e) {
3897     scm_throw(gh_symbol2scm("invalid-argument"), 
3898       scm_list_1(scm_from_locale_string((_e).what())));
3899     
3900   }
3901   
3902   gswig_result = SCM_UNSPECIFIED;
3903   
3904   
3905   
3906   
3907   return gswig_result;
3908 #undef FUNC_NAME
3909 }
3910
3911
3912 static SCM
3913 _wrap_nlopt_opt_add_inequality_constraint__SWIG_3 (int argc, SCM *argv)
3914 {
3915 #define FUNC_NAME "nlopt-opt-add-inequality-constraint"
3916   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3917   nlopt::vfunc arg2 = (nlopt::vfunc) 0 ;
3918   void *arg3 = (void *) 0 ;
3919   SCM gswig_result;
3920   SWIGUNUSED int gswig_list_p = 0;
3921   
3922   {
3923     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3924   }
3925   {
3926     arg2 = (nlopt::vfunc)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 2, 0);
3927   }
3928   {
3929     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
3930   }
3931   try {
3932     (arg1)->add_inequality_constraint(arg2,arg3);
3933   }
3934   catch(std::bad_alloc &_e) {
3935     scm_throw(gh_symbol2scm("bad-alloc"), 
3936       scm_list_1(scm_from_locale_string((_e).what())));
3937     
3938   }
3939   catch(std::invalid_argument &_e) {
3940     scm_throw(gh_symbol2scm("invalid-argument"), 
3941       scm_list_1(scm_from_locale_string((_e).what())));
3942     
3943   }
3944   
3945   gswig_result = SCM_UNSPECIFIED;
3946   
3947   
3948   
3949   
3950   return gswig_result;
3951 #undef FUNC_NAME
3952 }
3953
3954
3955 static SCM
3956 _wrap_nlopt_opt_add_inequality_mconstraint__SWIG_0 (int argc, SCM *argv)
3957 {
3958 #define FUNC_NAME "nlopt-opt-add-inequality-mconstraint"
3959   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
3960   nlopt::mfunc arg2 ;
3961   void *arg3 = (void *) 0 ;
3962   std::vector< double > *arg4 = 0 ;
3963   nlopt::mfunc *argp2 ;
3964   std::vector< double > temp4 ;
3965   SCM gswig_result;
3966   SWIGUNUSED int gswig_list_p = 0;
3967   
3968   {
3969     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
3970   }
3971   {
3972     argp2 = (nlopt::mfunc *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_mfunc, 2, 0);
3973     arg2 = *argp2;
3974   }
3975   {
3976     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
3977   }
3978   {
3979     if (scm_is_vector(argv[3])) {
3980       unsigned long size = scm_c_vector_length(argv[3]);
3981       temp4 = std::vector<double >(size);
3982       arg4 = &temp4;
3983       for (unsigned long i=0; i<size; i++) {
3984         SCM o = scm_vector_ref(argv[3],scm_from_ulong(i));
3985         if (scm_is_number(o))
3986         temp4[i] = (double)(scm_to_double(o));
3987         else
3988         scm_wrong_type_arg(FUNC_NAME, 4, argv[3]);
3989       }
3990     } else if (scm_is_null(argv[3])) {
3991       temp4 = std::vector<double >();
3992       arg4 = &temp4;
3993     } else if (scm_is_pair(argv[3])) {
3994       SCM v = scm_vector(argv[3]);
3995       unsigned long size = scm_c_vector_length(v);
3996       temp4 = std::vector<double >(size);
3997       arg4 = &temp4;
3998       for (unsigned long i=0; i<size; i++) {
3999         SCM o = scm_vector_ref(v,scm_from_ulong(i));
4000         if (scm_is_number(o))
4001         temp4[i] = (double)(scm_to_double(o));
4002         else
4003         scm_wrong_type_arg(FUNC_NAME, 4, argv[3]);
4004       }
4005     } else {
4006       arg4 = (std::vector< double > *) SWIG_MustGetPtr(argv[3],SWIGTYPE_p_std__vectorT_double_t,4, 0);
4007     }
4008   }
4009   try {
4010     (arg1)->add_inequality_mconstraint(arg2,arg3,(std::vector< double > const &)*arg4);
4011   }
4012   catch(std::bad_alloc &_e) {
4013     scm_throw(gh_symbol2scm("bad-alloc"), 
4014       scm_list_1(scm_from_locale_string((_e).what())));
4015     
4016   }
4017   catch(std::invalid_argument &_e) {
4018     scm_throw(gh_symbol2scm("invalid-argument"), 
4019       scm_list_1(scm_from_locale_string((_e).what())));
4020     
4021   }
4022   
4023   gswig_result = SCM_UNSPECIFIED;
4024   
4025   
4026   
4027   
4028   return gswig_result;
4029 #undef FUNC_NAME
4030 }
4031
4032
4033 static SCM
4034 _wrap_nlopt_opt_remove_equality_constraints (SCM s_0)
4035 {
4036 #define FUNC_NAME "nlopt-opt-remove-equality-constraints"
4037   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4038   SCM gswig_result;
4039   SWIGUNUSED int gswig_list_p = 0;
4040   
4041   {
4042     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
4043   }
4044   try {
4045     (arg1)->remove_equality_constraints();
4046   }
4047   catch(std::invalid_argument &_e) {
4048     scm_throw(gh_symbol2scm("invalid-argument"), 
4049       scm_list_1(scm_from_locale_string((_e).what())));
4050     
4051   }
4052   
4053   gswig_result = SCM_UNSPECIFIED;
4054   
4055   
4056   return gswig_result;
4057 #undef FUNC_NAME
4058 }
4059
4060
4061 static SCM
4062 _wrap_nlopt_opt_add_equality_constraint__SWIG_0 (int argc, SCM *argv)
4063 {
4064 #define FUNC_NAME "nlopt-opt-add-equality-constraint"
4065   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4066   nlopt::func arg2 ;
4067   void *arg3 = (void *) 0 ;
4068   double arg4 ;
4069   nlopt::func *argp2 ;
4070   SCM gswig_result;
4071   SWIGUNUSED int gswig_list_p = 0;
4072   
4073   {
4074     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4075   }
4076   {
4077     argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
4078     arg2 = *argp2;
4079   }
4080   {
4081     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
4082   }
4083   {
4084     arg4 = (double) scm_to_double(argv[3]);
4085   }
4086   try {
4087     (arg1)->add_equality_constraint(arg2,arg3,arg4);
4088   }
4089   catch(std::bad_alloc &_e) {
4090     scm_throw(gh_symbol2scm("bad-alloc"), 
4091       scm_list_1(scm_from_locale_string((_e).what())));
4092     
4093   }
4094   catch(std::invalid_argument &_e) {
4095     scm_throw(gh_symbol2scm("invalid-argument"), 
4096       scm_list_1(scm_from_locale_string((_e).what())));
4097     
4098   }
4099   
4100   gswig_result = SCM_UNSPECIFIED;
4101   
4102   
4103   
4104   return gswig_result;
4105 #undef FUNC_NAME
4106 }
4107
4108
4109 static SCM
4110 _wrap_nlopt_opt_add_equality_constraint__SWIG_1 (int argc, SCM *argv)
4111 {
4112 #define FUNC_NAME "nlopt-opt-add-equality-constraint"
4113   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4114   nlopt::func arg2 ;
4115   void *arg3 = (void *) 0 ;
4116   nlopt::func *argp2 ;
4117   SCM gswig_result;
4118   SWIGUNUSED int gswig_list_p = 0;
4119   
4120   {
4121     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4122   }
4123   {
4124     argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
4125     arg2 = *argp2;
4126   }
4127   {
4128     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
4129   }
4130   try {
4131     (arg1)->add_equality_constraint(arg2,arg3);
4132   }
4133   catch(std::bad_alloc &_e) {
4134     scm_throw(gh_symbol2scm("bad-alloc"), 
4135       scm_list_1(scm_from_locale_string((_e).what())));
4136     
4137   }
4138   catch(std::invalid_argument &_e) {
4139     scm_throw(gh_symbol2scm("invalid-argument"), 
4140       scm_list_1(scm_from_locale_string((_e).what())));
4141     
4142   }
4143   
4144   gswig_result = SCM_UNSPECIFIED;
4145   
4146   
4147   
4148   return gswig_result;
4149 #undef FUNC_NAME
4150 }
4151
4152
4153 static SCM
4154 _wrap_nlopt_opt_add_equality_constraint__SWIG_2 (int argc, SCM *argv)
4155 {
4156 #define FUNC_NAME "nlopt-opt-add-equality-constraint"
4157   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4158   nlopt::vfunc arg2 = (nlopt::vfunc) 0 ;
4159   void *arg3 = (void *) 0 ;
4160   double arg4 ;
4161   SCM gswig_result;
4162   SWIGUNUSED int gswig_list_p = 0;
4163   
4164   {
4165     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4166   }
4167   {
4168     arg2 = (nlopt::vfunc)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 2, 0);
4169   }
4170   {
4171     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
4172   }
4173   {
4174     arg4 = (double) scm_to_double(argv[3]);
4175   }
4176   try {
4177     (arg1)->add_equality_constraint(arg2,arg3,arg4);
4178   }
4179   catch(std::bad_alloc &_e) {
4180     scm_throw(gh_symbol2scm("bad-alloc"), 
4181       scm_list_1(scm_from_locale_string((_e).what())));
4182     
4183   }
4184   catch(std::invalid_argument &_e) {
4185     scm_throw(gh_symbol2scm("invalid-argument"), 
4186       scm_list_1(scm_from_locale_string((_e).what())));
4187     
4188   }
4189   
4190   gswig_result = SCM_UNSPECIFIED;
4191   
4192   
4193   
4194   
4195   return gswig_result;
4196 #undef FUNC_NAME
4197 }
4198
4199
4200 static SCM
4201 _wrap_nlopt_opt_add_equality_constraint__SWIG_3 (int argc, SCM *argv)
4202 {
4203 #define FUNC_NAME "nlopt-opt-add-equality-constraint"
4204   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4205   nlopt::vfunc arg2 = (nlopt::vfunc) 0 ;
4206   void *arg3 = (void *) 0 ;
4207   SCM gswig_result;
4208   SWIGUNUSED int gswig_list_p = 0;
4209   
4210   {
4211     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4212   }
4213   {
4214     arg2 = (nlopt::vfunc)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 2, 0);
4215   }
4216   {
4217     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
4218   }
4219   try {
4220     (arg1)->add_equality_constraint(arg2,arg3);
4221   }
4222   catch(std::bad_alloc &_e) {
4223     scm_throw(gh_symbol2scm("bad-alloc"), 
4224       scm_list_1(scm_from_locale_string((_e).what())));
4225     
4226   }
4227   catch(std::invalid_argument &_e) {
4228     scm_throw(gh_symbol2scm("invalid-argument"), 
4229       scm_list_1(scm_from_locale_string((_e).what())));
4230     
4231   }
4232   
4233   gswig_result = SCM_UNSPECIFIED;
4234   
4235   
4236   
4237   
4238   return gswig_result;
4239 #undef FUNC_NAME
4240 }
4241
4242
4243 static SCM
4244 _wrap_nlopt_opt_add_equality_mconstraint__SWIG_0 (int argc, SCM *argv)
4245 {
4246 #define FUNC_NAME "nlopt-opt-add-equality-mconstraint"
4247   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4248   nlopt::mfunc arg2 ;
4249   void *arg3 = (void *) 0 ;
4250   std::vector< double > *arg4 = 0 ;
4251   nlopt::mfunc *argp2 ;
4252   std::vector< double > temp4 ;
4253   SCM gswig_result;
4254   SWIGUNUSED int gswig_list_p = 0;
4255   
4256   {
4257     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4258   }
4259   {
4260     argp2 = (nlopt::mfunc *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_mfunc, 2, 0);
4261     arg2 = *argp2;
4262   }
4263   {
4264     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
4265   }
4266   {
4267     if (scm_is_vector(argv[3])) {
4268       unsigned long size = scm_c_vector_length(argv[3]);
4269       temp4 = std::vector<double >(size);
4270       arg4 = &temp4;
4271       for (unsigned long i=0; i<size; i++) {
4272         SCM o = scm_vector_ref(argv[3],scm_from_ulong(i));
4273         if (scm_is_number(o))
4274         temp4[i] = (double)(scm_to_double(o));
4275         else
4276         scm_wrong_type_arg(FUNC_NAME, 4, argv[3]);
4277       }
4278     } else if (scm_is_null(argv[3])) {
4279       temp4 = std::vector<double >();
4280       arg4 = &temp4;
4281     } else if (scm_is_pair(argv[3])) {
4282       SCM v = scm_vector(argv[3]);
4283       unsigned long size = scm_c_vector_length(v);
4284       temp4 = std::vector<double >(size);
4285       arg4 = &temp4;
4286       for (unsigned long i=0; i<size; i++) {
4287         SCM o = scm_vector_ref(v,scm_from_ulong(i));
4288         if (scm_is_number(o))
4289         temp4[i] = (double)(scm_to_double(o));
4290         else
4291         scm_wrong_type_arg(FUNC_NAME, 4, argv[3]);
4292       }
4293     } else {
4294       arg4 = (std::vector< double > *) SWIG_MustGetPtr(argv[3],SWIGTYPE_p_std__vectorT_double_t,4, 0);
4295     }
4296   }
4297   try {
4298     (arg1)->add_equality_mconstraint(arg2,arg3,(std::vector< double > const &)*arg4);
4299   }
4300   catch(std::bad_alloc &_e) {
4301     scm_throw(gh_symbol2scm("bad-alloc"), 
4302       scm_list_1(scm_from_locale_string((_e).what())));
4303     
4304   }
4305   catch(std::invalid_argument &_e) {
4306     scm_throw(gh_symbol2scm("invalid-argument"), 
4307       scm_list_1(scm_from_locale_string((_e).what())));
4308     
4309   }
4310   
4311   gswig_result = SCM_UNSPECIFIED;
4312   
4313   
4314   
4315   
4316   return gswig_result;
4317 #undef FUNC_NAME
4318 }
4319
4320
4321 static SCM
4322 _wrap_nlopt_opt_add_inequality_constraint__SWIG_4 (int argc, SCM *argv)
4323 {
4324 #define FUNC_NAME "nlopt-opt-add-inequality-constraint"
4325   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4326   nlopt::func arg2 ;
4327   void *arg3 = (void *) 0 ;
4328   nlopt_munge arg4 ;
4329   nlopt_munge arg5 ;
4330   double arg6 ;
4331   SCM gswig_result;
4332   SWIGUNUSED int gswig_list_p = 0;
4333   
4334   {
4335     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4336   }
4337   {
4338     arg2 = func_guile;
4339     arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
4340     arg4 = free_guilefunc;
4341     arg5 = dup_guilefunc;
4342   }
4343   {
4344     arg6 = (double) scm_to_double(argv[2]);
4345   }
4346   try {
4347     (arg1)->add_inequality_constraint(arg2,arg3,arg4,arg5,arg6);
4348   }
4349   catch(std::bad_alloc &_e) {
4350     scm_throw(gh_symbol2scm("bad-alloc"), 
4351       scm_list_1(scm_from_locale_string((_e).what())));
4352     
4353   }
4354   catch(std::invalid_argument &_e) {
4355     scm_throw(gh_symbol2scm("invalid-argument"), 
4356       scm_list_1(scm_from_locale_string((_e).what())));
4357     
4358   }
4359   
4360   gswig_result = SCM_UNSPECIFIED;
4361   
4362   
4363   
4364   return gswig_result;
4365 #undef FUNC_NAME
4366 }
4367
4368
4369 static SCM
4370 _wrap_nlopt_opt_add_inequality_constraint__SWIG_5 (int argc, SCM *argv)
4371 {
4372 #define FUNC_NAME "nlopt-opt-add-inequality-constraint"
4373   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4374   nlopt::func arg2 ;
4375   void *arg3 = (void *) 0 ;
4376   nlopt_munge arg4 ;
4377   nlopt_munge arg5 ;
4378   SCM gswig_result;
4379   SWIGUNUSED int gswig_list_p = 0;
4380   
4381   {
4382     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4383   }
4384   {
4385     arg2 = func_guile;
4386     arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
4387     arg4 = free_guilefunc;
4388     arg5 = dup_guilefunc;
4389   }
4390   try {
4391     (arg1)->add_inequality_constraint(arg2,arg3,arg4,arg5);
4392   }
4393   catch(std::bad_alloc &_e) {
4394     scm_throw(gh_symbol2scm("bad-alloc"), 
4395       scm_list_1(scm_from_locale_string((_e).what())));
4396     
4397   }
4398   catch(std::invalid_argument &_e) {
4399     scm_throw(gh_symbol2scm("invalid-argument"), 
4400       scm_list_1(scm_from_locale_string((_e).what())));
4401     
4402   }
4403   
4404   gswig_result = SCM_UNSPECIFIED;
4405   
4406   
4407   
4408   return gswig_result;
4409 #undef FUNC_NAME
4410 }
4411
4412
4413 static SCM
4414 _wrap_nlopt_opt_add_inequality_constraint(SCM rest)
4415 {
4416 #define FUNC_NAME "nlopt-opt-add-inequality-constraint"
4417   SCM argv[4];
4418   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "nlopt-opt-add-inequality-constraint");
4419   if (argc == 2) {
4420     int _v;
4421     {
4422       void *ptr;
4423       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4424       _v = SWIG_CheckState(res);
4425     }
4426     if (_v) {
4427       {
4428         _v = SCM_NFALSEP(scm_procedure_p(argv[1]));
4429       }
4430       if (_v) {
4431         if (argc <= 2) {
4432           return _wrap_nlopt_opt_add_inequality_constraint__SWIG_5(argc,argv);
4433         }
4434         if (argc <= 3) {
4435           return _wrap_nlopt_opt_add_inequality_constraint__SWIG_5(argc,argv);
4436         }
4437         if (argc <= 4) {
4438           return _wrap_nlopt_opt_add_inequality_constraint__SWIG_5(argc,argv);
4439         }
4440         return _wrap_nlopt_opt_add_inequality_constraint__SWIG_5(argc,argv);
4441       }
4442     }
4443   }
4444   if (argc == 3) {
4445     int _v;
4446     {
4447       void *ptr;
4448       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4449       _v = SWIG_CheckState(res);
4450     }
4451     if (_v) {
4452       {
4453         void *ptr;
4454         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
4455         _v = SWIG_CheckState(res);
4456       }
4457       if (_v) {
4458         {
4459           void *ptr;
4460           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4461           _v = SWIG_CheckState(res);
4462         }
4463         if (_v) {
4464           return _wrap_nlopt_opt_add_inequality_constraint__SWIG_3(argc,argv);
4465         }
4466       }
4467     }
4468   }
4469   if (argc == 3) {
4470     int _v;
4471     {
4472       void *ptr;
4473       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4474       _v = SWIG_CheckState(res);
4475     }
4476     if (_v) {
4477       {
4478         _v = SCM_NFALSEP(scm_procedure_p(argv[1]));
4479       }
4480       if (_v) {
4481         {
4482           _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0;
4483         }
4484         if (_v) {
4485           return _wrap_nlopt_opt_add_inequality_constraint__SWIG_4(argc,argv);
4486         }
4487       }
4488     }
4489   }
4490   if (argc == 3) {
4491     int _v;
4492     {
4493       void *ptr;
4494       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4495       _v = SWIG_CheckState(res);
4496     }
4497     if (_v) {
4498       {
4499         void *ptr;
4500         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, 0);
4501         _v = SWIG_CheckState(res);
4502       }
4503       if (_v) {
4504         {
4505           void *ptr;
4506           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4507           _v = SWIG_CheckState(res);
4508         }
4509         if (_v) {
4510           return _wrap_nlopt_opt_add_inequality_constraint__SWIG_1(argc,argv);
4511         }
4512       }
4513     }
4514   }
4515   if (argc == 4) {
4516     int _v;
4517     {
4518       void *ptr;
4519       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4520       _v = SWIG_CheckState(res);
4521     }
4522     if (_v) {
4523       {
4524         void *ptr;
4525         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
4526         _v = SWIG_CheckState(res);
4527       }
4528       if (_v) {
4529         {
4530           void *ptr;
4531           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4532           _v = SWIG_CheckState(res);
4533         }
4534         if (_v) {
4535           {
4536             _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0;
4537           }
4538           if (_v) {
4539             return _wrap_nlopt_opt_add_inequality_constraint__SWIG_2(argc,argv);
4540           }
4541         }
4542       }
4543     }
4544   }
4545   if (argc == 4) {
4546     int _v;
4547     {
4548       void *ptr;
4549       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4550       _v = SWIG_CheckState(res);
4551     }
4552     if (_v) {
4553       {
4554         void *ptr;
4555         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, 0);
4556         _v = SWIG_CheckState(res);
4557       }
4558       if (_v) {
4559         {
4560           void *ptr;
4561           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4562           _v = SWIG_CheckState(res);
4563         }
4564         if (_v) {
4565           {
4566             _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0;
4567           }
4568           if (_v) {
4569             return _wrap_nlopt_opt_add_inequality_constraint__SWIG_0(argc,argv);
4570           }
4571         }
4572       }
4573     }
4574   }
4575   
4576   scm_misc_error("nlopt-opt-add-inequality-constraint", "No matching method for generic function `nlopt_opt_add_inequality_constraint'", SCM_EOL);
4577 #undef FUNC_NAME
4578 }
4579
4580
4581 static SCM
4582 _wrap_nlopt_opt_add_equality_constraint__SWIG_4 (int argc, SCM *argv)
4583 {
4584 #define FUNC_NAME "nlopt-opt-add-equality-constraint"
4585   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4586   nlopt::func arg2 ;
4587   void *arg3 = (void *) 0 ;
4588   nlopt_munge arg4 ;
4589   nlopt_munge arg5 ;
4590   double arg6 ;
4591   SCM gswig_result;
4592   SWIGUNUSED int gswig_list_p = 0;
4593   
4594   {
4595     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4596   }
4597   {
4598     arg2 = func_guile;
4599     arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
4600     arg4 = free_guilefunc;
4601     arg5 = dup_guilefunc;
4602   }
4603   {
4604     arg6 = (double) scm_to_double(argv[2]);
4605   }
4606   try {
4607     (arg1)->add_equality_constraint(arg2,arg3,arg4,arg5,arg6);
4608   }
4609   catch(std::bad_alloc &_e) {
4610     scm_throw(gh_symbol2scm("bad-alloc"), 
4611       scm_list_1(scm_from_locale_string((_e).what())));
4612     
4613   }
4614   catch(std::invalid_argument &_e) {
4615     scm_throw(gh_symbol2scm("invalid-argument"), 
4616       scm_list_1(scm_from_locale_string((_e).what())));
4617     
4618   }
4619   
4620   gswig_result = SCM_UNSPECIFIED;
4621   
4622   
4623   
4624   return gswig_result;
4625 #undef FUNC_NAME
4626 }
4627
4628
4629 static SCM
4630 _wrap_nlopt_opt_add_equality_constraint__SWIG_5 (int argc, SCM *argv)
4631 {
4632 #define FUNC_NAME "nlopt-opt-add-equality-constraint"
4633   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4634   nlopt::func arg2 ;
4635   void *arg3 = (void *) 0 ;
4636   nlopt_munge arg4 ;
4637   nlopt_munge arg5 ;
4638   SCM gswig_result;
4639   SWIGUNUSED int gswig_list_p = 0;
4640   
4641   {
4642     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4643   }
4644   {
4645     arg2 = func_guile;
4646     arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
4647     arg4 = free_guilefunc;
4648     arg5 = dup_guilefunc;
4649   }
4650   try {
4651     (arg1)->add_equality_constraint(arg2,arg3,arg4,arg5);
4652   }
4653   catch(std::bad_alloc &_e) {
4654     scm_throw(gh_symbol2scm("bad-alloc"), 
4655       scm_list_1(scm_from_locale_string((_e).what())));
4656     
4657   }
4658   catch(std::invalid_argument &_e) {
4659     scm_throw(gh_symbol2scm("invalid-argument"), 
4660       scm_list_1(scm_from_locale_string((_e).what())));
4661     
4662   }
4663   
4664   gswig_result = SCM_UNSPECIFIED;
4665   
4666   
4667   
4668   return gswig_result;
4669 #undef FUNC_NAME
4670 }
4671
4672
4673 static SCM
4674 _wrap_nlopt_opt_add_equality_constraint(SCM rest)
4675 {
4676 #define FUNC_NAME "nlopt-opt-add-equality-constraint"
4677   SCM argv[4];
4678   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "nlopt-opt-add-equality-constraint");
4679   if (argc == 2) {
4680     int _v;
4681     {
4682       void *ptr;
4683       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4684       _v = SWIG_CheckState(res);
4685     }
4686     if (_v) {
4687       {
4688         _v = SCM_NFALSEP(scm_procedure_p(argv[1]));
4689       }
4690       if (_v) {
4691         if (argc <= 2) {
4692           return _wrap_nlopt_opt_add_equality_constraint__SWIG_5(argc,argv);
4693         }
4694         if (argc <= 3) {
4695           return _wrap_nlopt_opt_add_equality_constraint__SWIG_5(argc,argv);
4696         }
4697         if (argc <= 4) {
4698           return _wrap_nlopt_opt_add_equality_constraint__SWIG_5(argc,argv);
4699         }
4700         return _wrap_nlopt_opt_add_equality_constraint__SWIG_5(argc,argv);
4701       }
4702     }
4703   }
4704   if (argc == 3) {
4705     int _v;
4706     {
4707       void *ptr;
4708       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4709       _v = SWIG_CheckState(res);
4710     }
4711     if (_v) {
4712       {
4713         void *ptr;
4714         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
4715         _v = SWIG_CheckState(res);
4716       }
4717       if (_v) {
4718         {
4719           void *ptr;
4720           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4721           _v = SWIG_CheckState(res);
4722         }
4723         if (_v) {
4724           return _wrap_nlopt_opt_add_equality_constraint__SWIG_3(argc,argv);
4725         }
4726       }
4727     }
4728   }
4729   if (argc == 3) {
4730     int _v;
4731     {
4732       void *ptr;
4733       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4734       _v = SWIG_CheckState(res);
4735     }
4736     if (_v) {
4737       {
4738         _v = SCM_NFALSEP(scm_procedure_p(argv[1]));
4739       }
4740       if (_v) {
4741         {
4742           _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0;
4743         }
4744         if (_v) {
4745           return _wrap_nlopt_opt_add_equality_constraint__SWIG_4(argc,argv);
4746         }
4747       }
4748     }
4749   }
4750   if (argc == 3) {
4751     int _v;
4752     {
4753       void *ptr;
4754       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4755       _v = SWIG_CheckState(res);
4756     }
4757     if (_v) {
4758       {
4759         void *ptr;
4760         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, 0);
4761         _v = SWIG_CheckState(res);
4762       }
4763       if (_v) {
4764         {
4765           void *ptr;
4766           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4767           _v = SWIG_CheckState(res);
4768         }
4769         if (_v) {
4770           return _wrap_nlopt_opt_add_equality_constraint__SWIG_1(argc,argv);
4771         }
4772       }
4773     }
4774   }
4775   if (argc == 4) {
4776     int _v;
4777     {
4778       void *ptr;
4779       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4780       _v = SWIG_CheckState(res);
4781     }
4782     if (_v) {
4783       {
4784         void *ptr;
4785         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
4786         _v = SWIG_CheckState(res);
4787       }
4788       if (_v) {
4789         {
4790           void *ptr;
4791           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4792           _v = SWIG_CheckState(res);
4793         }
4794         if (_v) {
4795           {
4796             _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0;
4797           }
4798           if (_v) {
4799             return _wrap_nlopt_opt_add_equality_constraint__SWIG_2(argc,argv);
4800           }
4801         }
4802       }
4803     }
4804   }
4805   if (argc == 4) {
4806     int _v;
4807     {
4808       void *ptr;
4809       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4810       _v = SWIG_CheckState(res);
4811     }
4812     if (_v) {
4813       {
4814         void *ptr;
4815         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, 0);
4816         _v = SWIG_CheckState(res);
4817       }
4818       if (_v) {
4819         {
4820           void *ptr;
4821           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4822           _v = SWIG_CheckState(res);
4823         }
4824         if (_v) {
4825           {
4826             _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0;
4827           }
4828           if (_v) {
4829             return _wrap_nlopt_opt_add_equality_constraint__SWIG_0(argc,argv);
4830           }
4831         }
4832       }
4833     }
4834   }
4835   
4836   scm_misc_error("nlopt-opt-add-equality-constraint", "No matching method for generic function `nlopt_opt_add_equality_constraint'", SCM_EOL);
4837 #undef FUNC_NAME
4838 }
4839
4840
4841 static SCM
4842 _wrap_nlopt_opt_add_inequality_mconstraint__SWIG_1 (int argc, SCM *argv)
4843 {
4844 #define FUNC_NAME "nlopt-opt-add-inequality-mconstraint"
4845   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
4846   nlopt::mfunc arg2 ;
4847   void *arg3 = (void *) 0 ;
4848   nlopt_munge arg4 ;
4849   nlopt_munge arg5 ;
4850   std::vector< double > *arg6 = 0 ;
4851   nlopt::mfunc *argp2 ;
4852   nlopt_munge *argp4 ;
4853   nlopt_munge *argp5 ;
4854   std::vector< double > temp6 ;
4855   SCM gswig_result;
4856   SWIGUNUSED int gswig_list_p = 0;
4857   
4858   {
4859     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
4860   }
4861   {
4862     argp2 = (nlopt::mfunc *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_mfunc, 2, 0);
4863     arg2 = *argp2;
4864   }
4865   {
4866     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
4867   }
4868   {
4869     argp4 = (nlopt_munge *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_nlopt_munge, 4, 0);
4870     arg4 = *argp4;
4871   }
4872   {
4873     argp5 = (nlopt_munge *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_nlopt_munge, 5, 0);
4874     arg5 = *argp5;
4875   }
4876   {
4877     if (scm_is_vector(argv[5])) {
4878       unsigned long size = scm_c_vector_length(argv[5]);
4879       temp6 = std::vector<double >(size);
4880       arg6 = &temp6;
4881       for (unsigned long i=0; i<size; i++) {
4882         SCM o = scm_vector_ref(argv[5],scm_from_ulong(i));
4883         if (scm_is_number(o))
4884         temp6[i] = (double)(scm_to_double(o));
4885         else
4886         scm_wrong_type_arg(FUNC_NAME, 6, argv[5]);
4887       }
4888     } else if (scm_is_null(argv[5])) {
4889       temp6 = std::vector<double >();
4890       arg6 = &temp6;
4891     } else if (scm_is_pair(argv[5])) {
4892       SCM v = scm_vector(argv[5]);
4893       unsigned long size = scm_c_vector_length(v);
4894       temp6 = std::vector<double >(size);
4895       arg6 = &temp6;
4896       for (unsigned long i=0; i<size; i++) {
4897         SCM o = scm_vector_ref(v,scm_from_ulong(i));
4898         if (scm_is_number(o))
4899         temp6[i] = (double)(scm_to_double(o));
4900         else
4901         scm_wrong_type_arg(FUNC_NAME, 6, argv[5]);
4902       }
4903     } else {
4904       arg6 = (std::vector< double > *) SWIG_MustGetPtr(argv[5],SWIGTYPE_p_std__vectorT_double_t,6, 0);
4905     }
4906   }
4907   try {
4908     (arg1)->add_inequality_mconstraint(arg2,arg3,arg4,arg5,(std::vector< double > const &)*arg6);
4909   }
4910   catch(std::bad_alloc &_e) {
4911     scm_throw(gh_symbol2scm("bad-alloc"), 
4912       scm_list_1(scm_from_locale_string((_e).what())));
4913     
4914   }
4915   catch(std::invalid_argument &_e) {
4916     scm_throw(gh_symbol2scm("invalid-argument"), 
4917       scm_list_1(scm_from_locale_string((_e).what())));
4918     
4919   }
4920   
4921   gswig_result = SCM_UNSPECIFIED;
4922   
4923   
4924   
4925   
4926   return gswig_result;
4927 #undef FUNC_NAME
4928 }
4929
4930
4931 static SCM
4932 _wrap_nlopt_opt_add_inequality_mconstraint(SCM rest)
4933 {
4934 #define FUNC_NAME "nlopt-opt-add-inequality-mconstraint"
4935   SCM argv[6];
4936   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "nlopt-opt-add-inequality-mconstraint");
4937   if (argc == 4) {
4938     int _v;
4939     {
4940       void *ptr;
4941       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4942       _v = SWIG_CheckState(res);
4943     }
4944     if (_v) {
4945       {
4946         void *ptr;
4947         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_mfunc, 0);
4948         _v = SWIG_CheckState(res);
4949       }
4950       if (_v) {
4951         {
4952           void *ptr;
4953           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
4954           _v = SWIG_CheckState(res);
4955         }
4956         if (_v) {
4957           {
4958             /* native sequence? */
4959             if (scm_is_vector(argv[3])) {
4960               unsigned int size = scm_c_vector_length(argv[3]);
4961               if (size == 0) {
4962                 /* an empty sequence can be of any type */
4963                 _v = 1;
4964               } else {
4965                 /* check the first element only */
4966                 double* x;
4967                 SCM o = scm_vector_ref(argv[3],scm_from_ulong(0));
4968                 _v = scm_is_number(o) ? 1 : 0;
4969               }
4970             } else if (scm_is_null(argv[3])) {
4971               /* again, an empty sequence can be of any type */
4972               _v = 1;
4973             } else if (scm_is_pair(argv[3])) {
4974               /* check the first element only */
4975               double* x;
4976               SCM head = SCM_CAR(argv[3]);
4977               _v = scm_is_number(head) ? 1 : 0;
4978             } else {
4979               /* wrapped vector? */
4980               std::vector<double >* v;
4981               _v = (SWIG_ConvertPtr(argv[3],(void **) &v, 
4982                   SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
4983             }
4984           }
4985           if (_v) {
4986             return _wrap_nlopt_opt_add_inequality_mconstraint__SWIG_0(argc,argv);
4987           }
4988         }
4989       }
4990     }
4991   }
4992   if (argc == 6) {
4993     int _v;
4994     {
4995       void *ptr;
4996       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
4997       _v = SWIG_CheckState(res);
4998     }
4999     if (_v) {
5000       {
5001         void *ptr;
5002         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_mfunc, 0);
5003         _v = SWIG_CheckState(res);
5004       }
5005       if (_v) {
5006         {
5007           void *ptr;
5008           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
5009           _v = SWIG_CheckState(res);
5010         }
5011         if (_v) {
5012           {
5013             void *ptr;
5014             int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_nlopt_munge, 0);
5015             _v = SWIG_CheckState(res);
5016           }
5017           if (_v) {
5018             {
5019               void *ptr;
5020               int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_nlopt_munge, 0);
5021               _v = SWIG_CheckState(res);
5022             }
5023             if (_v) {
5024               {
5025                 /* native sequence? */
5026                 if (scm_is_vector(argv[5])) {
5027                   unsigned int size = scm_c_vector_length(argv[5]);
5028                   if (size == 0) {
5029                     /* an empty sequence can be of any type */
5030                     _v = 1;
5031                   } else {
5032                     /* check the first element only */
5033                     double* x;
5034                     SCM o = scm_vector_ref(argv[5],scm_from_ulong(0));
5035                     _v = scm_is_number(o) ? 1 : 0;
5036                   }
5037                 } else if (scm_is_null(argv[5])) {
5038                   /* again, an empty sequence can be of any type */
5039                   _v = 1;
5040                 } else if (scm_is_pair(argv[5])) {
5041                   /* check the first element only */
5042                   double* x;
5043                   SCM head = SCM_CAR(argv[5]);
5044                   _v = scm_is_number(head) ? 1 : 0;
5045                 } else {
5046                   /* wrapped vector? */
5047                   std::vector<double >* v;
5048                   _v = (SWIG_ConvertPtr(argv[5],(void **) &v, 
5049                       SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
5050                 }
5051               }
5052               if (_v) {
5053                 return _wrap_nlopt_opt_add_inequality_mconstraint__SWIG_1(argc,argv);
5054               }
5055             }
5056           }
5057         }
5058       }
5059     }
5060   }
5061   
5062   scm_misc_error("nlopt-opt-add-inequality-mconstraint", "No matching method for generic function `nlopt_opt_add_inequality_mconstraint'", SCM_EOL);
5063 #undef FUNC_NAME
5064 }
5065
5066
5067 static SCM
5068 _wrap_nlopt_opt_add_equality_mconstraint__SWIG_1 (int argc, SCM *argv)
5069 {
5070 #define FUNC_NAME "nlopt-opt-add-equality-mconstraint"
5071   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5072   nlopt::mfunc arg2 ;
5073   void *arg3 = (void *) 0 ;
5074   nlopt_munge arg4 ;
5075   nlopt_munge arg5 ;
5076   std::vector< double > *arg6 = 0 ;
5077   nlopt::mfunc *argp2 ;
5078   nlopt_munge *argp4 ;
5079   nlopt_munge *argp5 ;
5080   std::vector< double > temp6 ;
5081   SCM gswig_result;
5082   SWIGUNUSED int gswig_list_p = 0;
5083   
5084   {
5085     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
5086   }
5087   {
5088     argp2 = (nlopt::mfunc *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_mfunc, 2, 0);
5089     arg2 = *argp2;
5090   }
5091   {
5092     arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
5093   }
5094   {
5095     argp4 = (nlopt_munge *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_nlopt_munge, 4, 0);
5096     arg4 = *argp4;
5097   }
5098   {
5099     argp5 = (nlopt_munge *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_nlopt_munge, 5, 0);
5100     arg5 = *argp5;
5101   }
5102   {
5103     if (scm_is_vector(argv[5])) {
5104       unsigned long size = scm_c_vector_length(argv[5]);
5105       temp6 = std::vector<double >(size);
5106       arg6 = &temp6;
5107       for (unsigned long i=0; i<size; i++) {
5108         SCM o = scm_vector_ref(argv[5],scm_from_ulong(i));
5109         if (scm_is_number(o))
5110         temp6[i] = (double)(scm_to_double(o));
5111         else
5112         scm_wrong_type_arg(FUNC_NAME, 6, argv[5]);
5113       }
5114     } else if (scm_is_null(argv[5])) {
5115       temp6 = std::vector<double >();
5116       arg6 = &temp6;
5117     } else if (scm_is_pair(argv[5])) {
5118       SCM v = scm_vector(argv[5]);
5119       unsigned long size = scm_c_vector_length(v);
5120       temp6 = std::vector<double >(size);
5121       arg6 = &temp6;
5122       for (unsigned long i=0; i<size; i++) {
5123         SCM o = scm_vector_ref(v,scm_from_ulong(i));
5124         if (scm_is_number(o))
5125         temp6[i] = (double)(scm_to_double(o));
5126         else
5127         scm_wrong_type_arg(FUNC_NAME, 6, argv[5]);
5128       }
5129     } else {
5130       arg6 = (std::vector< double > *) SWIG_MustGetPtr(argv[5],SWIGTYPE_p_std__vectorT_double_t,6, 0);
5131     }
5132   }
5133   try {
5134     (arg1)->add_equality_mconstraint(arg2,arg3,arg4,arg5,(std::vector< double > const &)*arg6);
5135   }
5136   catch(std::bad_alloc &_e) {
5137     scm_throw(gh_symbol2scm("bad-alloc"), 
5138       scm_list_1(scm_from_locale_string((_e).what())));
5139     
5140   }
5141   catch(std::invalid_argument &_e) {
5142     scm_throw(gh_symbol2scm("invalid-argument"), 
5143       scm_list_1(scm_from_locale_string((_e).what())));
5144     
5145   }
5146   
5147   gswig_result = SCM_UNSPECIFIED;
5148   
5149   
5150   
5151   
5152   return gswig_result;
5153 #undef FUNC_NAME
5154 }
5155
5156
5157 static SCM
5158 _wrap_nlopt_opt_add_equality_mconstraint(SCM rest)
5159 {
5160 #define FUNC_NAME "nlopt-opt-add-equality-mconstraint"
5161   SCM argv[6];
5162   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "nlopt-opt-add-equality-mconstraint");
5163   if (argc == 4) {
5164     int _v;
5165     {
5166       void *ptr;
5167       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5168       _v = SWIG_CheckState(res);
5169     }
5170     if (_v) {
5171       {
5172         void *ptr;
5173         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_mfunc, 0);
5174         _v = SWIG_CheckState(res);
5175       }
5176       if (_v) {
5177         {
5178           void *ptr;
5179           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
5180           _v = SWIG_CheckState(res);
5181         }
5182         if (_v) {
5183           {
5184             /* native sequence? */
5185             if (scm_is_vector(argv[3])) {
5186               unsigned int size = scm_c_vector_length(argv[3]);
5187               if (size == 0) {
5188                 /* an empty sequence can be of any type */
5189                 _v = 1;
5190               } else {
5191                 /* check the first element only */
5192                 double* x;
5193                 SCM o = scm_vector_ref(argv[3],scm_from_ulong(0));
5194                 _v = scm_is_number(o) ? 1 : 0;
5195               }
5196             } else if (scm_is_null(argv[3])) {
5197               /* again, an empty sequence can be of any type */
5198               _v = 1;
5199             } else if (scm_is_pair(argv[3])) {
5200               /* check the first element only */
5201               double* x;
5202               SCM head = SCM_CAR(argv[3]);
5203               _v = scm_is_number(head) ? 1 : 0;
5204             } else {
5205               /* wrapped vector? */
5206               std::vector<double >* v;
5207               _v = (SWIG_ConvertPtr(argv[3],(void **) &v, 
5208                   SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
5209             }
5210           }
5211           if (_v) {
5212             return _wrap_nlopt_opt_add_equality_mconstraint__SWIG_0(argc,argv);
5213           }
5214         }
5215       }
5216     }
5217   }
5218   if (argc == 6) {
5219     int _v;
5220     {
5221       void *ptr;
5222       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5223       _v = SWIG_CheckState(res);
5224     }
5225     if (_v) {
5226       {
5227         void *ptr;
5228         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_mfunc, 0);
5229         _v = SWIG_CheckState(res);
5230       }
5231       if (_v) {
5232         {
5233           void *ptr;
5234           int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
5235           _v = SWIG_CheckState(res);
5236         }
5237         if (_v) {
5238           {
5239             void *ptr;
5240             int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_nlopt_munge, 0);
5241             _v = SWIG_CheckState(res);
5242           }
5243           if (_v) {
5244             {
5245               void *ptr;
5246               int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_nlopt_munge, 0);
5247               _v = SWIG_CheckState(res);
5248             }
5249             if (_v) {
5250               {
5251                 /* native sequence? */
5252                 if (scm_is_vector(argv[5])) {
5253                   unsigned int size = scm_c_vector_length(argv[5]);
5254                   if (size == 0) {
5255                     /* an empty sequence can be of any type */
5256                     _v = 1;
5257                   } else {
5258                     /* check the first element only */
5259                     double* x;
5260                     SCM o = scm_vector_ref(argv[5],scm_from_ulong(0));
5261                     _v = scm_is_number(o) ? 1 : 0;
5262                   }
5263                 } else if (scm_is_null(argv[5])) {
5264                   /* again, an empty sequence can be of any type */
5265                   _v = 1;
5266                 } else if (scm_is_pair(argv[5])) {
5267                   /* check the first element only */
5268                   double* x;
5269                   SCM head = SCM_CAR(argv[5]);
5270                   _v = scm_is_number(head) ? 1 : 0;
5271                 } else {
5272                   /* wrapped vector? */
5273                   std::vector<double >* v;
5274                   _v = (SWIG_ConvertPtr(argv[5],(void **) &v, 
5275                       SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
5276                 }
5277               }
5278               if (_v) {
5279                 return _wrap_nlopt_opt_add_equality_mconstraint__SWIG_1(argc,argv);
5280               }
5281             }
5282           }
5283         }
5284       }
5285     }
5286   }
5287   
5288   scm_misc_error("nlopt-opt-add-equality-mconstraint", "No matching method for generic function `nlopt_opt_add_equality_mconstraint'", SCM_EOL);
5289 #undef FUNC_NAME
5290 }
5291
5292
5293 static SCM
5294 _wrap_nlopt_opt_set_lower_bounds__SWIG_0 (int argc, SCM *argv)
5295 {
5296 #define FUNC_NAME "nlopt-opt-set-lower-bounds"
5297   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5298   double arg2 ;
5299   SCM gswig_result;
5300   SWIGUNUSED int gswig_list_p = 0;
5301   
5302   {
5303     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
5304   }
5305   {
5306     arg2 = (double) scm_to_double(argv[1]);
5307   }
5308   try {
5309     (arg1)->set_lower_bounds(arg2);
5310   }
5311   catch(std::invalid_argument &_e) {
5312     scm_throw(gh_symbol2scm("invalid-argument"), 
5313       scm_list_1(scm_from_locale_string((_e).what())));
5314     
5315   }
5316   
5317   gswig_result = SCM_UNSPECIFIED;
5318   
5319   
5320   return gswig_result;
5321 #undef FUNC_NAME
5322 }
5323
5324
5325 static SCM
5326 _wrap_nlopt_opt_get_lower_bounds__SWIG_0 (int argc, SCM *argv)
5327 {
5328 #define FUNC_NAME "nlopt-opt-get-lower-bounds"
5329   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5330   std::vector< double > *arg2 = 0 ;
5331   SCM gswig_result;
5332   SWIGUNUSED int gswig_list_p = 0;
5333   
5334   {
5335     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
5336   }
5337   {
5338     arg2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
5339   }
5340   ((nlopt::opt const *)arg1)->get_lower_bounds(*arg2);
5341   gswig_result = SCM_UNSPECIFIED;
5342   
5343   
5344   
5345   return gswig_result;
5346 #undef FUNC_NAME
5347 }
5348
5349
5350 static SCM
5351 _wrap_nlopt_opt_get_lower_bounds__SWIG_1 (int argc, SCM *argv)
5352 {
5353 #define FUNC_NAME "nlopt-opt-get-lower-bounds"
5354   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5355   SCM gswig_result;
5356   SWIGUNUSED int gswig_list_p = 0;
5357   std::vector< double > result;
5358   
5359   {
5360     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
5361   }
5362   result = ((nlopt::opt const *)arg1)->get_lower_bounds();
5363   {
5364     gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
5365     for (unsigned int i=0; i<(&result)->size(); i++) {
5366       SCM x = scm_from_double(((std::vector< double > &)result)[i]);
5367       scm_vector_set_x(gswig_result,scm_from_long(i),x);
5368     }
5369   }
5370   
5371   
5372   return gswig_result;
5373 #undef FUNC_NAME
5374 }
5375
5376
5377 static SCM
5378 _wrap_nlopt_opt_get_lower_bounds(SCM rest)
5379 {
5380 #define FUNC_NAME "nlopt-opt-get-lower-bounds"
5381   SCM argv[2];
5382   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-get-lower-bounds");
5383   if (argc == 1) {
5384     int _v;
5385     {
5386       void *ptr;
5387       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5388       _v = SWIG_CheckState(res);
5389     }
5390     if (_v) {
5391       return _wrap_nlopt_opt_get_lower_bounds__SWIG_1(argc,argv);
5392     }
5393   }
5394   if (argc == 2) {
5395     int _v;
5396     {
5397       void *ptr;
5398       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5399       _v = SWIG_CheckState(res);
5400     }
5401     if (_v) {
5402       {
5403         void *ptr;
5404         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, 0);
5405         _v = SWIG_CheckState(res);
5406       }
5407       if (_v) {
5408         return _wrap_nlopt_opt_get_lower_bounds__SWIG_0(argc,argv);
5409       }
5410     }
5411   }
5412   
5413   scm_misc_error("nlopt-opt-get-lower-bounds", "No matching method for generic function `nlopt_opt_get_lower_bounds'", SCM_EOL);
5414 #undef FUNC_NAME
5415 }
5416
5417
5418 static SCM
5419 _wrap_nlopt_opt_set_lower_bounds__SWIG_1 (int argc, SCM *argv)
5420 {
5421 #define FUNC_NAME "nlopt-opt-set-lower-bounds"
5422   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5423   std::vector< double > *arg2 = 0 ;
5424   std::vector< double > temp2 ;
5425   SCM gswig_result;
5426   SWIGUNUSED int gswig_list_p = 0;
5427   
5428   {
5429     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
5430   }
5431   {
5432     if (scm_is_vector(argv[1])) {
5433       unsigned long size = scm_c_vector_length(argv[1]);
5434       temp2 = std::vector<double >(size);
5435       arg2 = &temp2;
5436       for (unsigned long i=0; i<size; i++) {
5437         SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
5438         if (scm_is_number(o))
5439         temp2[i] = (double)(scm_to_double(o));
5440         else
5441         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
5442       }
5443     } else if (scm_is_null(argv[1])) {
5444       temp2 = std::vector<double >();
5445       arg2 = &temp2;
5446     } else if (scm_is_pair(argv[1])) {
5447       SCM v = scm_vector(argv[1]);
5448       unsigned long size = scm_c_vector_length(v);
5449       temp2 = std::vector<double >(size);
5450       arg2 = &temp2;
5451       for (unsigned long i=0; i<size; i++) {
5452         SCM o = scm_vector_ref(v,scm_from_ulong(i));
5453         if (scm_is_number(o))
5454         temp2[i] = (double)(scm_to_double(o));
5455         else
5456         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
5457       }
5458     } else {
5459       arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
5460     }
5461   }
5462   try {
5463     (arg1)->set_lower_bounds((std::vector< double > const &)*arg2);
5464   }
5465   catch(std::invalid_argument &_e) {
5466     scm_throw(gh_symbol2scm("invalid-argument"), 
5467       scm_list_1(scm_from_locale_string((_e).what())));
5468     
5469   }
5470   
5471   gswig_result = SCM_UNSPECIFIED;
5472   
5473   
5474   
5475   return gswig_result;
5476 #undef FUNC_NAME
5477 }
5478
5479
5480 static SCM
5481 _wrap_nlopt_opt_set_lower_bounds(SCM rest)
5482 {
5483 #define FUNC_NAME "nlopt-opt-set-lower-bounds"
5484   SCM argv[2];
5485   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-set-lower-bounds");
5486   if (argc == 2) {
5487     int _v;
5488     {
5489       void *ptr;
5490       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5491       _v = SWIG_CheckState(res);
5492     }
5493     if (_v) {
5494       {
5495         _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
5496       }
5497       if (_v) {
5498         return _wrap_nlopt_opt_set_lower_bounds__SWIG_0(argc,argv);
5499       }
5500     }
5501   }
5502   if (argc == 2) {
5503     int _v;
5504     {
5505       void *ptr;
5506       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5507       _v = SWIG_CheckState(res);
5508     }
5509     if (_v) {
5510       {
5511         /* native sequence? */
5512         if (scm_is_vector(argv[1])) {
5513           unsigned int size = scm_c_vector_length(argv[1]);
5514           if (size == 0) {
5515             /* an empty sequence can be of any type */
5516             _v = 1;
5517           } else {
5518             /* check the first element only */
5519             double* x;
5520             SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
5521             _v = scm_is_number(o) ? 1 : 0;
5522           }
5523         } else if (scm_is_null(argv[1])) {
5524           /* again, an empty sequence can be of any type */
5525           _v = 1;
5526         } else if (scm_is_pair(argv[1])) {
5527           /* check the first element only */
5528           double* x;
5529           SCM head = SCM_CAR(argv[1]);
5530           _v = scm_is_number(head) ? 1 : 0;
5531         } else {
5532           /* wrapped vector? */
5533           std::vector<double >* v;
5534           _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
5535               SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
5536         }
5537       }
5538       if (_v) {
5539         return _wrap_nlopt_opt_set_lower_bounds__SWIG_1(argc,argv);
5540       }
5541     }
5542   }
5543   
5544   scm_misc_error("nlopt-opt-set-lower-bounds", "No matching method for generic function `nlopt_opt_set_lower_bounds'", SCM_EOL);
5545 #undef FUNC_NAME
5546 }
5547
5548
5549 static SCM
5550 _wrap_nlopt_opt_set_upper_bounds__SWIG_0 (int argc, SCM *argv)
5551 {
5552 #define FUNC_NAME "nlopt-opt-set-upper-bounds"
5553   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5554   double arg2 ;
5555   SCM gswig_result;
5556   SWIGUNUSED int gswig_list_p = 0;
5557   
5558   {
5559     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
5560   }
5561   {
5562     arg2 = (double) scm_to_double(argv[1]);
5563   }
5564   try {
5565     (arg1)->set_upper_bounds(arg2);
5566   }
5567   catch(std::invalid_argument &_e) {
5568     scm_throw(gh_symbol2scm("invalid-argument"), 
5569       scm_list_1(scm_from_locale_string((_e).what())));
5570     
5571   }
5572   
5573   gswig_result = SCM_UNSPECIFIED;
5574   
5575   
5576   return gswig_result;
5577 #undef FUNC_NAME
5578 }
5579
5580
5581 static SCM
5582 _wrap_nlopt_opt_get_upper_bounds__SWIG_0 (int argc, SCM *argv)
5583 {
5584 #define FUNC_NAME "nlopt-opt-get-upper-bounds"
5585   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5586   std::vector< double > *arg2 = 0 ;
5587   SCM gswig_result;
5588   SWIGUNUSED int gswig_list_p = 0;
5589   
5590   {
5591     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
5592   }
5593   {
5594     arg2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
5595   }
5596   ((nlopt::opt const *)arg1)->get_upper_bounds(*arg2);
5597   gswig_result = SCM_UNSPECIFIED;
5598   
5599   
5600   
5601   return gswig_result;
5602 #undef FUNC_NAME
5603 }
5604
5605
5606 static SCM
5607 _wrap_nlopt_opt_get_upper_bounds__SWIG_1 (int argc, SCM *argv)
5608 {
5609 #define FUNC_NAME "nlopt-opt-get-upper-bounds"
5610   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5611   SCM gswig_result;
5612   SWIGUNUSED int gswig_list_p = 0;
5613   std::vector< double > result;
5614   
5615   {
5616     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
5617   }
5618   result = ((nlopt::opt const *)arg1)->get_upper_bounds();
5619   {
5620     gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
5621     for (unsigned int i=0; i<(&result)->size(); i++) {
5622       SCM x = scm_from_double(((std::vector< double > &)result)[i]);
5623       scm_vector_set_x(gswig_result,scm_from_long(i),x);
5624     }
5625   }
5626   
5627   
5628   return gswig_result;
5629 #undef FUNC_NAME
5630 }
5631
5632
5633 static SCM
5634 _wrap_nlopt_opt_get_upper_bounds(SCM rest)
5635 {
5636 #define FUNC_NAME "nlopt-opt-get-upper-bounds"
5637   SCM argv[2];
5638   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-get-upper-bounds");
5639   if (argc == 1) {
5640     int _v;
5641     {
5642       void *ptr;
5643       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5644       _v = SWIG_CheckState(res);
5645     }
5646     if (_v) {
5647       return _wrap_nlopt_opt_get_upper_bounds__SWIG_1(argc,argv);
5648     }
5649   }
5650   if (argc == 2) {
5651     int _v;
5652     {
5653       void *ptr;
5654       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5655       _v = SWIG_CheckState(res);
5656     }
5657     if (_v) {
5658       {
5659         void *ptr;
5660         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, 0);
5661         _v = SWIG_CheckState(res);
5662       }
5663       if (_v) {
5664         return _wrap_nlopt_opt_get_upper_bounds__SWIG_0(argc,argv);
5665       }
5666     }
5667   }
5668   
5669   scm_misc_error("nlopt-opt-get-upper-bounds", "No matching method for generic function `nlopt_opt_get_upper_bounds'", SCM_EOL);
5670 #undef FUNC_NAME
5671 }
5672
5673
5674 static SCM
5675 _wrap_nlopt_opt_set_upper_bounds__SWIG_1 (int argc, SCM *argv)
5676 {
5677 #define FUNC_NAME "nlopt-opt-set-upper-bounds"
5678   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5679   std::vector< double > *arg2 = 0 ;
5680   std::vector< double > temp2 ;
5681   SCM gswig_result;
5682   SWIGUNUSED int gswig_list_p = 0;
5683   
5684   {
5685     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
5686   }
5687   {
5688     if (scm_is_vector(argv[1])) {
5689       unsigned long size = scm_c_vector_length(argv[1]);
5690       temp2 = std::vector<double >(size);
5691       arg2 = &temp2;
5692       for (unsigned long i=0; i<size; i++) {
5693         SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
5694         if (scm_is_number(o))
5695         temp2[i] = (double)(scm_to_double(o));
5696         else
5697         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
5698       }
5699     } else if (scm_is_null(argv[1])) {
5700       temp2 = std::vector<double >();
5701       arg2 = &temp2;
5702     } else if (scm_is_pair(argv[1])) {
5703       SCM v = scm_vector(argv[1]);
5704       unsigned long size = scm_c_vector_length(v);
5705       temp2 = std::vector<double >(size);
5706       arg2 = &temp2;
5707       for (unsigned long i=0; i<size; i++) {
5708         SCM o = scm_vector_ref(v,scm_from_ulong(i));
5709         if (scm_is_number(o))
5710         temp2[i] = (double)(scm_to_double(o));
5711         else
5712         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
5713       }
5714     } else {
5715       arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
5716     }
5717   }
5718   try {
5719     (arg1)->set_upper_bounds((std::vector< double > const &)*arg2);
5720   }
5721   catch(std::invalid_argument &_e) {
5722     scm_throw(gh_symbol2scm("invalid-argument"), 
5723       scm_list_1(scm_from_locale_string((_e).what())));
5724     
5725   }
5726   
5727   gswig_result = SCM_UNSPECIFIED;
5728   
5729   
5730   
5731   return gswig_result;
5732 #undef FUNC_NAME
5733 }
5734
5735
5736 static SCM
5737 _wrap_nlopt_opt_set_upper_bounds(SCM rest)
5738 {
5739 #define FUNC_NAME "nlopt-opt-set-upper-bounds"
5740   SCM argv[2];
5741   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-set-upper-bounds");
5742   if (argc == 2) {
5743     int _v;
5744     {
5745       void *ptr;
5746       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5747       _v = SWIG_CheckState(res);
5748     }
5749     if (_v) {
5750       {
5751         _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
5752       }
5753       if (_v) {
5754         return _wrap_nlopt_opt_set_upper_bounds__SWIG_0(argc,argv);
5755       }
5756     }
5757   }
5758   if (argc == 2) {
5759     int _v;
5760     {
5761       void *ptr;
5762       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
5763       _v = SWIG_CheckState(res);
5764     }
5765     if (_v) {
5766       {
5767         /* native sequence? */
5768         if (scm_is_vector(argv[1])) {
5769           unsigned int size = scm_c_vector_length(argv[1]);
5770           if (size == 0) {
5771             /* an empty sequence can be of any type */
5772             _v = 1;
5773           } else {
5774             /* check the first element only */
5775             double* x;
5776             SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
5777             _v = scm_is_number(o) ? 1 : 0;
5778           }
5779         } else if (scm_is_null(argv[1])) {
5780           /* again, an empty sequence can be of any type */
5781           _v = 1;
5782         } else if (scm_is_pair(argv[1])) {
5783           /* check the first element only */
5784           double* x;
5785           SCM head = SCM_CAR(argv[1]);
5786           _v = scm_is_number(head) ? 1 : 0;
5787         } else {
5788           /* wrapped vector? */
5789           std::vector<double >* v;
5790           _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
5791               SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
5792         }
5793       }
5794       if (_v) {
5795         return _wrap_nlopt_opt_set_upper_bounds__SWIG_1(argc,argv);
5796       }
5797     }
5798   }
5799   
5800   scm_misc_error("nlopt-opt-set-upper-bounds", "No matching method for generic function `nlopt_opt_set_upper_bounds'", SCM_EOL);
5801 #undef FUNC_NAME
5802 }
5803
5804
5805 static SCM
5806 _wrap_nlopt_opt_get_stopval (SCM s_0)
5807 {
5808 #define FUNC_NAME "nlopt-opt-get-stopval"
5809   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5810   SCM gswig_result;
5811   SWIGUNUSED int gswig_list_p = 0;
5812   double result;
5813   
5814   {
5815     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
5816   }
5817   result = (double)((nlopt::opt const *)arg1)->get_stopval();
5818   {
5819     gswig_result = scm_from_double(result);
5820   }
5821   
5822   
5823   return gswig_result;
5824 #undef FUNC_NAME
5825 }
5826
5827
5828 static SCM
5829 _wrap_nlopt_opt_set_stopval (SCM s_0, SCM s_1)
5830 {
5831 #define FUNC_NAME "nlopt-opt-set-stopval"
5832   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5833   double arg2 ;
5834   SCM gswig_result;
5835   SWIGUNUSED int gswig_list_p = 0;
5836   
5837   {
5838     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
5839   }
5840   {
5841     arg2 = (double) scm_to_double(s_1);
5842   }
5843   try {
5844     (arg1)->set_stopval(arg2);
5845   }
5846   catch(std::invalid_argument &_e) {
5847     scm_throw(gh_symbol2scm("invalid-argument"), 
5848       scm_list_1(scm_from_locale_string((_e).what())));
5849     
5850   }
5851   
5852   gswig_result = SCM_UNSPECIFIED;
5853   
5854   
5855   return gswig_result;
5856 #undef FUNC_NAME
5857 }
5858
5859
5860 static SCM
5861 _wrap_nlopt_opt_get_ftol_rel (SCM s_0)
5862 {
5863 #define FUNC_NAME "nlopt-opt-get-ftol-rel"
5864   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5865   SCM gswig_result;
5866   SWIGUNUSED int gswig_list_p = 0;
5867   double result;
5868   
5869   {
5870     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
5871   }
5872   result = (double)((nlopt::opt const *)arg1)->get_ftol_rel();
5873   {
5874     gswig_result = scm_from_double(result);
5875   }
5876   
5877   
5878   return gswig_result;
5879 #undef FUNC_NAME
5880 }
5881
5882
5883 static SCM
5884 _wrap_nlopt_opt_set_ftol_rel (SCM s_0, SCM s_1)
5885 {
5886 #define FUNC_NAME "nlopt-opt-set-ftol-rel"
5887   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5888   double arg2 ;
5889   SCM gswig_result;
5890   SWIGUNUSED int gswig_list_p = 0;
5891   
5892   {
5893     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
5894   }
5895   {
5896     arg2 = (double) scm_to_double(s_1);
5897   }
5898   try {
5899     (arg1)->set_ftol_rel(arg2);
5900   }
5901   catch(std::invalid_argument &_e) {
5902     scm_throw(gh_symbol2scm("invalid-argument"), 
5903       scm_list_1(scm_from_locale_string((_e).what())));
5904     
5905   }
5906   
5907   gswig_result = SCM_UNSPECIFIED;
5908   
5909   
5910   return gswig_result;
5911 #undef FUNC_NAME
5912 }
5913
5914
5915 static SCM
5916 _wrap_nlopt_opt_get_ftol_abs (SCM s_0)
5917 {
5918 #define FUNC_NAME "nlopt-opt-get-ftol-abs"
5919   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5920   SCM gswig_result;
5921   SWIGUNUSED int gswig_list_p = 0;
5922   double result;
5923   
5924   {
5925     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
5926   }
5927   result = (double)((nlopt::opt const *)arg1)->get_ftol_abs();
5928   {
5929     gswig_result = scm_from_double(result);
5930   }
5931   
5932   
5933   return gswig_result;
5934 #undef FUNC_NAME
5935 }
5936
5937
5938 static SCM
5939 _wrap_nlopt_opt_set_ftol_abs (SCM s_0, SCM s_1)
5940 {
5941 #define FUNC_NAME "nlopt-opt-set-ftol-abs"
5942   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5943   double arg2 ;
5944   SCM gswig_result;
5945   SWIGUNUSED int gswig_list_p = 0;
5946   
5947   {
5948     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
5949   }
5950   {
5951     arg2 = (double) scm_to_double(s_1);
5952   }
5953   try {
5954     (arg1)->set_ftol_abs(arg2);
5955   }
5956   catch(std::invalid_argument &_e) {
5957     scm_throw(gh_symbol2scm("invalid-argument"), 
5958       scm_list_1(scm_from_locale_string((_e).what())));
5959     
5960   }
5961   
5962   gswig_result = SCM_UNSPECIFIED;
5963   
5964   
5965   return gswig_result;
5966 #undef FUNC_NAME
5967 }
5968
5969
5970 static SCM
5971 _wrap_nlopt_opt_get_xtol_rel (SCM s_0)
5972 {
5973 #define FUNC_NAME "nlopt-opt-get-xtol-rel"
5974   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5975   SCM gswig_result;
5976   SWIGUNUSED int gswig_list_p = 0;
5977   double result;
5978   
5979   {
5980     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
5981   }
5982   result = (double)((nlopt::opt const *)arg1)->get_xtol_rel();
5983   {
5984     gswig_result = scm_from_double(result);
5985   }
5986   
5987   
5988   return gswig_result;
5989 #undef FUNC_NAME
5990 }
5991
5992
5993 static SCM
5994 _wrap_nlopt_opt_set_xtol_rel (SCM s_0, SCM s_1)
5995 {
5996 #define FUNC_NAME "nlopt-opt-set-xtol-rel"
5997   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
5998   double arg2 ;
5999   SCM gswig_result;
6000   SWIGUNUSED int gswig_list_p = 0;
6001   
6002   {
6003     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6004   }
6005   {
6006     arg2 = (double) scm_to_double(s_1);
6007   }
6008   try {
6009     (arg1)->set_xtol_rel(arg2);
6010   }
6011   catch(std::invalid_argument &_e) {
6012     scm_throw(gh_symbol2scm("invalid-argument"), 
6013       scm_list_1(scm_from_locale_string((_e).what())));
6014     
6015   }
6016   
6017   gswig_result = SCM_UNSPECIFIED;
6018   
6019   
6020   return gswig_result;
6021 #undef FUNC_NAME
6022 }
6023
6024
6025 static SCM
6026 _wrap_nlopt_opt_set_xtol_abs__SWIG_0 (int argc, SCM *argv)
6027 {
6028 #define FUNC_NAME "nlopt-opt-set-xtol-abs"
6029   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6030   double arg2 ;
6031   SCM gswig_result;
6032   SWIGUNUSED int gswig_list_p = 0;
6033   
6034   {
6035     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
6036   }
6037   {
6038     arg2 = (double) scm_to_double(argv[1]);
6039   }
6040   try {
6041     (arg1)->set_xtol_abs(arg2);
6042   }
6043   catch(std::invalid_argument &_e) {
6044     scm_throw(gh_symbol2scm("invalid-argument"), 
6045       scm_list_1(scm_from_locale_string((_e).what())));
6046     
6047   }
6048   
6049   gswig_result = SCM_UNSPECIFIED;
6050   
6051   
6052   return gswig_result;
6053 #undef FUNC_NAME
6054 }
6055
6056
6057 static SCM
6058 _wrap_nlopt_opt_get_xtol_abs__SWIG_0 (int argc, SCM *argv)
6059 {
6060 #define FUNC_NAME "nlopt-opt-get-xtol-abs"
6061   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6062   std::vector< double > *arg2 = 0 ;
6063   SCM gswig_result;
6064   SWIGUNUSED int gswig_list_p = 0;
6065   
6066   {
6067     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
6068   }
6069   {
6070     arg2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
6071   }
6072   ((nlopt::opt const *)arg1)->get_xtol_abs(*arg2);
6073   gswig_result = SCM_UNSPECIFIED;
6074   
6075   
6076   
6077   return gswig_result;
6078 #undef FUNC_NAME
6079 }
6080
6081
6082 static SCM
6083 _wrap_nlopt_opt_get_xtol_abs__SWIG_1 (int argc, SCM *argv)
6084 {
6085 #define FUNC_NAME "nlopt-opt-get-xtol-abs"
6086   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6087   SCM gswig_result;
6088   SWIGUNUSED int gswig_list_p = 0;
6089   std::vector< double > result;
6090   
6091   {
6092     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
6093   }
6094   result = ((nlopt::opt const *)arg1)->get_xtol_abs();
6095   {
6096     gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
6097     for (unsigned int i=0; i<(&result)->size(); i++) {
6098       SCM x = scm_from_double(((std::vector< double > &)result)[i]);
6099       scm_vector_set_x(gswig_result,scm_from_long(i),x);
6100     }
6101   }
6102   
6103   
6104   return gswig_result;
6105 #undef FUNC_NAME
6106 }
6107
6108
6109 static SCM
6110 _wrap_nlopt_opt_get_xtol_abs(SCM rest)
6111 {
6112 #define FUNC_NAME "nlopt-opt-get-xtol-abs"
6113   SCM argv[2];
6114   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-get-xtol-abs");
6115   if (argc == 1) {
6116     int _v;
6117     {
6118       void *ptr;
6119       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
6120       _v = SWIG_CheckState(res);
6121     }
6122     if (_v) {
6123       return _wrap_nlopt_opt_get_xtol_abs__SWIG_1(argc,argv);
6124     }
6125   }
6126   if (argc == 2) {
6127     int _v;
6128     {
6129       void *ptr;
6130       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
6131       _v = SWIG_CheckState(res);
6132     }
6133     if (_v) {
6134       {
6135         void *ptr;
6136         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, 0);
6137         _v = SWIG_CheckState(res);
6138       }
6139       if (_v) {
6140         return _wrap_nlopt_opt_get_xtol_abs__SWIG_0(argc,argv);
6141       }
6142     }
6143   }
6144   
6145   scm_misc_error("nlopt-opt-get-xtol-abs", "No matching method for generic function `nlopt_opt_get_xtol_abs'", SCM_EOL);
6146 #undef FUNC_NAME
6147 }
6148
6149
6150 static SCM
6151 _wrap_nlopt_opt_set_xtol_abs__SWIG_1 (int argc, SCM *argv)
6152 {
6153 #define FUNC_NAME "nlopt-opt-set-xtol-abs"
6154   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6155   std::vector< double > *arg2 = 0 ;
6156   std::vector< double > temp2 ;
6157   SCM gswig_result;
6158   SWIGUNUSED int gswig_list_p = 0;
6159   
6160   {
6161     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
6162   }
6163   {
6164     if (scm_is_vector(argv[1])) {
6165       unsigned long size = scm_c_vector_length(argv[1]);
6166       temp2 = std::vector<double >(size);
6167       arg2 = &temp2;
6168       for (unsigned long i=0; i<size; i++) {
6169         SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
6170         if (scm_is_number(o))
6171         temp2[i] = (double)(scm_to_double(o));
6172         else
6173         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
6174       }
6175     } else if (scm_is_null(argv[1])) {
6176       temp2 = std::vector<double >();
6177       arg2 = &temp2;
6178     } else if (scm_is_pair(argv[1])) {
6179       SCM v = scm_vector(argv[1]);
6180       unsigned long size = scm_c_vector_length(v);
6181       temp2 = std::vector<double >(size);
6182       arg2 = &temp2;
6183       for (unsigned long i=0; i<size; i++) {
6184         SCM o = scm_vector_ref(v,scm_from_ulong(i));
6185         if (scm_is_number(o))
6186         temp2[i] = (double)(scm_to_double(o));
6187         else
6188         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
6189       }
6190     } else {
6191       arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
6192     }
6193   }
6194   try {
6195     (arg1)->set_xtol_abs((std::vector< double > const &)*arg2);
6196   }
6197   catch(std::invalid_argument &_e) {
6198     scm_throw(gh_symbol2scm("invalid-argument"), 
6199       scm_list_1(scm_from_locale_string((_e).what())));
6200     
6201   }
6202   
6203   gswig_result = SCM_UNSPECIFIED;
6204   
6205   
6206   
6207   return gswig_result;
6208 #undef FUNC_NAME
6209 }
6210
6211
6212 static SCM
6213 _wrap_nlopt_opt_set_xtol_abs(SCM rest)
6214 {
6215 #define FUNC_NAME "nlopt-opt-set-xtol-abs"
6216   SCM argv[2];
6217   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-set-xtol-abs");
6218   if (argc == 2) {
6219     int _v;
6220     {
6221       void *ptr;
6222       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
6223       _v = SWIG_CheckState(res);
6224     }
6225     if (_v) {
6226       {
6227         _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
6228       }
6229       if (_v) {
6230         return _wrap_nlopt_opt_set_xtol_abs__SWIG_0(argc,argv);
6231       }
6232     }
6233   }
6234   if (argc == 2) {
6235     int _v;
6236     {
6237       void *ptr;
6238       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
6239       _v = SWIG_CheckState(res);
6240     }
6241     if (_v) {
6242       {
6243         /* native sequence? */
6244         if (scm_is_vector(argv[1])) {
6245           unsigned int size = scm_c_vector_length(argv[1]);
6246           if (size == 0) {
6247             /* an empty sequence can be of any type */
6248             _v = 1;
6249           } else {
6250             /* check the first element only */
6251             double* x;
6252             SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
6253             _v = scm_is_number(o) ? 1 : 0;
6254           }
6255         } else if (scm_is_null(argv[1])) {
6256           /* again, an empty sequence can be of any type */
6257           _v = 1;
6258         } else if (scm_is_pair(argv[1])) {
6259           /* check the first element only */
6260           double* x;
6261           SCM head = SCM_CAR(argv[1]);
6262           _v = scm_is_number(head) ? 1 : 0;
6263         } else {
6264           /* wrapped vector? */
6265           std::vector<double >* v;
6266           _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
6267               SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
6268         }
6269       }
6270       if (_v) {
6271         return _wrap_nlopt_opt_set_xtol_abs__SWIG_1(argc,argv);
6272       }
6273     }
6274   }
6275   
6276   scm_misc_error("nlopt-opt-set-xtol-abs", "No matching method for generic function `nlopt_opt_set_xtol_abs'", SCM_EOL);
6277 #undef FUNC_NAME
6278 }
6279
6280
6281 static SCM
6282 _wrap_nlopt_opt_get_maxeval (SCM s_0)
6283 {
6284 #define FUNC_NAME "nlopt-opt-get-maxeval"
6285   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6286   SCM gswig_result;
6287   SWIGUNUSED int gswig_list_p = 0;
6288   int result;
6289   
6290   {
6291     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6292   }
6293   result = (int)((nlopt::opt const *)arg1)->get_maxeval();
6294   {
6295     gswig_result = scm_from_long(result);
6296   }
6297   
6298   
6299   return gswig_result;
6300 #undef FUNC_NAME
6301 }
6302
6303
6304 static SCM
6305 _wrap_nlopt_opt_set_maxeval (SCM s_0, SCM s_1)
6306 {
6307 #define FUNC_NAME "nlopt-opt-set-maxeval"
6308   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6309   int arg2 ;
6310   SCM gswig_result;
6311   SWIGUNUSED int gswig_list_p = 0;
6312   
6313   {
6314     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6315   }
6316   {
6317     arg2 = (int) scm_to_int(s_1);
6318   }
6319   try {
6320     (arg1)->set_maxeval(arg2);
6321   }
6322   catch(std::invalid_argument &_e) {
6323     scm_throw(gh_symbol2scm("invalid-argument"), 
6324       scm_list_1(scm_from_locale_string((_e).what())));
6325     
6326   }
6327   
6328   gswig_result = SCM_UNSPECIFIED;
6329   
6330   
6331   return gswig_result;
6332 #undef FUNC_NAME
6333 }
6334
6335
6336 static SCM
6337 _wrap_nlopt_opt_get_maxtime (SCM s_0)
6338 {
6339 #define FUNC_NAME "nlopt-opt-get-maxtime"
6340   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6341   SCM gswig_result;
6342   SWIGUNUSED int gswig_list_p = 0;
6343   double result;
6344   
6345   {
6346     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6347   }
6348   result = (double)((nlopt::opt const *)arg1)->get_maxtime();
6349   {
6350     gswig_result = scm_from_double(result);
6351   }
6352   
6353   
6354   return gswig_result;
6355 #undef FUNC_NAME
6356 }
6357
6358
6359 static SCM
6360 _wrap_nlopt_opt_set_maxtime (SCM s_0, SCM s_1)
6361 {
6362 #define FUNC_NAME "nlopt-opt-set-maxtime"
6363   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6364   double arg2 ;
6365   SCM gswig_result;
6366   SWIGUNUSED int gswig_list_p = 0;
6367   
6368   {
6369     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6370   }
6371   {
6372     arg2 = (double) scm_to_double(s_1);
6373   }
6374   try {
6375     (arg1)->set_maxtime(arg2);
6376   }
6377   catch(std::invalid_argument &_e) {
6378     scm_throw(gh_symbol2scm("invalid-argument"), 
6379       scm_list_1(scm_from_locale_string((_e).what())));
6380     
6381   }
6382   
6383   gswig_result = SCM_UNSPECIFIED;
6384   
6385   
6386   return gswig_result;
6387 #undef FUNC_NAME
6388 }
6389
6390
6391 static SCM
6392 _wrap_nlopt_opt_get_force_stop (SCM s_0)
6393 {
6394 #define FUNC_NAME "nlopt-opt-get-force-stop"
6395   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6396   SCM gswig_result;
6397   SWIGUNUSED int gswig_list_p = 0;
6398   int result;
6399   
6400   {
6401     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6402   }
6403   result = (int)((nlopt::opt const *)arg1)->get_force_stop();
6404   {
6405     gswig_result = scm_from_long(result);
6406   }
6407   
6408   
6409   return gswig_result;
6410 #undef FUNC_NAME
6411 }
6412
6413
6414 static SCM
6415 _wrap_nlopt_opt_set_force_stop (SCM s_0, SCM s_1)
6416 {
6417 #define FUNC_NAME "nlopt-opt-set-force-stop"
6418   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6419   int arg2 ;
6420   SCM gswig_result;
6421   SWIGUNUSED int gswig_list_p = 0;
6422   
6423   {
6424     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6425   }
6426   {
6427     arg2 = (int) scm_to_int(s_1);
6428   }
6429   try {
6430     (arg1)->set_force_stop(arg2);
6431   }
6432   catch(std::invalid_argument &_e) {
6433     scm_throw(gh_symbol2scm("invalid-argument"), 
6434       scm_list_1(scm_from_locale_string((_e).what())));
6435     
6436   }
6437   
6438   gswig_result = SCM_UNSPECIFIED;
6439   
6440   
6441   return gswig_result;
6442 #undef FUNC_NAME
6443 }
6444
6445
6446 static SCM
6447 _wrap_nlopt_opt_force_stop (SCM s_0)
6448 {
6449 #define FUNC_NAME "nlopt-opt-force-stop"
6450   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6451   SCM gswig_result;
6452   SWIGUNUSED int gswig_list_p = 0;
6453   
6454   {
6455     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6456   }
6457   try {
6458     (arg1)->force_stop();
6459   }
6460   catch(std::invalid_argument &_e) {
6461     scm_throw(gh_symbol2scm("invalid-argument"), 
6462       scm_list_1(scm_from_locale_string((_e).what())));
6463     
6464   }
6465   
6466   gswig_result = SCM_UNSPECIFIED;
6467   
6468   
6469   return gswig_result;
6470 #undef FUNC_NAME
6471 }
6472
6473
6474 static SCM
6475 _wrap_nlopt_opt_set_local_optimizer (SCM s_0, SCM s_1)
6476 {
6477 #define FUNC_NAME "nlopt-opt-set-local-optimizer"
6478   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6479   nlopt::opt *arg2 = 0 ;
6480   SCM gswig_result;
6481   SWIGUNUSED int gswig_list_p = 0;
6482   
6483   {
6484     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6485   }
6486   {
6487     arg2 = (nlopt::opt *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_nlopt__opt, 2, 0);
6488   }
6489   try {
6490     (arg1)->set_local_optimizer((nlopt::opt const &)*arg2);
6491   }
6492   catch(std::bad_alloc &_e) {
6493     scm_throw(gh_symbol2scm("bad-alloc"), 
6494       scm_list_1(scm_from_locale_string((_e).what())));
6495     
6496   }
6497   catch(std::invalid_argument &_e) {
6498     scm_throw(gh_symbol2scm("invalid-argument"), 
6499       scm_list_1(scm_from_locale_string((_e).what())));
6500     
6501   }
6502   
6503   gswig_result = SCM_UNSPECIFIED;
6504   
6505   
6506   
6507   return gswig_result;
6508 #undef FUNC_NAME
6509 }
6510
6511
6512 static SCM
6513 _wrap_nlopt_opt_get_population (SCM s_0)
6514 {
6515 #define FUNC_NAME "nlopt-opt-get-population"
6516   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6517   SCM gswig_result;
6518   SWIGUNUSED int gswig_list_p = 0;
6519   unsigned int result;
6520   
6521   {
6522     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6523   }
6524   result = (unsigned int)((nlopt::opt const *)arg1)->get_population();
6525   {
6526     gswig_result = scm_from_ulong(result);
6527   }
6528   
6529   
6530   return gswig_result;
6531 #undef FUNC_NAME
6532 }
6533
6534
6535 static SCM
6536 _wrap_nlopt_opt_set_population (SCM s_0, SCM s_1)
6537 {
6538 #define FUNC_NAME "nlopt-opt-set-population"
6539   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6540   unsigned int arg2 ;
6541   SCM gswig_result;
6542   SWIGUNUSED int gswig_list_p = 0;
6543   
6544   {
6545     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6546   }
6547   {
6548     arg2 = (unsigned int) scm_to_uint(s_1);
6549   }
6550   try {
6551     (arg1)->set_population(arg2);
6552   }
6553   catch(std::invalid_argument &_e) {
6554     scm_throw(gh_symbol2scm("invalid-argument"), 
6555       scm_list_1(scm_from_locale_string((_e).what())));
6556     
6557   }
6558   
6559   gswig_result = SCM_UNSPECIFIED;
6560   
6561   
6562   return gswig_result;
6563 #undef FUNC_NAME
6564 }
6565
6566
6567 static SCM
6568 _wrap_nlopt_opt_get_vector_storage (SCM s_0)
6569 {
6570 #define FUNC_NAME "nlopt-opt-get-vector-storage"
6571   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6572   SCM gswig_result;
6573   SWIGUNUSED int gswig_list_p = 0;
6574   unsigned int result;
6575   
6576   {
6577     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6578   }
6579   result = (unsigned int)((nlopt::opt const *)arg1)->get_vector_storage();
6580   {
6581     gswig_result = scm_from_ulong(result);
6582   }
6583   
6584   
6585   return gswig_result;
6586 #undef FUNC_NAME
6587 }
6588
6589
6590 static SCM
6591 _wrap_nlopt_opt_set_vector_storage (SCM s_0, SCM s_1)
6592 {
6593 #define FUNC_NAME "nlopt-opt-set-vector-storage"
6594   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6595   unsigned int arg2 ;
6596   SCM gswig_result;
6597   SWIGUNUSED int gswig_list_p = 0;
6598   
6599   {
6600     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6601   }
6602   {
6603     arg2 = (unsigned int) scm_to_uint(s_1);
6604   }
6605   try {
6606     (arg1)->set_vector_storage(arg2);
6607   }
6608   catch(std::invalid_argument &_e) {
6609     scm_throw(gh_symbol2scm("invalid-argument"), 
6610       scm_list_1(scm_from_locale_string((_e).what())));
6611     
6612   }
6613   
6614   gswig_result = SCM_UNSPECIFIED;
6615   
6616   
6617   return gswig_result;
6618 #undef FUNC_NAME
6619 }
6620
6621
6622 static SCM
6623 _wrap_nlopt_opt_set_initial_step__SWIG_0 (int argc, SCM *argv)
6624 {
6625 #define FUNC_NAME "nlopt-opt-set-initial-step"
6626   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6627   double arg2 ;
6628   SCM gswig_result;
6629   SWIGUNUSED int gswig_list_p = 0;
6630   
6631   {
6632     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
6633   }
6634   {
6635     arg2 = (double) scm_to_double(argv[1]);
6636   }
6637   try {
6638     (arg1)->set_initial_step(arg2);
6639   }
6640   catch(std::invalid_argument &_e) {
6641     scm_throw(gh_symbol2scm("invalid-argument"), 
6642       scm_list_1(scm_from_locale_string((_e).what())));
6643     
6644   }
6645   
6646   gswig_result = SCM_UNSPECIFIED;
6647   
6648   
6649   return gswig_result;
6650 #undef FUNC_NAME
6651 }
6652
6653
6654 static SCM
6655 _wrap_nlopt_opt_get_initial_step__SWIG_0 (int argc, SCM *argv)
6656 {
6657 #define FUNC_NAME "nlopt-opt-get-initial-step"
6658   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6659   std::vector< double > *arg2 = 0 ;
6660   SCM gswig_result;
6661   SWIGUNUSED int gswig_list_p = 0;
6662   
6663   {
6664     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
6665   }
6666   {
6667     arg2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
6668   }
6669   ((nlopt::opt const *)arg1)->get_initial_step(*arg2);
6670   gswig_result = SCM_UNSPECIFIED;
6671   
6672   
6673   
6674   return gswig_result;
6675 #undef FUNC_NAME
6676 }
6677
6678
6679 static SCM
6680 _wrap_nlopt_opt_get_initial_step__SWIG_1 (int argc, SCM *argv)
6681 {
6682 #define FUNC_NAME "nlopt-opt-get-initial-step"
6683   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6684   SCM gswig_result;
6685   SWIGUNUSED int gswig_list_p = 0;
6686   std::vector< double > result;
6687   
6688   {
6689     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
6690   }
6691   result = ((nlopt::opt const *)arg1)->get_initial_step();
6692   {
6693     gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
6694     for (unsigned int i=0; i<(&result)->size(); i++) {
6695       SCM x = scm_from_double(((std::vector< double > &)result)[i]);
6696       scm_vector_set_x(gswig_result,scm_from_long(i),x);
6697     }
6698   }
6699   
6700   
6701   return gswig_result;
6702 #undef FUNC_NAME
6703 }
6704
6705
6706 static SCM
6707 _wrap_nlopt_opt_set_initial_step__SWIG_1 (int argc, SCM *argv)
6708 {
6709 #define FUNC_NAME "nlopt-opt-set-initial-step"
6710   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6711   std::vector< double > *arg2 = 0 ;
6712   std::vector< double > temp2 ;
6713   SCM gswig_result;
6714   SWIGUNUSED int gswig_list_p = 0;
6715   
6716   {
6717     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
6718   }
6719   {
6720     if (scm_is_vector(argv[1])) {
6721       unsigned long size = scm_c_vector_length(argv[1]);
6722       temp2 = std::vector<double >(size);
6723       arg2 = &temp2;
6724       for (unsigned long i=0; i<size; i++) {
6725         SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
6726         if (scm_is_number(o))
6727         temp2[i] = (double)(scm_to_double(o));
6728         else
6729         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
6730       }
6731     } else if (scm_is_null(argv[1])) {
6732       temp2 = std::vector<double >();
6733       arg2 = &temp2;
6734     } else if (scm_is_pair(argv[1])) {
6735       SCM v = scm_vector(argv[1]);
6736       unsigned long size = scm_c_vector_length(v);
6737       temp2 = std::vector<double >(size);
6738       arg2 = &temp2;
6739       for (unsigned long i=0; i<size; i++) {
6740         SCM o = scm_vector_ref(v,scm_from_ulong(i));
6741         if (scm_is_number(o))
6742         temp2[i] = (double)(scm_to_double(o));
6743         else
6744         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
6745       }
6746     } else {
6747       arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
6748     }
6749   }
6750   try {
6751     (arg1)->set_initial_step((std::vector< double > const &)*arg2);
6752   }
6753   catch(std::invalid_argument &_e) {
6754     scm_throw(gh_symbol2scm("invalid-argument"), 
6755       scm_list_1(scm_from_locale_string((_e).what())));
6756     
6757   }
6758   
6759   gswig_result = SCM_UNSPECIFIED;
6760   
6761   
6762   
6763   return gswig_result;
6764 #undef FUNC_NAME
6765 }
6766
6767
6768 static SCM
6769 _wrap_nlopt_opt_set_initial_step(SCM rest)
6770 {
6771 #define FUNC_NAME "nlopt-opt-set-initial-step"
6772   SCM argv[2];
6773   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-set-initial-step");
6774   if (argc == 2) {
6775     int _v;
6776     {
6777       void *ptr;
6778       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
6779       _v = SWIG_CheckState(res);
6780     }
6781     if (_v) {
6782       {
6783         _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
6784       }
6785       if (_v) {
6786         return _wrap_nlopt_opt_set_initial_step__SWIG_0(argc,argv);
6787       }
6788     }
6789   }
6790   if (argc == 2) {
6791     int _v;
6792     {
6793       void *ptr;
6794       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
6795       _v = SWIG_CheckState(res);
6796     }
6797     if (_v) {
6798       {
6799         /* native sequence? */
6800         if (scm_is_vector(argv[1])) {
6801           unsigned int size = scm_c_vector_length(argv[1]);
6802           if (size == 0) {
6803             /* an empty sequence can be of any type */
6804             _v = 1;
6805           } else {
6806             /* check the first element only */
6807             double* x;
6808             SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
6809             _v = scm_is_number(o) ? 1 : 0;
6810           }
6811         } else if (scm_is_null(argv[1])) {
6812           /* again, an empty sequence can be of any type */
6813           _v = 1;
6814         } else if (scm_is_pair(argv[1])) {
6815           /* check the first element only */
6816           double* x;
6817           SCM head = SCM_CAR(argv[1]);
6818           _v = scm_is_number(head) ? 1 : 0;
6819         } else {
6820           /* wrapped vector? */
6821           std::vector<double >* v;
6822           _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
6823               SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
6824         }
6825       }
6826       if (_v) {
6827         return _wrap_nlopt_opt_set_initial_step__SWIG_1(argc,argv);
6828       }
6829     }
6830   }
6831   
6832   scm_misc_error("nlopt-opt-set-initial-step", "No matching method for generic function `nlopt_opt_set_initial_step'", SCM_EOL);
6833 #undef FUNC_NAME
6834 }
6835
6836
6837 static SCM
6838 _wrap_nlopt_opt_set_default_initial_step (SCM s_0, SCM s_1)
6839 {
6840 #define FUNC_NAME "nlopt-opt-set-default-initial-step"
6841   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6842   std::vector< double > *arg2 = 0 ;
6843   std::vector< double > temp2 ;
6844   SCM gswig_result;
6845   SWIGUNUSED int gswig_list_p = 0;
6846   
6847   {
6848     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
6849   }
6850   {
6851     if (scm_is_vector(s_1)) {
6852       unsigned long size = scm_c_vector_length(s_1);
6853       temp2 = std::vector<double >(size);
6854       arg2 = &temp2;
6855       for (unsigned long i=0; i<size; i++) {
6856         SCM o = scm_vector_ref(s_1,scm_from_ulong(i));
6857         if (scm_is_number(o))
6858         temp2[i] = (double)(scm_to_double(o));
6859         else
6860         scm_wrong_type_arg(FUNC_NAME, 2, s_1);
6861       }
6862     } else if (scm_is_null(s_1)) {
6863       temp2 = std::vector<double >();
6864       arg2 = &temp2;
6865     } else if (scm_is_pair(s_1)) {
6866       SCM v = scm_vector(s_1);
6867       unsigned long size = scm_c_vector_length(v);
6868       temp2 = std::vector<double >(size);
6869       arg2 = &temp2;
6870       for (unsigned long i=0; i<size; i++) {
6871         SCM o = scm_vector_ref(v,scm_from_ulong(i));
6872         if (scm_is_number(o))
6873         temp2[i] = (double)(scm_to_double(o));
6874         else
6875         scm_wrong_type_arg(FUNC_NAME, 2, s_1);
6876       }
6877     } else {
6878       arg2 = (std::vector< double > *) SWIG_MustGetPtr(s_1,SWIGTYPE_p_std__vectorT_double_t,2, 0);
6879     }
6880   }
6881   try {
6882     (arg1)->set_default_initial_step((std::vector< double > const &)*arg2);
6883   }
6884   catch(std::bad_alloc &_e) {
6885     scm_throw(gh_symbol2scm("bad-alloc"), 
6886       scm_list_1(scm_from_locale_string((_e).what())));
6887     
6888   }
6889   catch(std::invalid_argument &_e) {
6890     scm_throw(gh_symbol2scm("invalid-argument"), 
6891       scm_list_1(scm_from_locale_string((_e).what())));
6892     
6893   }
6894   
6895   gswig_result = SCM_UNSPECIFIED;
6896   
6897   
6898   
6899   return gswig_result;
6900 #undef FUNC_NAME
6901 }
6902
6903
6904 static SCM
6905 _wrap_nlopt_opt_get_initial_step__SWIG_2 (int argc, SCM *argv)
6906 {
6907 #define FUNC_NAME "nlopt-opt-get-initial-step"
6908   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
6909   std::vector< double > *arg2 = 0 ;
6910   std::vector< double > *arg3 = 0 ;
6911   std::vector< double > temp2 ;
6912   SCM gswig_result;
6913   SWIGUNUSED int gswig_list_p = 0;
6914   
6915   {
6916     arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
6917   }
6918   {
6919     if (scm_is_vector(argv[1])) {
6920       unsigned long size = scm_c_vector_length(argv[1]);
6921       temp2 = std::vector<double >(size);
6922       arg2 = &temp2;
6923       for (unsigned long i=0; i<size; i++) {
6924         SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
6925         if (scm_is_number(o))
6926         temp2[i] = (double)(scm_to_double(o));
6927         else
6928         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
6929       }
6930     } else if (scm_is_null(argv[1])) {
6931       temp2 = std::vector<double >();
6932       arg2 = &temp2;
6933     } else if (scm_is_pair(argv[1])) {
6934       SCM v = scm_vector(argv[1]);
6935       unsigned long size = scm_c_vector_length(v);
6936       temp2 = std::vector<double >(size);
6937       arg2 = &temp2;
6938       for (unsigned long i=0; i<size; i++) {
6939         SCM o = scm_vector_ref(v,scm_from_ulong(i));
6940         if (scm_is_number(o))
6941         temp2[i] = (double)(scm_to_double(o));
6942         else
6943         scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
6944       }
6945     } else {
6946       arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
6947     }
6948   }
6949   {
6950     arg3 = (std::vector< double > *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_std__vectorT_double_t, 3, 0);
6951   }
6952   ((nlopt::opt const *)arg1)->get_initial_step((std::vector< double > const &)*arg2,*arg3);
6953   gswig_result = SCM_UNSPECIFIED;
6954   
6955   
6956   
6957   
6958   return gswig_result;
6959 #undef FUNC_NAME
6960 }
6961
6962
6963 static SCM
6964 _wrap_nlopt_opt_get_initial_step(SCM rest)
6965 {
6966 #define FUNC_NAME "nlopt-opt-get-initial-step"
6967   SCM argv[3];
6968   int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "nlopt-opt-get-initial-step");
6969   if (argc == 1) {
6970     int _v;
6971     {
6972       void *ptr;
6973       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
6974       _v = SWIG_CheckState(res);
6975     }
6976     if (_v) {
6977       return _wrap_nlopt_opt_get_initial_step__SWIG_1(argc,argv);
6978     }
6979   }
6980   if (argc == 2) {
6981     int _v;
6982     {
6983       void *ptr;
6984       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
6985       _v = SWIG_CheckState(res);
6986     }
6987     if (_v) {
6988       {
6989         void *ptr;
6990         int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, 0);
6991         _v = SWIG_CheckState(res);
6992       }
6993       if (_v) {
6994         return _wrap_nlopt_opt_get_initial_step__SWIG_0(argc,argv);
6995       }
6996     }
6997   }
6998   if (argc == 3) {
6999     int _v;
7000     {
7001       void *ptr;
7002       int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
7003       _v = SWIG_CheckState(res);
7004     }
7005     if (_v) {
7006       {
7007         /* native sequence? */
7008         if (scm_is_vector(argv[1])) {
7009           unsigned int size = scm_c_vector_length(argv[1]);
7010           if (size == 0) {
7011             /* an empty sequence can be of any type */
7012             _v = 1;
7013           } else {
7014             /* check the first element only */
7015             double* x;
7016             SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
7017             _v = scm_is_number(o) ? 1 : 0;
7018           }
7019         } else if (scm_is_null(argv[1])) {
7020           /* again, an empty sequence can be of any type */
7021           _v = 1;
7022         } else if (scm_is_pair(argv[1])) {
7023           /* check the first element only */
7024           double* x;
7025           SCM head = SCM_CAR(argv[1]);
7026           _v = scm_is_number(head) ? 1 : 0;
7027         } else {
7028           /* wrapped vector? */
7029           std::vector<double >* v;
7030           _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
7031               SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
7032         }
7033       }
7034       if (_v) {
7035         {
7036           void *ptr;
7037           int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_std__vectorT_double_t, 0);
7038           _v = SWIG_CheckState(res);
7039         }
7040         if (_v) {
7041           return _wrap_nlopt_opt_get_initial_step__SWIG_2(argc,argv);
7042         }
7043       }
7044     }
7045   }
7046   
7047   scm_misc_error("nlopt-opt-get-initial-step", "No matching method for generic function `nlopt_opt_get_initial_step'", SCM_EOL);
7048 #undef FUNC_NAME
7049 }
7050
7051
7052 static SCM
7053 _wrap_nlopt_opt_get_initial_step_ (SCM s_0, SCM s_1)
7054 {
7055 #define FUNC_NAME "nlopt-opt-get-initial-step-"
7056   nlopt::opt *arg1 = (nlopt::opt *) 0 ;
7057   std::vector< double > *arg2 = 0 ;
7058   std::vector< double > temp2 ;
7059   SCM gswig_result;
7060   SWIGUNUSED int gswig_list_p = 0;
7061   std::vector< double > result;
7062   
7063   {
7064     arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
7065   }
7066   {
7067     if (scm_is_vector(s_1)) {
7068       unsigned long size = scm_c_vector_length(s_1);
7069       temp2 = std::vector<double >(size);
7070       arg2 = &temp2;
7071       for (unsigned long i=0; i<size; i++) {
7072         SCM o = scm_vector_ref(s_1,scm_from_ulong(i));
7073         if (scm_is_number(o))
7074         temp2[i] = (double)(scm_to_double(o));
7075         else
7076         scm_wrong_type_arg(FUNC_NAME, 2, s_1);
7077       }
7078     } else if (scm_is_null(s_1)) {
7079       temp2 = std::vector<double >();
7080       arg2 = &temp2;
7081     } else if (scm_is_pair(s_1)) {
7082       SCM v = scm_vector(s_1);
7083       unsigned long size = scm_c_vector_length(v);
7084       temp2 = std::vector<double >(size);
7085       arg2 = &temp2;
7086       for (unsigned long i=0; i<size; i++) {
7087         SCM o = scm_vector_ref(v,scm_from_ulong(i));
7088         if (scm_is_number(o))
7089         temp2[i] = (double)(scm_to_double(o));
7090         else
7091         scm_wrong_type_arg(FUNC_NAME, 2, s_1);
7092       }
7093     } else {
7094       arg2 = (std::vector< double > *) SWIG_MustGetPtr(s_1,SWIGTYPE_p_std__vectorT_double_t,2, 0);
7095     }
7096   }
7097   result = ((nlopt::opt const *)arg1)->get_initial_step_((std::vector< double > const &)*arg2);
7098   {
7099     gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
7100     for (unsigned int i=0; i<(&result)->size(); i++) {
7101       SCM x = scm_from_double(((std::vector< double > &)result)[i]);
7102       scm_vector_set_x(gswig_result,scm_from_long(i),x);
7103     }
7104   }
7105   
7106   
7107   
7108   return gswig_result;
7109 #undef FUNC_NAME
7110 }
7111
7112
7113 static SCM
7114 _wrap_nlopt_srand (SCM s_0)
7115 {
7116 #define FUNC_NAME "nlopt-srand"
7117   unsigned long arg1 ;
7118   SCM gswig_result;
7119   SWIGUNUSED int gswig_list_p = 0;
7120   
7121   {
7122     arg1 = (unsigned long) scm_to_ulong(s_0);
7123   }
7124   nlopt::srand(arg1);
7125   gswig_result = SCM_UNSPECIFIED;
7126   
7127   return gswig_result;
7128 #undef FUNC_NAME
7129 }
7130
7131
7132 static SCM
7133 _wrap_nlopt_srand_time ()
7134 {
7135 #define FUNC_NAME "nlopt-srand-time"
7136   SCM gswig_result;
7137   SWIGUNUSED int gswig_list_p = 0;
7138   
7139   nlopt::srand_time();
7140   gswig_result = SCM_UNSPECIFIED;
7141   
7142   return gswig_result;
7143 #undef FUNC_NAME
7144 }
7145
7146
7147 static SCM
7148 _wrap_nlopt_version (SCM s_0, SCM s_1, SCM s_2)
7149 {
7150 #define FUNC_NAME "nlopt-version"
7151   int *arg1 = 0 ;
7152   int *arg2 = 0 ;
7153   int *arg3 = 0 ;
7154   SCM gswig_result;
7155   SWIGUNUSED int gswig_list_p = 0;
7156   
7157   {
7158     arg1 = (int *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_int, 1, 0);
7159   }
7160   {
7161     arg2 = (int *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_int, 2, 0);
7162   }
7163   {
7164     arg3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0);
7165   }
7166   nlopt::version(*arg1,*arg2,*arg3);
7167   gswig_result = SCM_UNSPECIFIED;
7168   
7169   
7170   
7171   
7172   return gswig_result;
7173 #undef FUNC_NAME
7174 }
7175
7176
7177 static SCM
7178 _wrap_nlopt_version_major ()
7179 {
7180 #define FUNC_NAME "nlopt-version-major"
7181   SCM gswig_result;
7182   SWIGUNUSED int gswig_list_p = 0;
7183   int result;
7184   
7185   result = (int)nlopt::version_major();
7186   {
7187     gswig_result = scm_from_long(result);
7188   }
7189   
7190   return gswig_result;
7191 #undef FUNC_NAME
7192 }
7193
7194
7195 static SCM
7196 _wrap_nlopt_version_minor ()
7197 {
7198 #define FUNC_NAME "nlopt-version-minor"
7199   SCM gswig_result;
7200   SWIGUNUSED int gswig_list_p = 0;
7201   int result;
7202   
7203   result = (int)nlopt::version_minor();
7204   {
7205     gswig_result = scm_from_long(result);
7206   }
7207   
7208   return gswig_result;
7209 #undef FUNC_NAME
7210 }
7211
7212
7213 static SCM
7214 _wrap_nlopt_version_bugfix ()
7215 {
7216 #define FUNC_NAME "nlopt-version-bugfix"
7217   SCM gswig_result;
7218   SWIGUNUSED int gswig_list_p = 0;
7219   int result;
7220   
7221   result = (int)nlopt::version_bugfix();
7222   {
7223     gswig_result = scm_from_long(result);
7224   }
7225   
7226   return gswig_result;
7227 #undef FUNC_NAME
7228 }
7229
7230
7231 static SCM
7232 _wrap_nlopt_algorithm_name (SCM s_0)
7233 {
7234 #define FUNC_NAME "nlopt-algorithm-name"
7235   nlopt::algorithm arg1 ;
7236   SCM gswig_result;
7237   SWIGUNUSED int gswig_list_p = 0;
7238   char *result = 0 ;
7239   
7240   {
7241     arg1 = (nlopt::algorithm) scm_to_int(s_0); 
7242   }
7243   result = (char *)nlopt::algorithm_name(arg1);
7244   {
7245     gswig_result = SWIG_str02scm((const char *)result);
7246   }
7247   
7248   return gswig_result;
7249 #undef FUNC_NAME
7250 }
7251
7252
7253 #ifdef __cplusplus
7254 extern "C" {
7255 #endif
7256
7257 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
7258
7259 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
7260 static swig_type_info _swigt__p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double = {"_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double", "nlopt::vfunc|double (*)(std::vector< double > const &,std::vector< double > &,void *)", 0, 0, (void*)0, 0};
7261 static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
7262 static swig_type_info _swigt__p_nlopt__forced_stop = {"_p_nlopt__forced_stop", "nlopt::forced_stop *", 0, 0, (void*)0, 0};
7263 static swig_type_info _swigt__p_nlopt__opt = {"_p_nlopt__opt", "nlopt::opt *", 0, 0, (void*)0, 0};
7264 static swig_type_info _swigt__p_nlopt__roundoff_limited = {"_p_nlopt__roundoff_limited", "nlopt::roundoff_limited *", 0, 0, (void*)0, 0};
7265 static swig_type_info _swigt__p_nlopt_func = {"_p_nlopt_func", "nlopt::func *|nlopt_func *", 0, 0, (void*)0, 0};
7266 static swig_type_info _swigt__p_nlopt_mfunc = {"_p_nlopt_mfunc", "nlopt_mfunc *|nlopt::mfunc *", 0, 0, (void*)0, 0};
7267 static swig_type_info _swigt__p_nlopt_munge = {"_p_nlopt_munge", "nlopt_munge *", 0, 0, (void*)0, 0};
7268 static swig_type_info _swigt__p_nlopt_opt = {"_p_nlopt_opt", "nlopt_opt *", 0, 0, (void*)0, 0};
7269 static swig_type_info _swigt__p_nlopt_result = {"_p_nlopt_result", "nlopt_result *", 0, 0, (void*)0, 0};
7270 static swig_type_info _swigt__p_std__out_of_range = {"_p_std__out_of_range", "std::out_of_range *", 0, 0, (void*)0, 0};
7271 static swig_type_info _swigt__p_std__vectorT_double_t = {"_p_std__vectorT_double_t", "std::vector< double > *", 0, 0, (void*)0, 0};
7272 static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "SCM *|unsigned long *", 0, 0, (void*)0, 0};
7273
7274 static swig_type_info *swig_type_initial[] = {
7275   &_swigt__p_double,
7276   &_swigt__p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double,
7277   &_swigt__p_int,
7278   &_swigt__p_nlopt__forced_stop,
7279   &_swigt__p_nlopt__opt,
7280   &_swigt__p_nlopt__roundoff_limited,
7281   &_swigt__p_nlopt_func,
7282   &_swigt__p_nlopt_mfunc,
7283   &_swigt__p_nlopt_munge,
7284   &_swigt__p_nlopt_opt,
7285   &_swigt__p_nlopt_result,
7286   &_swigt__p_std__out_of_range,
7287   &_swigt__p_std__vectorT_double_t,
7288   &_swigt__p_unsigned_long,
7289 };
7290
7291 static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
7292 static swig_cast_info _swigc__p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double[] = {  {&_swigt__p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0, 0, 0},{0, 0, 0, 0}};
7293 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
7294 static swig_cast_info _swigc__p_nlopt__forced_stop[] = {  {&_swigt__p_nlopt__forced_stop, 0, 0, 0},{0, 0, 0, 0}};
7295 static swig_cast_info _swigc__p_nlopt__opt[] = {  {&_swigt__p_nlopt__opt, 0, 0, 0},{0, 0, 0, 0}};
7296 static swig_cast_info _swigc__p_nlopt__roundoff_limited[] = {  {&_swigt__p_nlopt__roundoff_limited, 0, 0, 0},{0, 0, 0, 0}};
7297 static swig_cast_info _swigc__p_nlopt_func[] = {  {&_swigt__p_nlopt_func, 0, 0, 0},{0, 0, 0, 0}};
7298 static swig_cast_info _swigc__p_nlopt_mfunc[] = {  {&_swigt__p_nlopt_mfunc, 0, 0, 0},{0, 0, 0, 0}};
7299 static swig_cast_info _swigc__p_nlopt_munge[] = {  {&_swigt__p_nlopt_munge, 0, 0, 0},{0, 0, 0, 0}};
7300 static swig_cast_info _swigc__p_nlopt_opt[] = {  {&_swigt__p_nlopt_opt, 0, 0, 0},{0, 0, 0, 0}};
7301 static swig_cast_info _swigc__p_nlopt_result[] = {  {&_swigt__p_nlopt_result, 0, 0, 0},{0, 0, 0, 0}};
7302 static swig_cast_info _swigc__p_std__out_of_range[] = {  {&_swigt__p_std__out_of_range, 0, 0, 0},{0, 0, 0, 0}};
7303 static swig_cast_info _swigc__p_std__vectorT_double_t[] = {  {&_swigt__p_std__vectorT_double_t, 0, 0, 0},{0, 0, 0, 0}};
7304 static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
7305
7306 static swig_cast_info *swig_cast_initial[] = {
7307   _swigc__p_double,
7308   _swigc__p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double,
7309   _swigc__p_int,
7310   _swigc__p_nlopt__forced_stop,
7311   _swigc__p_nlopt__opt,
7312   _swigc__p_nlopt__roundoff_limited,
7313   _swigc__p_nlopt_func,
7314   _swigc__p_nlopt_mfunc,
7315   _swigc__p_nlopt_munge,
7316   _swigc__p_nlopt_opt,
7317   _swigc__p_nlopt_result,
7318   _swigc__p_std__out_of_range,
7319   _swigc__p_std__vectorT_double_t,
7320   _swigc__p_unsigned_long,
7321 };
7322
7323
7324 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
7325
7326 /* -----------------------------------------------------------------------------
7327  * Type initialization:
7328  * This problem is tough by the requirement that no dynamic
7329  * memory is used. Also, since swig_type_info structures store pointers to
7330  * swig_cast_info structures and swig_cast_info structures store pointers back
7331  * to swig_type_info structures, we need some lookup code at initialization.
7332  * The idea is that swig generates all the structures that are needed.
7333  * The runtime then collects these partially filled structures.
7334  * The SWIG_InitializeModule function takes these initial arrays out of
7335  * swig_module, and does all the lookup, filling in the swig_module.types
7336  * array with the correct data and linking the correct swig_cast_info
7337  * structures together.
7338  *
7339  * The generated swig_type_info structures are assigned staticly to an initial
7340  * array. We just loop through that array, and handle each type individually.
7341  * First we lookup if this type has been already loaded, and if so, use the
7342  * loaded structure instead of the generated one. Then we have to fill in the
7343  * cast linked list. The cast data is initially stored in something like a
7344  * two-dimensional array. Each row corresponds to a type (there are the same
7345  * number of rows as there are in the swig_type_initial array). Each entry in
7346  * a column is one of the swig_cast_info structures for that type.
7347  * The cast_initial array is actually an array of arrays, because each row has
7348  * a variable number of columns. So to actually build the cast linked list,
7349  * we find the array of casts associated with the type, and loop through it
7350  * adding the casts to the list. The one last trick we need to do is making
7351  * sure the type pointer in the swig_cast_info struct is correct.
7352  *
7353  * First off, we lookup the cast->type name to see if it is already loaded.
7354  * There are three cases to handle:
7355  *  1) If the cast->type has already been loaded AND the type we are adding
7356  *     casting info to has not been loaded (it is in this module), THEN we
7357  *     replace the cast->type pointer with the type pointer that has already
7358  *     been loaded.
7359  *  2) If BOTH types (the one we are adding casting info to, and the
7360  *     cast->type) are loaded, THEN the cast info has already been loaded by
7361  *     the previous module so we just ignore it.
7362  *  3) Finally, if cast->type has not already been loaded, then we add that
7363  *     swig_cast_info to the linked list (because the cast->type) pointer will
7364  *     be correct.
7365  * ----------------------------------------------------------------------------- */
7366
7367 #ifdef __cplusplus
7368 extern "C" {
7369 #if 0
7370 } /* c-mode */
7371 #endif
7372 #endif
7373
7374 #if 0
7375 #define SWIGRUNTIME_DEBUG
7376 #endif
7377
7378
7379 SWIGRUNTIME void
7380 SWIG_InitializeModule(void *clientdata) {
7381   size_t i;
7382   swig_module_info *module_head, *iter;
7383   int found, init;
7384   
7385   /* check to see if the circular list has been setup, if not, set it up */
7386   if (swig_module.next==0) {
7387     /* Initialize the swig_module */
7388     swig_module.type_initial = swig_type_initial;
7389     swig_module.cast_initial = swig_cast_initial;
7390     swig_module.next = &swig_module;
7391     init = 1;
7392   } else {
7393     init = 0;
7394   }
7395   
7396   /* Try and load any already created modules */
7397   module_head = SWIG_GetModule(clientdata);
7398   if (!module_head) {
7399     /* This is the first module loaded for this interpreter */
7400     /* so set the swig module into the interpreter */
7401     SWIG_SetModule(clientdata, &swig_module);
7402     module_head = &swig_module;
7403   } else {
7404     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
7405     found=0;
7406     iter=module_head;
7407     do {
7408       if (iter==&swig_module) {
7409         found=1;
7410         break;
7411       }
7412       iter=iter->next;
7413     } while (iter!= module_head);
7414     
7415     /* if the is found in the list, then all is done and we may leave */
7416     if (found) return;
7417     /* otherwise we must add out module into the list */
7418     swig_module.next = module_head->next;
7419     module_head->next = &swig_module;
7420   }
7421   
7422   /* When multiple interpreters are used, a module could have already been initialized in
7423        a different interpreter, but not yet have a pointer in this interpreter.
7424        In this case, we do not want to continue adding types... everything should be
7425        set up already */
7426   if (init == 0) return;
7427   
7428   /* Now work on filling in swig_module.types */
7429 #ifdef SWIGRUNTIME_DEBUG
7430   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
7431 #endif
7432   for (i = 0; i < swig_module.size; ++i) {
7433     swig_type_info *type = 0;
7434     swig_type_info *ret;
7435     swig_cast_info *cast;
7436     
7437 #ifdef SWIGRUNTIME_DEBUG
7438     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
7439 #endif
7440     
7441     /* if there is another module already loaded */
7442     if (swig_module.next != &swig_module) {
7443       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
7444     }
7445     if (type) {
7446       /* Overwrite clientdata field */
7447 #ifdef SWIGRUNTIME_DEBUG
7448       printf("SWIG_InitializeModule: found type %s\n", type->name);
7449 #endif
7450       if (swig_module.type_initial[i]->clientdata) {
7451         type->clientdata = swig_module.type_initial[i]->clientdata;
7452 #ifdef SWIGRUNTIME_DEBUG
7453         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
7454 #endif
7455       }
7456     } else {
7457       type = swig_module.type_initial[i];
7458     }
7459     
7460     /* Insert casting types */
7461     cast = swig_module.cast_initial[i];
7462     while (cast->type) {
7463       /* Don't need to add information already in the list */
7464       ret = 0;
7465 #ifdef SWIGRUNTIME_DEBUG
7466       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
7467 #endif
7468       if (swig_module.next != &swig_module) {
7469         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
7470 #ifdef SWIGRUNTIME_DEBUG
7471         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
7472 #endif
7473       }
7474       if (ret) {
7475         if (type == swig_module.type_initial[i]) {
7476 #ifdef SWIGRUNTIME_DEBUG
7477           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
7478 #endif
7479           cast->type = ret;
7480           ret = 0;
7481         } else {
7482           /* Check for casting already in the list */
7483           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
7484 #ifdef SWIGRUNTIME_DEBUG
7485           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
7486 #endif
7487           if (!ocast) ret = 0;
7488         }
7489       }
7490       
7491       if (!ret) {
7492 #ifdef SWIGRUNTIME_DEBUG
7493         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
7494 #endif
7495         if (type->cast) {
7496           type->cast->prev = cast;
7497           cast->next = type->cast;
7498         }
7499         type->cast = cast;
7500       }
7501       cast++;
7502     }
7503     /* Set entry in modules->types array equal to the type */
7504     swig_module.types[i] = type;
7505   }
7506   swig_module.types[i] = 0;
7507   
7508 #ifdef SWIGRUNTIME_DEBUG
7509   printf("**** SWIG_InitializeModule: Cast List ******\n");
7510   for (i = 0; i < swig_module.size; ++i) {
7511     int j = 0;
7512     swig_cast_info *cast = swig_module.cast_initial[i];
7513     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
7514     while (cast->type) {
7515       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
7516       cast++;
7517       ++j;
7518     }
7519     printf("---- Total casts: %d\n",j);
7520   }
7521   printf("**** SWIG_InitializeModule: Cast List ******\n");
7522 #endif
7523 }
7524
7525 /* This function will propagate the clientdata field of type to
7526 * any new swig_type_info structures that have been added into the list
7527 * of equivalent types.  It is like calling
7528 * SWIG_TypeClientData(type, clientdata) a second time.
7529 */
7530 SWIGRUNTIME void
7531 SWIG_PropagateClientData(void) {
7532   size_t i;
7533   swig_cast_info *equiv;
7534   static int init_run = 0;
7535   
7536   if (init_run) return;
7537   init_run = 1;
7538   
7539   for (i = 0; i < swig_module.size; i++) {
7540     if (swig_module.types[i]->clientdata) {
7541       equiv = swig_module.types[i]->cast;
7542       while (equiv) {
7543         if (!equiv->converter) {
7544           if (equiv->type && !equiv->type->clientdata)
7545           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
7546         }
7547         equiv = equiv->next;
7548       }
7549     }
7550   }
7551 }
7552
7553 #ifdef __cplusplus
7554 #if 0
7555 {
7556   /* c-mode */
7557 #endif
7558 }
7559 #endif
7560
7561
7562 SWIG_GUILE_INIT_STATIC void
7563 SWIG_init(void)
7564 {
7565   SWIG_InitializeModule(0);
7566   SWIG_PropagateClientData();
7567   
7568   SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_double_t, (void *) &_swig_guile_clientdatanlopt_doublevector);
7569   scm_c_define_gsubr("new-nlopt-doublevector", 0, 0, 1, (swig_guile_proc) _wrap_new_nlopt_doublevector);
7570   scm_c_define_gsubr("nlopt-doublevector-length", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_length);
7571   scm_c_define_gsubr("nlopt-doublevector-empty?", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_emptyq___);
7572   scm_c_define_gsubr("nlopt-doublevector-clear!", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_clearN___);
7573   scm_c_define_gsubr("nlopt-doublevector-push!", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_pushN___);
7574   scm_c_define_gsubr("nlopt-doublevector-pop!", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_popN___);
7575   scm_c_define_gsubr("nlopt-doublevector-ref", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_ref);
7576   scm_c_define_gsubr("nlopt-doublevector-set!", 3, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_setN___);
7577   ((swig_guile_clientdata *)(SWIGTYPE_p_std__vectorT_double_t->clientdata))->destroy = (guile_destructor) _wrap_delete_nlopt_doublevector;
7578   scm_c_define_gsubr("delete-nlopt-doublevector", 1, 0, 0, (swig_guile_proc) _wrap_delete_nlopt_doublevector);
7579   scm_c_define_gsubr("nlopt-get-initial-step", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_get_initial_step);
7580   scm_c_define_gsubr("NLOPT-GN-DIRECT", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT);
7581   scm_c_define_gsubr("NLOPT-GN-DIRECT-L", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_L);
7582   scm_c_define_gsubr("NLOPT-GN-DIRECT-L-RAND", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_L_RAND);
7583   scm_c_define_gsubr("NLOPT-GN-DIRECT-NOSCAL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_NOSCAL);
7584   scm_c_define_gsubr("NLOPT-GN-DIRECT-L-NOSCAL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_L_NOSCAL);
7585   scm_c_define_gsubr("NLOPT-GN-DIRECT-L-RAND-NOSCAL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_L_RAND_NOSCAL);
7586   scm_c_define_gsubr("NLOPT-GN-ORIG-DIRECT", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_ORIG_DIRECT);
7587   scm_c_define_gsubr("NLOPT-GN-ORIG-DIRECT-L", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_ORIG_DIRECT_L);
7588   scm_c_define_gsubr("NLOPT-GD-STOGO", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GD_STOGO);
7589   scm_c_define_gsubr("NLOPT-GD-STOGO-RAND", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GD_STOGO_RAND);
7590   scm_c_define_gsubr("NLOPT-LD-LBFGS-NOCEDAL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_LBFGS_NOCEDAL);
7591   scm_c_define_gsubr("NLOPT-LD-LBFGS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_LBFGS);
7592   scm_c_define_gsubr("NLOPT-LN-PRAXIS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_PRAXIS);
7593   scm_c_define_gsubr("NLOPT-LD-VAR1", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_VAR1);
7594   scm_c_define_gsubr("NLOPT-LD-VAR2", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_VAR2);
7595   scm_c_define_gsubr("NLOPT-LD-TNEWTON", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_TNEWTON);
7596   scm_c_define_gsubr("NLOPT-LD-TNEWTON-RESTART", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_TNEWTON_RESTART);
7597   scm_c_define_gsubr("NLOPT-LD-TNEWTON-PRECOND", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_TNEWTON_PRECOND);
7598   scm_c_define_gsubr("NLOPT-LD-TNEWTON-PRECOND-RESTART", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_TNEWTON_PRECOND_RESTART);
7599   scm_c_define_gsubr("NLOPT-GN-CRS2-LM", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_CRS2_LM);
7600   scm_c_define_gsubr("NLOPT-GN-MLSL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_MLSL);
7601   scm_c_define_gsubr("NLOPT-GD-MLSL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GD_MLSL);
7602   scm_c_define_gsubr("NLOPT-GN-MLSL-LDS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_MLSL_LDS);
7603   scm_c_define_gsubr("NLOPT-GD-MLSL-LDS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GD_MLSL_LDS);
7604   scm_c_define_gsubr("NLOPT-LD-MMA", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_MMA);
7605   scm_c_define_gsubr("NLOPT-LN-COBYLA", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_COBYLA);
7606   scm_c_define_gsubr("NLOPT-LN-NEWUOA", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_NEWUOA);
7607   scm_c_define_gsubr("NLOPT-LN-NEWUOA-BOUND", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_NEWUOA_BOUND);
7608   scm_c_define_gsubr("NLOPT-LN-NELDERMEAD", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_NELDERMEAD);
7609   scm_c_define_gsubr("NLOPT-LN-SBPLX", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_SBPLX);
7610   scm_c_define_gsubr("NLOPT-LN-AUGLAG", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_AUGLAG);
7611   scm_c_define_gsubr("NLOPT-LD-AUGLAG", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_AUGLAG);
7612   scm_c_define_gsubr("NLOPT-LN-AUGLAG-EQ", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_AUGLAG_EQ);
7613   scm_c_define_gsubr("NLOPT-LD-AUGLAG-EQ", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_AUGLAG_EQ);
7614   scm_c_define_gsubr("NLOPT-LN-BOBYQA", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_BOBYQA);
7615   scm_c_define_gsubr("NLOPT-GN-ISRES", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_ISRES);
7616   scm_c_define_gsubr("NLOPT-AUGLAG", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_AUGLAG);
7617   scm_c_define_gsubr("NLOPT-AUGLAG-EQ", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_AUGLAG_EQ);
7618   scm_c_define_gsubr("NLOPT-G-MLSL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_G_MLSL);
7619   scm_c_define_gsubr("NLOPT-G-MLSL-LDS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_G_MLSL_LDS);
7620   scm_c_define_gsubr("NLOPT-LD-SLSQP", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_SLSQP);
7621   scm_c_define_gsubr("NLOPT-LD-CCSAQ", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_CCSAQ);
7622   scm_c_define_gsubr("NLOPT-GN-ESCH", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_ESCH);
7623   scm_c_define_gsubr("NLOPT-NUM-ALGORITHMS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_NUM_ALGORITHMS);
7624   scm_c_define_gsubr("NLOPT-FAILURE", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_FAILURE);
7625   scm_c_define_gsubr("NLOPT-INVALID-ARGS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_INVALID_ARGS);
7626   scm_c_define_gsubr("NLOPT-OUT-OF-MEMORY", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_OUT_OF_MEMORY);
7627   scm_c_define_gsubr("NLOPT-ROUNDOFF-LIMITED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_ROUNDOFF_LIMITED);
7628   scm_c_define_gsubr("NLOPT-FORCED-STOP", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_FORCED_STOP);
7629   scm_c_define_gsubr("NLOPT-SUCCESS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_SUCCESS);
7630   scm_c_define_gsubr("NLOPT-STOPVAL-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_STOPVAL_REACHED);
7631   scm_c_define_gsubr("NLOPT-FTOL-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_FTOL_REACHED);
7632   scm_c_define_gsubr("NLOPT-XTOL-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_XTOL_REACHED);
7633   scm_c_define_gsubr("NLOPT-MAXEVAL-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_MAXEVAL_REACHED);
7634   scm_c_define_gsubr("NLOPT-MAXTIME-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_MAXTIME_REACHED);
7635   SWIG_TypeClientData(SWIGTYPE_p_nlopt__roundoff_limited, (void *) &_swig_guile_clientdatanlopt_roundoff_limited);
7636   scm_c_define_gsubr("new-nlopt-roundoff-limited", 0, 0, 0, (swig_guile_proc) _wrap_new_nlopt_roundoff_limited);
7637   ((swig_guile_clientdata *)(SWIGTYPE_p_nlopt__roundoff_limited->clientdata))->destroy = (guile_destructor) _wrap_delete_nlopt_roundoff_limited;
7638   scm_c_define_gsubr("delete-nlopt-roundoff-limited", 1, 0, 0, (swig_guile_proc) _wrap_delete_nlopt_roundoff_limited);
7639   SWIG_TypeClientData(SWIGTYPE_p_nlopt__forced_stop, (void *) &_swig_guile_clientdatanlopt_forced_stop);
7640   scm_c_define_gsubr("new-nlopt-forced-stop", 0, 0, 0, (swig_guile_proc) _wrap_new_nlopt_forced_stop);
7641   ((swig_guile_clientdata *)(SWIGTYPE_p_nlopt__forced_stop->clientdata))->destroy = (guile_destructor) _wrap_delete_nlopt_forced_stop;
7642   scm_c_define_gsubr("delete-nlopt-forced-stop", 1, 0, 0, (swig_guile_proc) _wrap_delete_nlopt_forced_stop);
7643   SWIG_TypeClientData(SWIGTYPE_p_nlopt__opt, (void *) &_swig_guile_clientdatanlopt_opt);
7644   ((swig_guile_clientdata *)(SWIGTYPE_p_nlopt__opt->clientdata))->destroy = (guile_destructor) _wrap_delete_nlopt_opt;
7645   scm_c_define_gsubr("delete-nlopt-opt", 1, 0, 0, (swig_guile_proc) _wrap_delete_nlopt_opt);
7646   scm_c_define_gsubr("new-nlopt-opt", 0, 0, 1, (swig_guile_proc) _wrap_new_nlopt_opt);
7647   scm_c_define_gsubr("nlopt-opt-optimize", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_optimize);
7648   scm_c_define_gsubr("nlopt-opt-last-optimize-result", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_last_optimize_result);
7649   scm_c_define_gsubr("nlopt-opt-last-optimum-value", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_last_optimum_value);
7650   scm_c_define_gsubr("nlopt-opt-get-algorithm", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_algorithm);
7651   scm_c_define_gsubr("nlopt-opt-get-algorithm-name", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_algorithm_name);
7652   scm_c_define_gsubr("nlopt-opt-get-dimension", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_dimension);
7653   scm_c_define_gsubr("nlopt-opt-set-min-objective", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_min_objective);
7654   scm_c_define_gsubr("nlopt-opt-set-max-objective", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_max_objective);
7655   scm_c_define_gsubr("nlopt-opt-remove-inequality-constraints", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_remove_inequality_constraints);
7656   scm_c_define_gsubr("nlopt-opt-remove-equality-constraints", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_remove_equality_constraints);
7657   scm_c_define_gsubr("nlopt-opt-add-inequality-constraint", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_add_inequality_constraint);
7658   scm_c_define_gsubr("nlopt-opt-add-equality-constraint", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_add_equality_constraint);
7659   scm_c_define_gsubr("nlopt-opt-add-inequality-mconstraint", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_add_inequality_mconstraint);
7660   scm_c_define_gsubr("nlopt-opt-add-equality-mconstraint", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_add_equality_mconstraint);
7661   scm_c_define_gsubr("nlopt-opt-get-lower-bounds", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_get_lower_bounds);
7662   scm_c_define_gsubr("nlopt-opt-set-lower-bounds", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_lower_bounds);
7663   scm_c_define_gsubr("nlopt-opt-get-upper-bounds", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_get_upper_bounds);
7664   scm_c_define_gsubr("nlopt-opt-set-upper-bounds", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_upper_bounds);
7665   scm_c_define_gsubr("nlopt-opt-get-stopval", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_stopval);
7666   scm_c_define_gsubr("nlopt-opt-set-stopval", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_stopval);
7667   scm_c_define_gsubr("nlopt-opt-get-ftol-rel", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_ftol_rel);
7668   scm_c_define_gsubr("nlopt-opt-set-ftol-rel", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_ftol_rel);
7669   scm_c_define_gsubr("nlopt-opt-get-ftol-abs", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_ftol_abs);
7670   scm_c_define_gsubr("nlopt-opt-set-ftol-abs", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_ftol_abs);
7671   scm_c_define_gsubr("nlopt-opt-get-xtol-rel", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_xtol_rel);
7672   scm_c_define_gsubr("nlopt-opt-set-xtol-rel", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_xtol_rel);
7673   scm_c_define_gsubr("nlopt-opt-get-xtol-abs", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_get_xtol_abs);
7674   scm_c_define_gsubr("nlopt-opt-set-xtol-abs", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_xtol_abs);
7675   scm_c_define_gsubr("nlopt-opt-get-maxeval", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_maxeval);
7676   scm_c_define_gsubr("nlopt-opt-set-maxeval", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_maxeval);
7677   scm_c_define_gsubr("nlopt-opt-get-maxtime", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_maxtime);
7678   scm_c_define_gsubr("nlopt-opt-set-maxtime", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_maxtime);
7679   scm_c_define_gsubr("nlopt-opt-get-force-stop", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_force_stop);
7680   scm_c_define_gsubr("nlopt-opt-set-force-stop", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_force_stop);
7681   scm_c_define_gsubr("nlopt-opt-force-stop", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_force_stop);
7682   scm_c_define_gsubr("nlopt-opt-set-local-optimizer", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_local_optimizer);
7683   scm_c_define_gsubr("nlopt-opt-get-population", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_population);
7684   scm_c_define_gsubr("nlopt-opt-set-population", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_population);
7685   scm_c_define_gsubr("nlopt-opt-get-vector-storage", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_vector_storage);
7686   scm_c_define_gsubr("nlopt-opt-set-vector-storage", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_vector_storage);
7687   scm_c_define_gsubr("nlopt-opt-set-initial-step", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_initial_step);
7688   scm_c_define_gsubr("nlopt-opt-set-default-initial-step", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_default_initial_step);
7689   scm_c_define_gsubr("nlopt-opt-get-initial-step", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_get_initial_step);
7690   scm_c_define_gsubr("nlopt-opt-get-initial-step-", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_initial_step_);
7691   scm_c_define_gsubr("nlopt-srand", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_srand);
7692   scm_c_define_gsubr("nlopt-srand-time", 0, 0, 0, (swig_guile_proc) _wrap_nlopt_srand_time);
7693   scm_c_define_gsubr("nlopt-version", 3, 0, 0, (swig_guile_proc) _wrap_nlopt_version);
7694   scm_c_define_gsubr("nlopt-version-major", 0, 0, 0, (swig_guile_proc) _wrap_nlopt_version_major);
7695   scm_c_define_gsubr("nlopt-version-minor", 0, 0, 0, (swig_guile_proc) _wrap_nlopt_version_minor);
7696   scm_c_define_gsubr("nlopt-version-bugfix", 0, 0, 0, (swig_guile_proc) _wrap_nlopt_version_bugfix);
7697   scm_c_define_gsubr("nlopt-algorithm-name", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_algorithm_name);
7698 }
7699
7700 #ifdef __cplusplus
7701 }
7702 #endif
7703 extern "C" {
7704 /* Linkage: simple */
7705
7706 }
7707