/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.4.1
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


#define SWIG_VERSION 0x040401
#define SWIGGUILE
#define SWIG_GUILE_INIT_STATIC extern
extern "C" {

SWIG_GUILE_INIT_STATIC void
SWIG_init (void);

}

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__))
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__))
# else
#   define SWIGUNUSED
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif

#if defined(__cplusplus) && __cplusplus >=201103L
# define SWIG_NOEXCEPT noexcept
#else
# define SWIG_NOEXCEPT throw()
#endif 

/* -----------------------------------------------------------------------------
 * swigcompat.swg
 *
 * Macros to provide support compatibility with older C and C++ standards.
 *
 * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
 * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
 * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
 * ----------------------------------------------------------------------------- */

/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
 * if you're missing it.
 */
#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
     (defined __cplusplus && __cplusplus >= 201103L) || \
     defined SWIG_HAVE_SNPRINTF) && \
    !defined SWIG_NO_SNPRINTF
# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
#else
/* Fallback versions ignore the buffer size, but most of our uses either have a
 * fixed maximum possible size or dynamically allocate a buffer that's large
 * enough.
 */
# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
#endif

/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "5"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.

  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2
#define SWIG_POINTER_NO_NULL       0x4
#define SWIG_POINTER_CLEAR         0x8
#define SWIG_POINTER_RELEASE       (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/*
   Flags/methods for returning states.

   The SWIG conversion methods, as ConvertPtr, return an integer
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).

   Use the following macros/flags to set or process the returning
   states.

   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }

   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {
        if (<obj is ok>) {
          if (<need new object>) {
            *ptr = <ptr to new allocated object>;
            return SWIG_NEWOBJ;
          } else {
            *ptr = <ptr to old object>;
            return SWIG_OLDOBJ;
          }
        } else {
          return SWIG_BADOBJ;
        }
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows returning the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call

      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0)
/* Runtime errors are < 0 */
#define SWIG_ERROR                 (-1)
/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
/* Errors < -200 are generic runtime specific errors */
#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)

#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporary objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del object mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) {
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) {
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
#  define SWIG_AddCast(r) (r)
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next array of casts | pointer to cast hashed by value */
  unsigned int            value;		/* index of the last valid element in the array | typename hash value */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/*
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCmp(const char *nb, const char *tb) {
  int equiv = 1;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (equiv != 0 && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

/*
 * Hash function for type name strings, based on maRushPrime1Hash (http://amsoftware.narod.ru/algo2.html)
 */
SWIGRUNTIME unsigned int SWIG_Hash(const char *str, unsigned int len) {
  const unsigned char *data = (const unsigned char *)str;
  unsigned int hash = len, i = 0, k;
  int rem = (int)len;

  while (rem >= (int)sizeof(unsigned int)) {
    memcpy(&k, data, sizeof(unsigned int));
    k += i++;
    hash ^= k;
    hash *= 171717;
    data += sizeof(unsigned int);
    rem -= sizeof(unsigned int);
  }

  switch (rem) {
    case 3: k = (unsigned int)(data[2]) << 16;
            k |= (unsigned int)(data[1]) << 8;
            k |= (unsigned int)(data[0]);
            k += i++;
            hash ^= k;
            hash *= 171717;
            break;
    case 2: k = (unsigned int)(data[1]) << 8;
            k |= (unsigned int)(data[0]);
            k += i++;
            hash ^= k;
            hash *= 171717;
            break;
    case 1: k = (unsigned int)(data[0]);
            k += i++;
            hash ^= k;
            hash *= 171717;
            break;
  }
  return hash;
}

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  static const unsigned int scan_threshold = 4;
  if (ty) {
    swig_cast_info *head = ty->cast;
    unsigned int hash_value = 0;
    int hashed = 0;

    while (head) {

      if (strcmp(head->type->name, c) == 0) {
        return head;
      }

      if (head->value) {
        swig_cast_info *iter;
        swig_cast_info *last = head + head->value;
        swig_cast_info *first = head + 1;
        int search = 1;

        if (!hashed) {
          if (head->value < scan_threshold) {
            for (iter = first; iter <= last; iter++) {
              if (strcmp(iter->type->name, c) == 0) {
                return iter;
              }
            }
            search = 0;
          } else {
            hashed = 1;
            hash_value = SWIG_Hash(c, (unsigned int)strlen(c));
          }
        }

        if (search) {
          /* Binary search over sorted <'next'|'value'> pairs */
          do {
            iter = first + ((last - first) >> 1);
            if (iter->value < hash_value) {
              first = iter + 1;
            } else if (iter->value == hash_value) {

              if (strcmp(iter->next->type->name, c) == 0) {
                return iter->next;
              }

              /* Hash collision check */
              for (last = iter + 1; last->next && last->value == hash_value; last++) {
                if (strcmp(last->next->type->name, c) == 0) {
                  return last->next;
                }
              }
              for (first = iter - 1; first != head && first->value == hash_value; first--) {
                if (strcmp(first->next->type->name, c) == 0) {
                  return first->next;
                }
              }
              break;
            } else
              last = iter - 1;
          } while (first <= last);
        }
      }
      head = head->next;
    }
  }
  return 0;
}

/*
  Check the type by type address
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *head = ty->cast;
    while (head) {
      if (head->type == from) {
        return head;
      }

      if (head->value) {
        swig_cast_info *iter;
        swig_cast_info *last = head + head->value;
        swig_cast_info *first = head + 1;

        /* Binary search over sorted array of casts */
        do {
          iter = first + ((last - first) >> 1);
          if (iter->type < from) {
            first = iter + 1;
          } else if (iter->type == from) {
            return iter;
          } else
            last = iter - 1;
        } while (first <= last);
      }
      head = head->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/*
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  Choose the last
     name. It should be the most specific; a fully resolved name
     but not necessarily with default template parameters expanded. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/*
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *head = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;

  while (head) {
    swig_cast_info *cast;
    for (cast = head; (cast - head) <= head->value; cast++) {
      if (!cast->converter) {
        swig_type_info *tc = cast->type;
        if (!tc->clientdata) {
          SWIG_TypeClientData(tc, clientdata);
        }
      }
    }
    head = head->next;
  }
}

SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}

/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start,
                            swig_module_info *end,
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  int compare = strcmp(name, iname);
	  if (compare == 0) {
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start,
                     swig_module_info *end,
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }

  /* neither found a match */
  return 0;
}

/*
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  const unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/*
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    char d = *(c++);
    unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = (unsigned char)((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = (unsigned char)((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (unsigned char)(d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (unsigned char)(d - ('a'-10));
    else
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/*
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13


/* -----------------------------------------------------------------------------
 * guile_scm_run.swg
 * ----------------------------------------------------------------------------- */

#if __GNUC__ >= 10
#if defined(__cplusplus)
#pragma GCC diagnostic ignored "-Wvolatile" /* For 'volatile SCM *' in at least Guile 3.0 and earlier */
#endif
#endif

#include <libguile.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>

#ifdef __cplusplus
extern "C" {
#endif


/* In the code below, use guile 2.0 compatible functions where possible.
   Functions that don't exist in older versions will be mapped to
   a deprecated equivalent for those versions only */
#if defined (SCM_MAJOR_VERSION) && (SCM_MAJOR_VERSION < 2)

static SCM
scm_module_variable (SCM module, SCM sym)
{
  return scm_sym2var (sym, scm_module_lookup_closure (module), SCM_BOOL_F);
}

#define scm_to_utf8_string scm_to_locale_string
#define scm_from_utf8_string scm_from_locale_string
#endif

#if SCM_MAJOR_VERSION >= 2
/* scm_c_define_gsubr takes a different parameter type depending on the guile version */

typedef scm_t_subr swig_guile_proc;
#else
typedef SCM (*swig_guile_proc)();
#endif
typedef SCM (*guile_destructor)(SCM);

typedef struct swig_guile_clientdata {
  guile_destructor destroy;
  SCM goops_class;
} swig_guile_clientdata;

#define SWIG_scm2str(s) \
  SWIG_Guile_scm2newstr(s, NULL)
#define SWIG_str02scm(str) \
  str ? scm_from_utf8_string(str) : SCM_BOOL_F 
# define SWIG_malloc(size) \
  scm_malloc(size)
# define SWIG_free(mem) \
  free(mem)
#define SWIG_ConvertPtr(s, result, type, flags) \
  SWIG_Guile_ConvertPtr(s, result, type, flags)
#define SWIG_MustGetPtr(s, type, argnum, flags) \
  SWIG_Guile_MustGetPtr(s, type, argnum, flags, FUNC_NAME)
#define SWIG_NewPointerObj(ptr, type, owner) \
  SWIG_Guile_NewPointerObj((void*)ptr, type, owner)
#define SWIG_PointerAddress(object) \
  SWIG_Guile_PointerAddress(object)
#define SWIG_PointerType(object) \
  SWIG_Guile_PointerType(object)
#define SWIG_IsPointerOfType(object, type) \
  SWIG_Guile_IsPointerOfType(object, type)
#define SWIG_IsPointer(object) \
  SWIG_Guile_IsPointer(object)
#define SWIG_contract_assert(expr, msg)				\
  do { \
    if (!(expr))							\
      scm_error(scm_from_locale_symbol("swig-contract-assertion-failed"),	\
                FUNC_NAME, msg, SCM_EOL, SCM_BOOL_F); \
  } while (0)

/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(obj, ptr, sz, ty) \
  SWIG_Guile_ConvertMember(obj, ptr, sz, ty, FUNC_NAME)
#define SWIG_NewMemberObj(ptr, sz, type) \
  SWIG_Guile_NewMemberObj(ptr, sz, type, FUNC_NAME)
  
/* Runtime API */
static swig_module_info *SWIG_Guile_GetModule(void *SWIGUNUSEDPARM(clientdata));
#define SWIG_GetModule(clientdata) SWIG_Guile_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer) SWIG_Guile_SetModule(pointer)
  
SWIGINTERN char *
SWIG_Guile_scm2newstr(SCM str, size_t *len) {
#define FUNC_NAME "SWIG_Guile_scm2newstr"
  SCM_ASSERT (scm_is_string(str), str, 1, FUNC_NAME);

  return scm_to_utf8_stringn(str, len);
#undef FUNC_NAME
}

static int swig_initialized = 0;
static scm_t_bits swig_tag = 0;
static scm_t_bits swig_collectable_tag = 0;
static scm_t_bits swig_finalized_tag = 0;
static scm_t_bits swig_destroyed_tag = 0;
static scm_t_bits swig_member_function_tag = 0;
static SCM swig_make_func = SCM_EOL;
static SCM swig_keyword = SCM_EOL;
static SCM swig_symbol = SCM_EOL;

#define SWIG_Guile_GetSmob(x) \
  ( !scm_is_null(x) && SCM_INSTANCEP(x) && scm_is_true(scm_slot_exists_p(x, swig_symbol)) \
      ? scm_slot_ref(x, swig_symbol) : (x) )

SWIGINTERN void SWIG_Guile_MarkPointerNoncollectable(SCM s);

SWIGINTERN SCM
SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
{
  if (ptr == NULL)
    return SCM_EOL;
  else {
    SCM smob;
    swig_guile_clientdata *cdata = (swig_guile_clientdata *) type->clientdata;
    if (owner)
      SCM_NEWSMOB2(smob, swig_collectable_tag, ptr, (void *) type);
    else
      SCM_NEWSMOB2(smob, swig_tag, ptr, (void *) type);

    if (!cdata || scm_is_null(cdata->goops_class) || swig_make_func == SCM_EOL ) {
      return smob;
    } else {
      /* the scm_make() C function only handles the creation of gf,
	 methods and classes (no instances) the (make ...) function is
	 later redefined in goops.scm.  So we need to call that
	 Scheme function. */
      return scm_apply(swig_make_func,
		       scm_list_3(cdata->goops_class,
				  swig_keyword,
				  smob),
		       SCM_EOL);
    }
  }
}

SWIGINTERN unsigned long
SWIG_Guile_PointerAddress(SCM object)
{
  SCM smob = SWIG_Guile_GetSmob(object);
  if (scm_is_null(smob)) return 0;
  else if (SCM_SMOB_PREDICATE(swig_tag, smob)
	   || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
	   || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
    return (unsigned long) (void *) SCM_CELL_WORD_1(smob);
  }
  else scm_wrong_type_arg("SWIG-Guile-PointerAddress", 1, object);
}

SWIGINTERN swig_type_info *
SWIG_Guile_PointerType(SCM object)
{
  SCM smob = SWIG_Guile_GetSmob(object);
  if (scm_is_null(smob)) return NULL;
  else if (SCM_SMOB_PREDICATE(swig_tag, smob)
	   || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
	   || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
    return (swig_type_info *) SCM_CELL_WORD_2(smob);
  }
  else scm_wrong_type_arg("SWIG-Guile-PointerType", 1, object);
}

SWIGINTERN int
SWIG_Guile_IsValidSmob(SCM smob)
{
  /* We do not accept smobs representing destroyed pointers, but we have to
     allow finalized smobs because Guile >= 2.0.12 sets all smob instances
     to the 'finalized' type before calling their 'free' function. This change
     was introduced to Guile in commit 8dff3af087c6eaa83ae0d72aa8b22aef5c65d65d */
  return SCM_SMOB_PREDICATE(swig_tag, smob)
    || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
    || SCM_SMOB_PREDICATE(swig_finalized_tag, smob);
}

SWIGINTERN int
SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
{
  swig_cast_info *cast;
  swig_type_info *from;
  SCM smob = SWIG_Guile_GetSmob(s);
  int ret = SWIG_ERROR;

  if (scm_is_null(smob)) {
    *result = NULL;
    return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
#if SCM_MAJOR_VERSION >= 2
  } else if (SCM_POINTER_P(s)) {
    *result = SCM_POINTER_VALUE(s);
    return SWIG_OK;
#endif /* if SCM_MAJOR_VERSION >= 2 */
  } else if (SWIG_Guile_IsValidSmob(smob)) {
    from = (swig_type_info *) SCM_CELL_WORD_2(smob);
    if (!from) return SWIG_ERROR;

    if ((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) {
      if ((SCM_CELL_TYPE(smob) == swig_collectable_tag && SCM_CELL_WORD_1(smob) == 0) || SCM_CELL_TYPE(smob) == swig_tag) {
        return SWIG_ERROR_RELEASE_NOT_OWNED;
      }
    }

    if (type) {
      cast = SWIG_TypeCheckStruct(from, type);
      if (cast) {
        int newmemory = 0;
        *result = SWIG_TypeCast(cast, (void *) SCM_CELL_WORD_1(smob), &newmemory);
        assert(!newmemory); /* newmemory handling not yet implemented */
        ret = SWIG_OK;
      } else {
        return SWIG_ERROR;
      }
    } else {
      *result = (void *) SCM_CELL_WORD_1(smob);
      ret = SWIG_OK;
    }

    if (flags & SWIG_POINTER_DISOWN) {
      SWIG_Guile_MarkPointerNoncollectable(smob);
    }
    if (flags & SWIG_POINTER_CLEAR) {
      SCM_SET_CELL_WORD_1(smob, 0);
    }
  }
  return ret;
}

SWIGINTERNINLINE void *
SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
		       int argnum, int flags, const char *func_name)
{
  void *result;
  int res = SWIG_Guile_ConvertPtr(s, &result, type, flags);
  if (!SWIG_IsOK(res)) {
    /* type mismatch */
    scm_wrong_type_arg(func_name, argnum, s);
  }
  return result;
}

SWIGINTERNINLINE int
SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
{
  void *result;
  if (SWIG_Guile_ConvertPtr(s, &result, type, 0)) {
    /* type mismatch */
    return 0;
  }
  else return 1;
}

SWIGINTERNINLINE int
SWIG_Guile_IsPointer (SCM s)
{
  /* module might not be initialized yet, so initialize it */
  SWIG_GetModule(0);
  return SWIG_Guile_IsPointerOfType (s, NULL);
}

/* Mark a pointer object non-collectable */
SWIGINTERN void
SWIG_Guile_MarkPointerNoncollectable(SCM s)
{
  SCM smob = SWIG_Guile_GetSmob(s);
  if (!scm_is_null(smob)) {
    if (SWIG_Guile_IsValidSmob(smob)) {
      SCM_SET_CELL_TYPE(smob, swig_tag);
    }
    else scm_wrong_type_arg(NULL, 0, s);
  }
}

/* Mark a pointer object destroyed */
SWIGINTERN void
SWIG_Guile_MarkPointerDestroyed(SCM s)
{
  SCM smob = SWIG_Guile_GetSmob(s);
  if (!scm_is_null(smob)) {
    if (SWIG_Guile_IsValidSmob(smob)) {
      SCM_SET_CELL_TYPE(smob, swig_destroyed_tag);
    }
    else scm_wrong_type_arg(NULL, 0, s);
  }
}

/* Member functions */

SWIGINTERN SCM
SWIG_Guile_NewMemberObj(void *ptr, size_t sz, swig_type_info *type,
			const char *func_name)
{
  SCM smob;
  void *copy = malloc(sz);
  memcpy(copy, ptr, sz);
  SCM_NEWSMOB2(smob, swig_member_function_tag, copy, (void *) type);
  return smob;
}

SWIGINTERN int
SWIG_Guile_ConvertMember(SCM smob, void *ptr, size_t sz, swig_type_info *type,
			 const char *func_name)
{
  swig_cast_info *cast;
  swig_type_info *from;

  if (SCM_SMOB_PREDICATE(swig_member_function_tag, smob)) {
    from = (swig_type_info *) SCM_CELL_WORD_2(smob);
    if (!from) return SWIG_ERROR;
    if (type) {
      cast = SWIG_TypeCheckStruct(from, type);
      if (!cast) return SWIG_ERROR;
    }
    memcpy(ptr, (void *) SCM_CELL_WORD_1(smob), sz);
    return SWIG_OK;
  }
  return SWIG_ERROR;
}
     

/* Init */

SWIGINTERN int
print_swig_aux (SCM swig_smob, SCM port, scm_print_state *pstate, 
                const char *attribute)
{
  swig_type_info *type;
  
  type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob);
  if (type) {
    scm_puts("#<", port);
    scm_puts(attribute, port);
    scm_puts("swig-pointer ", port);
    scm_puts(SWIG_TypePrettyName(type), port);
    scm_puts(" ", port);
    scm_intprint((long) SCM_CELL_WORD_1(swig_smob), 16, port);
    scm_puts(">", port);
    /* non-zero means success */
    return 1;
  } else {
    return 0;
  }
}

  
SWIGINTERN int
print_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
{
  return print_swig_aux(swig_smob, port, pstate, "");
}

SWIGINTERN int
print_collectable_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
{
  return print_swig_aux(swig_smob, port, pstate, "collectable-");
}

SWIGINTERN int
print_destroyed_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
{
  return print_swig_aux(swig_smob, port, pstate, "destroyed-");
}

SWIGINTERN int
print_member_function_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
{
  swig_type_info *type;
  type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob);
  if (type) {
    scm_puts("#<", port);
    scm_puts("swig-member-function-pointer ", port);
    scm_puts(SWIG_TypePrettyName(type), port);
    scm_puts(" >", port);
    /* non-zero means success */
    return 1;
  } else {
    return 0;
  }
}

SWIGINTERN SCM
equalp_swig (SCM A, SCM B)
{
  if (SCM_CELL_WORD_0(A) == SCM_CELL_WORD_0(B) && SCM_CELL_WORD_1(A) == SCM_CELL_WORD_1(B) 
      && SCM_CELL_WORD_2(A) == SCM_CELL_WORD_2(B))
    return SCM_BOOL_T;
  else return SCM_BOOL_F;
}

SWIGINTERN size_t
free_swig(SCM A)
{
  swig_type_info *type = (swig_type_info *) SCM_CELL_WORD_2(A);
  if (type) {
    if (type->clientdata && ((swig_guile_clientdata *)type->clientdata)->destroy)
      ((swig_guile_clientdata *)type->clientdata)->destroy(A);
  } 
  return 0;
}

SWIGINTERN size_t
free_swig_member_function(SCM A)
{
  free((swig_type_info *) SCM_CELL_WORD_1(A));
  return 0;
}

SWIGINTERN int
ensure_smob_tag(SCM swig_module,
		scm_t_bits *tag_variable,
		const char *smob_name,
		const char *scheme_variable_name)
{
  SCM variable = scm_module_variable(swig_module,
                             scm_from_locale_symbol(scheme_variable_name));
  if (scm_is_false(variable)) {
    *tag_variable = scm_make_smob_type(scheme_variable_name, 0);
    scm_c_module_define(swig_module, scheme_variable_name, 
                        scm_from_ulong(*tag_variable));
    return 1;
  }
  else {
    *tag_variable = scm_to_ulong(SCM_VARIABLE_REF(variable));
    return 0;
  }
}

SWIGINTERN SCM
SWIG_Guile_Init ()
{
  static SCM swig_module;
  
  if (swig_initialized) return swig_module;
  swig_initialized = 1;

  swig_module = scm_c_resolve_module("Swig swigrun");
  if (ensure_smob_tag(swig_module, &swig_tag,
		      "swig-pointer", "swig-pointer-tag")) {
    scm_set_smob_print(swig_tag, print_swig);
    scm_set_smob_equalp(swig_tag, equalp_swig);
  }
  if (ensure_smob_tag(swig_module, &swig_collectable_tag,
		      "collectable-swig-pointer", "collectable-swig-pointer-tag")) {
    scm_set_smob_print(swig_collectable_tag, print_collectable_swig);
    scm_set_smob_equalp(swig_collectable_tag, equalp_swig);
    scm_set_smob_free(swig_collectable_tag, free_swig);
    /* For Guile >= 2.0.12. See libguile/smob.c:clear_smobnum */
    swig_finalized_tag = swig_collectable_tag & ~0xff00;
  }
  if (ensure_smob_tag(swig_module, &swig_destroyed_tag,
		      "destroyed-swig-pointer", "destroyed-swig-pointer-tag")) {
    scm_set_smob_print(swig_destroyed_tag, print_destroyed_swig);
    scm_set_smob_equalp(swig_destroyed_tag, equalp_swig);
  }
  if (ensure_smob_tag(swig_module, &swig_member_function_tag,
		      "swig-member-function-pointer", "swig-member-function-pointer-tag")) {
    scm_set_smob_print(swig_member_function_tag, print_member_function_swig);
    scm_set_smob_free(swig_member_function_tag, free_swig_member_function);
  }
  swig_make_func = scm_permanent_object(
  scm_variable_ref(scm_c_module_lookup(scm_c_resolve_module("oop goops"), "make")));
  swig_keyword = scm_permanent_object(scm_from_locale_keyword("init-smob"));
  swig_symbol = scm_permanent_object(scm_from_locale_symbol("swig-smob"));
#ifdef SWIG_INIT_RUNTIME_MODULE
  SWIG_INIT_RUNTIME_MODULE
#endif

  return swig_module;
}

SWIGINTERN swig_module_info *
SWIG_Guile_GetModule(void *SWIGUNUSEDPARM(clientdata))
{
  SCM module = SWIG_Guile_Init();
  SCM variable = scm_module_variable(module, scm_from_locale_symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME));
  if (scm_is_false(variable)) {
    return NULL;
  } else {
    return (swig_module_info *) scm_to_ulong(SCM_VARIABLE_REF(variable));
  }
}

SWIGINTERN void
SWIG_Guile_SetModule(swig_module_info *swig_module)
{
  SCM module = SWIG_Guile_Init();
  scm_module_define(module,
                    scm_from_locale_symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME),
                    scm_from_ulong((unsigned long) swig_module));
}

SWIGINTERN int
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
		    int reqargs, int optargs,
		    const char *procname)
{
  int i;
  int num_args_passed = 0;
  for (i = 0; i<reqargs; i++) {
    if (!scm_is_pair(rest))
      scm_wrong_num_args(scm_from_utf8_string(procname ? procname : "unknown procedure"));
    *dest++ = SCM_CAR(rest);
    rest = SCM_CDR(rest);
    num_args_passed++;
  }
  for (i = 0; i<optargs && scm_is_pair(rest); i++) {
    *dest++ = SCM_CAR(rest);
    rest = SCM_CDR(rest);
    num_args_passed++;
  }
  for (; i<optargs; i++)
    *dest++ = SCM_UNDEFINED;
  if (!scm_is_null(rest))
      scm_wrong_num_args(scm_from_utf8_string(procname ? procname : "unknown procedure"));
  return num_args_passed;
}

#ifdef __cplusplus
}
#endif



#define GUILE_MAYBE_VALUES \
      if (gswig_list_p) gswig_result = scm_values(gswig_result);

#define GUILE_MAYBE_VECTOR \
      if (gswig_list_p) gswig_result = scm_vector(gswig_result);

#define SWIG_APPEND_VALUE(object)						\
    if (gswig_result == SCM_UNSPECIFIED)						\
        gswig_result = object;							\
    else {									\
      if (!gswig_list_p) {							\
	      gswig_list_p = 1;							\
	      gswig_result = scm_list_n(gswig_result, object, SCM_UNDEFINED);	\
      }									\
      else									\
            gswig_result = scm_append(scm_list_n(gswig_result, scm_list_n(object, SCM_UNDEFINED), SCM_UNDEFINED));		\
    }


/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13


static swig_guile_clientdata _swig_guile_clientdatabad_cast = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatabad_exception = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatalogic_error = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatadomain_error = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatainvalid_argument = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatalength_error = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdataout_of_range = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdataruntime_error = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatarange_error = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdataoverflow_error = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdataunderflow_error = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatanlopt_doublevector = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatanlopt_roundoff_limited = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatanlopt_forced_stop = { NULL, SCM_EOL };
static swig_guile_clientdata _swig_guile_clientdatanlopt_opt = { NULL, SCM_EOL };

/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_difference_type swig_types[0]
#define SWIGTYPE_p_double swig_types[1]
#define SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double swig_types[2]
#define SWIGTYPE_p_int swig_types[3]
#define SWIGTYPE_p_nlopt__forced_stop swig_types[4]
#define SWIGTYPE_p_nlopt__opt swig_types[5]
#define SWIGTYPE_p_nlopt__roundoff_limited swig_types[6]
#define SWIGTYPE_p_nlopt_func swig_types[7]
#define SWIGTYPE_p_nlopt_mfunc swig_types[8]
#define SWIGTYPE_p_nlopt_munge swig_types[9]
#define SWIGTYPE_p_size_type swig_types[10]
#define SWIGTYPE_p_std__bad_cast swig_types[11]
#define SWIGTYPE_p_std__bad_exception swig_types[12]
#define SWIGTYPE_p_std__domain_error swig_types[13]
#define SWIGTYPE_p_std__exception swig_types[14]
#define SWIGTYPE_p_std__functionT_double_funsigned_int_double_const_p_double_pF_t swig_types[15]
#define SWIGTYPE_p_std__invalid_argument swig_types[16]
#define SWIGTYPE_p_std__length_error swig_types[17]
#define SWIGTYPE_p_std__logic_error swig_types[18]
#define SWIGTYPE_p_std__out_of_range swig_types[19]
#define SWIGTYPE_p_std__overflow_error swig_types[20]
#define SWIGTYPE_p_std__range_error swig_types[21]
#define SWIGTYPE_p_std__runtime_error swig_types[22]
#define SWIGTYPE_p_std__underflow_error swig_types[23]
#define SWIGTYPE_p_std__vectorT_double_t swig_types[24]
#define SWIGTYPE_p_unsigned_long swig_types[25]
#define SWIGTYPE_p_value_type swig_types[26]
static swig_type_info *swig_types[28];
static swig_module_info swig_module = {swig_types, 27, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */


#ifdef __cplusplus
#include <utility>
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigSmartPointer {
    T *ptr;
    SwigSmartPointer(T *p) : ptr(p) { }
    ~SwigSmartPointer() { delete ptr; }
    SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
    void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
#if __cplusplus >=201103L
  SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
  operator T&&() const { return std::move(*pointer.ptr); }
#else
  operator T&() const { return *pointer.ptr; }
#endif
  T *operator&() const { return pointer.ptr; }
  static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
};

/*
 * SwigValueInit() is a generic initialisation solution as the following approach:
 * 
 *       T c_result = T();
 * 
 * doesn't compile for all types for example:
 * 
 *       unsigned int c_result = unsigned int();
 */
template <typename T> T SwigValueInit() {
  return T();
}

#if __cplusplus >=201103L
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
#else
# define SWIG_STD_MOVE(OBJ) OBJ
#endif

#endif

#if defined(__cplusplus) && (__cplusplus >=201103L)
# define SWIG_OVERRIDE override
#else
# define SWIG_OVERRIDE
#endif



#include "nlopt.hpp"


  SWIGINTERN void SWIG_exception_ (int code, const char *msg,
                               const char *subr) {
#define ERROR(scmerr)					\
	scm_error(scm_from_locale_string(scmerr),	\
		  subr, msg, SCM_EOL, SCM_BOOL_F)
#define MAP(swigerr, scmerr)			\
	case swigerr:				\
	  ERROR(scmerr);			\
	  break
    switch (code) {
      MAP(SWIG_MemoryError,	    "swig-memory-error");
      MAP(SWIG_IOError,		    "swig-io-error");
      MAP(SWIG_RuntimeError,	    "swig-runtime-error");
      MAP(SWIG_IndexError,	    "swig-index-error");
      MAP(SWIG_TypeError,	    "swig-type-error");
      MAP(SWIG_DivisionByZero,	    "swig-division-by-zero");
      MAP(SWIG_OverflowError,	    "swig-overflow-error");
      MAP(SWIG_SyntaxError,	    "swig-syntax-error");
      MAP(SWIG_ValueError,	    "swig-value-error");
      MAP(SWIG_SystemError,	    "swig-system-error");
      MAP(SWIG_NullReferenceError,  "swig-null-reference-error");
    default:
      ERROR("swig-error");
    }
#undef ERROR
#undef MAP
  }

#define SWIG_exception(a,b) SWIG_exception_(a, b, FUNC_NAME)


#include <typeinfo>
#include <stdexcept>


#include <string>


#include <typeinfo>
#include <stdexcept>


#include <typeinfo>
#include <stdexcept>


#include <string>

SWIGINTERNINLINE
std::string SWIG_scm2string(SCM x) {
    char* temp;
    temp = SWIG_scm2str(x);
    std::string s(temp);
    SWIG_free(temp);
    return s;
}


#include <vector>
#include <algorithm>
#include <stdexcept>

SWIGINTERN double std_vector_Sl_double_Sg__pop(std::vector< double > *self){
                if (self->size() == 0)
                    throw std::out_of_range("pop from empty vector");
                double x = self->back();
                self->pop_back();
                return x;
            }
SWIGINTERN double std_vector_Sl_double_Sg__ref(std::vector< double > *self,int i){
                int size = int(self->size());
                if (i>=0 && i<size)
                    return (*self)[i];
                else
                    throw std::out_of_range("vector index out of range");
            }
SWIGINTERN void std_vector_Sl_double_Sg__set(std::vector< double > *self,int i,double x){
                int size = int(self->size());
                if (i>=0 && i<size)
                    (*self)[i] = x;
                else
                    throw std::out_of_range("vector index out of range");
            }

// work around obsolete stuff used by swig guile
#if SCM_MAJOR_VERSION >= 2
#  define gh_symbol2scm scm_from_latin1_symbol
#  undef scm_listify
#  define scm_listify scm_list_n
#else
#  define gh_symbol2scm scm_str2symbol
#endif


// because our f_data pointer to the Scheme function is stored on the
// heap, rather than the stack, it may be missed by the Guile garbage
// collection and be accidentally freed.  Hence, use NLopts munge
// feature to prevent this, by incrementing Guile's reference count.
static void *free_guilefunc(void *p) {
  scm_gc_unprotect_object((SCM) p); return p; }
static void *dup_guilefunc(void *p) {
  scm_gc_protect_object((SCM) p); return p; }

// func wrapper around Guile function val = f(x, grad)
static double func_guile(unsigned n, const double *x, double *grad, void *f) {
  SCM xscm = scm_c_make_vector(n, SCM_UNSPECIFIED);
  for (unsigned i = 0; i < n; ++i)
    SCM_SIMPLE_VECTOR_SET(xscm, i, scm_from_double(x[i]));
  SCM grad_scm = grad ? scm_c_make_vector(n, SCM_UNSPECIFIED) : SCM_BOOL_F;
  SCM ret = scm_call_2((SCM) f, xscm, grad_scm);
  if (!scm_is_real(ret))
    throw std::invalid_argument("invalid result passed to nlopt");
  if (grad) {
    for (unsigned i = 0; i < n; ++i) {
      if (!scm_is_real(ret))
	throw std::invalid_argument("invalid gradient passed to nlopt");
      grad[i] = scm_to_double(SCM_SIMPLE_VECTOR_REF(grad_scm, i));
    }
  }
  return scm_to_double(ret);
}

static int gswig_const_NLOPT_GN_DIRECT = (int)(nlopt::GN_DIRECT);
static int gswig_const_NLOPT_GN_DIRECT_L = (int)(nlopt::GN_DIRECT_L);
static int gswig_const_NLOPT_GN_DIRECT_L_RAND = (int)(nlopt::GN_DIRECT_L_RAND);
static int gswig_const_NLOPT_GN_DIRECT_NOSCAL = (int)(nlopt::GN_DIRECT_NOSCAL);
static int gswig_const_NLOPT_GN_DIRECT_L_NOSCAL = (int)(nlopt::GN_DIRECT_L_NOSCAL);
static int gswig_const_NLOPT_GN_DIRECT_L_RAND_NOSCAL = (int)(nlopt::GN_DIRECT_L_RAND_NOSCAL);
static int gswig_const_NLOPT_GN_ORIG_DIRECT = (int)(nlopt::GN_ORIG_DIRECT);
static int gswig_const_NLOPT_GN_ORIG_DIRECT_L = (int)(nlopt::GN_ORIG_DIRECT_L);
static int gswig_const_NLOPT_GD_STOGO = (int)(nlopt::GD_STOGO);
static int gswig_const_NLOPT_GD_STOGO_RAND = (int)(nlopt::GD_STOGO_RAND);
static int gswig_const_NLOPT_LD_LBFGS_NOCEDAL = (int)(nlopt::LD_LBFGS_NOCEDAL);
static int gswig_const_NLOPT_LD_LBFGS = (int)(nlopt::LD_LBFGS);
static int gswig_const_NLOPT_LN_PRAXIS = (int)(nlopt::LN_PRAXIS);
static int gswig_const_NLOPT_LD_VAR1 = (int)(nlopt::LD_VAR1);
static int gswig_const_NLOPT_LD_VAR2 = (int)(nlopt::LD_VAR2);
static int gswig_const_NLOPT_LD_TNEWTON = (int)(nlopt::LD_TNEWTON);
static int gswig_const_NLOPT_LD_TNEWTON_RESTART = (int)(nlopt::LD_TNEWTON_RESTART);
static int gswig_const_NLOPT_LD_TNEWTON_PRECOND = (int)(nlopt::LD_TNEWTON_PRECOND);
static int gswig_const_NLOPT_LD_TNEWTON_PRECOND_RESTART = (int)(nlopt::LD_TNEWTON_PRECOND_RESTART);
static int gswig_const_NLOPT_GN_CRS2_LM = (int)(nlopt::GN_CRS2_LM);
static int gswig_const_NLOPT_GN_MLSL = (int)(nlopt::GN_MLSL);
static int gswig_const_NLOPT_GD_MLSL = (int)(nlopt::GD_MLSL);
static int gswig_const_NLOPT_GN_MLSL_LDS = (int)(nlopt::GN_MLSL_LDS);
static int gswig_const_NLOPT_GD_MLSL_LDS = (int)(nlopt::GD_MLSL_LDS);
static int gswig_const_NLOPT_LD_MMA = (int)(nlopt::LD_MMA);
static int gswig_const_NLOPT_LN_COBYLA = (int)(nlopt::LN_COBYLA);
static int gswig_const_NLOPT_LN_NEWUOA = (int)(nlopt::LN_NEWUOA);
static int gswig_const_NLOPT_LN_NEWUOA_BOUND = (int)(nlopt::LN_NEWUOA_BOUND);
static int gswig_const_NLOPT_LN_NELDERMEAD = (int)(nlopt::LN_NELDERMEAD);
static int gswig_const_NLOPT_LN_SBPLX = (int)(nlopt::LN_SBPLX);
static int gswig_const_NLOPT_LN_AUGLAG = (int)(nlopt::LN_AUGLAG);
static int gswig_const_NLOPT_LD_AUGLAG = (int)(nlopt::LD_AUGLAG);
static int gswig_const_NLOPT_LN_AUGLAG_EQ = (int)(nlopt::LN_AUGLAG_EQ);
static int gswig_const_NLOPT_LD_AUGLAG_EQ = (int)(nlopt::LD_AUGLAG_EQ);
static int gswig_const_NLOPT_LN_BOBYQA = (int)(nlopt::LN_BOBYQA);
static int gswig_const_NLOPT_GN_ISRES = (int)(nlopt::GN_ISRES);
static int gswig_const_NLOPT_AUGLAG = (int)(nlopt::AUGLAG);
static int gswig_const_NLOPT_AUGLAG_EQ = (int)(nlopt::AUGLAG_EQ);
static int gswig_const_NLOPT_G_MLSL = (int)(nlopt::G_MLSL);
static int gswig_const_NLOPT_G_MLSL_LDS = (int)(nlopt::G_MLSL_LDS);
static int gswig_const_NLOPT_LD_SLSQP = (int)(nlopt::LD_SLSQP);
static int gswig_const_NLOPT_LD_CCSAQ = (int)(nlopt::LD_CCSAQ);
static int gswig_const_NLOPT_GN_ESCH = (int)(nlopt::GN_ESCH);
static int gswig_const_NLOPT_GN_AGS = (int)(nlopt::GN_AGS);
static int gswig_const_NLOPT_NUM_ALGORITHMS = (int)(nlopt::NUM_ALGORITHMS);
static int gswig_const_NLOPT_FAILURE = (int)(nlopt::FAILURE);
static int gswig_const_NLOPT_INVALID_ARGS = (int)(nlopt::INVALID_ARGS);
static int gswig_const_NLOPT_OUT_OF_MEMORY = (int)(nlopt::OUT_OF_MEMORY);
static int gswig_const_NLOPT_ROUNDOFF_LIMITED = (int)(nlopt::ROUNDOFF_LIMITED);
static int gswig_const_NLOPT_FORCED_STOP = (int)(nlopt::FORCED_STOP);
static int gswig_const_NLOPT_NUM_FAILURES = (int)(nlopt::NUM_FAILURES);
static int gswig_const_NLOPT_SUCCESS = (int)(nlopt::SUCCESS);
static int gswig_const_NLOPT_STOPVAL_REACHED = (int)(nlopt::STOPVAL_REACHED);
static int gswig_const_NLOPT_FTOL_REACHED = (int)(nlopt::FTOL_REACHED);
static int gswig_const_NLOPT_XTOL_REACHED = (int)(nlopt::XTOL_REACHED);
static int gswig_const_NLOPT_MAXEVAL_REACHED = (int)(nlopt::MAXEVAL_REACHED);
static int gswig_const_NLOPT_MAXTIME_REACHED = (int)(nlopt::MAXTIME_REACHED);
static int gswig_const_NLOPT_NUM_RESULTS = (int)(nlopt::NUM_RESULTS);
static SCM
_wrap_new_bad_cast ()
{
#define FUNC_NAME "new-bad-cast"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::bad_cast *result = 0 ;
  
  result = (std::bad_cast *)new std::bad_cast();
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__bad_cast, 1);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_bad_cast (SCM s_0)
{
#define FUNC_NAME "delete-bad-cast"
  std::bad_cast *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::bad_cast *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__bad_cast, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_bad_exception ()
{
#define FUNC_NAME "new-bad-exception"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::bad_exception *result = 0 ;
  
  result = (std::bad_exception *)new std::bad_exception();
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__bad_exception, 1);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_bad_exception (SCM s_0)
{
#define FUNC_NAME "delete-bad-exception"
  std::bad_exception *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::bad_exception *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__bad_exception, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_logic_error (SCM s_0)
{
#define FUNC_NAME "new-logic-error"
  std::string *arg1 = 0 ;
  std::string temp1 ;
  char *tempptr1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::logic_error *result = 0 ;
  
  {
    if (scm_is_string(s_0)) {
      tempptr1 = SWIG_scm2str(s_0);
      temp1.assign(tempptr1);
      SWIG_free(tempptr1);
      arg1 = &temp1;
    } else {
      SWIG_exception(SWIG_TypeError, "string expected");
    }
  }
  result = (std::logic_error *)new std::logic_error((std::string const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__logic_error, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_logic_error (SCM s_0)
{
#define FUNC_NAME "delete-logic-error"
  std::logic_error *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::logic_error *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__logic_error, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_domain_error (SCM s_0)
{
#define FUNC_NAME "new-domain-error"
  std::string *arg1 = 0 ;
  std::string temp1 ;
  char *tempptr1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::domain_error *result = 0 ;
  
  {
    if (scm_is_string(s_0)) {
      tempptr1 = SWIG_scm2str(s_0);
      temp1.assign(tempptr1);
      SWIG_free(tempptr1);
      arg1 = &temp1;
    } else {
      SWIG_exception(SWIG_TypeError, "string expected");
    }
  }
  result = (std::domain_error *)new std::domain_error((std::string const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__domain_error, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_domain_error (SCM s_0)
{
#define FUNC_NAME "delete-domain-error"
  std::domain_error *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::domain_error *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__domain_error, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_invalid_argument (SCM s_0)
{
#define FUNC_NAME "new-invalid-argument"
  std::string *arg1 = 0 ;
  std::string temp1 ;
  char *tempptr1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::invalid_argument *result = 0 ;
  
  {
    if (scm_is_string(s_0)) {
      tempptr1 = SWIG_scm2str(s_0);
      temp1.assign(tempptr1);
      SWIG_free(tempptr1);
      arg1 = &temp1;
    } else {
      SWIG_exception(SWIG_TypeError, "string expected");
    }
  }
  result = (std::invalid_argument *)new std::invalid_argument((std::string const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__invalid_argument, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_invalid_argument (SCM s_0)
{
#define FUNC_NAME "delete-invalid-argument"
  std::invalid_argument *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::invalid_argument *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__invalid_argument, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_length_error (SCM s_0)
{
#define FUNC_NAME "new-length-error"
  std::string *arg1 = 0 ;
  std::string temp1 ;
  char *tempptr1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::length_error *result = 0 ;
  
  {
    if (scm_is_string(s_0)) {
      tempptr1 = SWIG_scm2str(s_0);
      temp1.assign(tempptr1);
      SWIG_free(tempptr1);
      arg1 = &temp1;
    } else {
      SWIG_exception(SWIG_TypeError, "string expected");
    }
  }
  result = (std::length_error *)new std::length_error((std::string const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__length_error, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_length_error (SCM s_0)
{
#define FUNC_NAME "delete-length-error"
  std::length_error *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::length_error *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__length_error, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_out_of_range (SCM s_0)
{
#define FUNC_NAME "new-out-of-range"
  std::string *arg1 = 0 ;
  std::string temp1 ;
  char *tempptr1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::out_of_range *result = 0 ;
  
  {
    if (scm_is_string(s_0)) {
      tempptr1 = SWIG_scm2str(s_0);
      temp1.assign(tempptr1);
      SWIG_free(tempptr1);
      arg1 = &temp1;
    } else {
      SWIG_exception(SWIG_TypeError, "string expected");
    }
  }
  result = (std::out_of_range *)new std::out_of_range((std::string const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__out_of_range, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_out_of_range (SCM s_0)
{
#define FUNC_NAME "delete-out-of-range"
  std::out_of_range *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::out_of_range *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__out_of_range, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_runtime_error (SCM s_0)
{
#define FUNC_NAME "new-runtime-error"
  std::string *arg1 = 0 ;
  std::string temp1 ;
  char *tempptr1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::runtime_error *result = 0 ;
  
  {
    if (scm_is_string(s_0)) {
      tempptr1 = SWIG_scm2str(s_0);
      temp1.assign(tempptr1);
      SWIG_free(tempptr1);
      arg1 = &temp1;
    } else {
      SWIG_exception(SWIG_TypeError, "string expected");
    }
  }
  result = (std::runtime_error *)new std::runtime_error((std::string const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__runtime_error, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_runtime_error (SCM s_0)
{
#define FUNC_NAME "delete-runtime-error"
  std::runtime_error *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::runtime_error *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__runtime_error, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_range_error (SCM s_0)
{
#define FUNC_NAME "new-range-error"
  std::string *arg1 = 0 ;
  std::string temp1 ;
  char *tempptr1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::range_error *result = 0 ;
  
  {
    if (scm_is_string(s_0)) {
      tempptr1 = SWIG_scm2str(s_0);
      temp1.assign(tempptr1);
      SWIG_free(tempptr1);
      arg1 = &temp1;
    } else {
      SWIG_exception(SWIG_TypeError, "string expected");
    }
  }
  result = (std::range_error *)new std::range_error((std::string const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__range_error, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_range_error (SCM s_0)
{
#define FUNC_NAME "delete-range-error"
  std::range_error *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::range_error *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__range_error, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_overflow_error (SCM s_0)
{
#define FUNC_NAME "new-overflow-error"
  std::string *arg1 = 0 ;
  std::string temp1 ;
  char *tempptr1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::overflow_error *result = 0 ;
  
  {
    if (scm_is_string(s_0)) {
      tempptr1 = SWIG_scm2str(s_0);
      temp1.assign(tempptr1);
      SWIG_free(tempptr1);
      arg1 = &temp1;
    } else {
      SWIG_exception(SWIG_TypeError, "string expected");
    }
  }
  result = (std::overflow_error *)new std::overflow_error((std::string const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__overflow_error, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_overflow_error (SCM s_0)
{
#define FUNC_NAME "delete-overflow-error"
  std::overflow_error *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::overflow_error *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__overflow_error, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_underflow_error (SCM s_0)
{
#define FUNC_NAME "new-underflow-error"
  std::string *arg1 = 0 ;
  std::string temp1 ;
  char *tempptr1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::underflow_error *result = 0 ;
  
  {
    if (scm_is_string(s_0)) {
      tempptr1 = SWIG_scm2str(s_0);
      temp1.assign(tempptr1);
      SWIG_free(tempptr1);
      arg1 = &temp1;
    } else {
      SWIG_exception(SWIG_TypeError, "string expected");
    }
  }
  result = (std::underflow_error *)new std::underflow_error((std::string const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__underflow_error, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_underflow_error (SCM s_0)
{
#define FUNC_NAME "delete-underflow-error"
  std::underflow_error *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::underflow_error *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__underflow_error, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_doublevector__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "new-nlopt-doublevector"
  unsigned int arg1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > *result = 0 ;
  
  {
    arg1 = (unsigned int) scm_to_uint(argv[0]);
  }
  result = (std::vector< double > *)new std::vector< double >(arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__vectorT_double_t, 1);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_doublevector__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "new-nlopt-doublevector"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > *result = 0 ;
  
  result = (std::vector< double > *)new std::vector< double >();
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__vectorT_double_t, 1);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_doublevector__SWIG_2 (int argc, SCM *argv)
{
#define FUNC_NAME "new-nlopt-doublevector"
  unsigned int arg1 ;
  double *arg2 = 0 ;
  double temp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > *result = 0 ;
  
  {
    arg1 = (unsigned int) scm_to_uint(argv[0]);
  }
  {
    temp2 = scm_to_double(argv[1]);
    arg2 = (double *) &temp2;
  }
  result = (std::vector< double > *)new std::vector< double >(arg1,(double const &)*arg2);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__vectorT_double_t, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_doublevector__SWIG_3 (int argc, SCM *argv)
{
#define FUNC_NAME "new-nlopt-doublevector"
  std::vector< double > *arg1 = 0 ;
  std::vector< double > temp1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > *result = 0 ;
  
  {
    if (scm_is_vector(argv[0])) {
      unsigned long size = scm_c_vector_length(argv[0]);
      temp1 = std::vector< double >(size);
      arg1 = &temp1;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[0],scm_from_ulong(i));
        if (scm_is_number(o))
        temp1[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 1, argv[0]);
      }
    } else if (scm_is_null(argv[0])) {
      temp1 = std::vector< double >();
      arg1 = &temp1;
    } else if (scm_is_pair(argv[0])) {
      SCM v = scm_vector(argv[0]);
      unsigned long size = scm_c_vector_length(v);
      temp1 = std::vector< double >(size);
      arg1 = &temp1;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp1[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 1, argv[0]);
      }
    } else {
      arg1 = (std::vector< double > *) SWIG_MustGetPtr(argv[0],SWIGTYPE_p_std__vectorT_double_t,1, 0);
    }
  }
  result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1);
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_std__vectorT_double_t, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_doublevector(SCM rest)
{
#define FUNC_NAME "new-nlopt-doublevector"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "new-nlopt-doublevector");
  if (argc == 0) {
    return _wrap_new_nlopt_doublevector__SWIG_1(argc,argv);
  }
  if (argc == 1) {
    int _v = 0;
    {
      _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0;
    }
    if (_v) {
      return _wrap_new_nlopt_doublevector__SWIG_0(argc,argv);
    }
  }
  if (argc == 1) {
    int _v = 0;
    {
      /* native sequence? */
      if (scm_is_vector(argv[0])) {
        unsigned int size = scm_c_vector_length(argv[0]);
        if (size == 0) {
          /* an empty sequence can be of any type */
          _v = 1;
        } else {
          /* check the first element only */
          SCM o = scm_vector_ref(argv[0],scm_from_ulong(0));
          _v = scm_is_number(o) ? 1 : 0;
        }
      } else if (scm_is_null(argv[0])) {
        /* again, an empty sequence can be of any type */
        _v = 1;
      } else if (scm_is_pair(argv[0])) {
        /* check the first element only */
        SCM head = SCM_CAR(argv[0]);
        _v = scm_is_number(head) ? 1 : 0;
      } else {
        /* wrapped vector? */
        std::vector< double >* v;
        _v = (SWIG_ConvertPtr(argv[0],(void **) &v, 
            SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
      }
    }
    if (_v) {
      return _wrap_new_nlopt_doublevector__SWIG_3(argc,argv);
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0;
    }
    if (_v) {
      {
        _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_new_nlopt_doublevector__SWIG_2(argc,argv);
      }
    }
  }
  
  scm_misc_error("new-nlopt-doublevector", "No matching method for generic function `new_nlopt_doublevector'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_doublevector_length (SCM s_0)
{
#define FUNC_NAME "nlopt-doublevector-length"
  std::vector< double > *arg1 = 0 ;
  std::vector< double > temp1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  unsigned int result;
  
  {
    if (scm_is_vector(s_0)) {
      unsigned long size = scm_c_vector_length(s_0);
      temp1 = std::vector< double >(size);
      arg1 = &temp1;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(s_0,scm_from_ulong(i));
        if (scm_is_number(o))
        temp1[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 1, s_0);
      }
    } else if (scm_is_null(s_0)) {
      temp1 = std::vector< double >();
      arg1 = &temp1;
    } else if (scm_is_pair(s_0)) {
      SCM v = scm_vector(s_0);
      unsigned long size = scm_c_vector_length(v);
      temp1 = std::vector< double >(size);
      arg1 = &temp1;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp1[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 1, s_0);
      }
    } else {
      arg1 = (std::vector< double > *) SWIG_MustGetPtr(s_0,SWIGTYPE_p_std__vectorT_double_t,1, 0);
    }
  }
  result = (unsigned int)((std::vector< double > const *)arg1)->size();
  {
    gswig_result = scm_from_ulong(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_doublevector_emptyq___ (SCM s_0)
{
#define FUNC_NAME "nlopt-doublevector-empty?"
  std::vector< double > *arg1 = 0 ;
  std::vector< double > temp1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  bool result;
  
  {
    if (scm_is_vector(s_0)) {
      unsigned long size = scm_c_vector_length(s_0);
      temp1 = std::vector< double >(size);
      arg1 = &temp1;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(s_0,scm_from_ulong(i));
        if (scm_is_number(o))
        temp1[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 1, s_0);
      }
    } else if (scm_is_null(s_0)) {
      temp1 = std::vector< double >();
      arg1 = &temp1;
    } else if (scm_is_pair(s_0)) {
      SCM v = scm_vector(s_0);
      unsigned long size = scm_c_vector_length(v);
      temp1 = std::vector< double >(size);
      arg1 = &temp1;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp1[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 1, s_0);
      }
    } else {
      arg1 = (std::vector< double > *) SWIG_MustGetPtr(s_0,SWIGTYPE_p_std__vectorT_double_t,1, 0);
    }
  }
  result = (bool)((std::vector< double > const *)arg1)->empty();
  {
    gswig_result = scm_from_bool(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_doublevector_clearN___ (SCM s_0)
{
#define FUNC_NAME "nlopt-doublevector-clear!"
  std::vector< double > *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
  }
  (arg1)->clear();
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_doublevector_pushN___ (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-doublevector-push!"
  std::vector< double > *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(s_1);
  }
  (arg1)->push_back(arg2);
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_doublevector_popN___ (SCM s_0)
{
#define FUNC_NAME "nlopt-doublevector-pop!"
  std::vector< double > *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  double result;
  
  {
    arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
  }
  try {
    result = (double)std_vector_Sl_double_Sg__pop(arg1);
  } catch(std::out_of_range &_e) {
    {
      std::out_of_range * temp = new std::out_of_range(_e);
      scm_throw(scm_from_locale_symbol("swig-exception"),
        scm_list_n(SWIG_NewPointerObj(temp, SWIGTYPE_p_std__out_of_range, 1),
          SCM_UNDEFINED));
    }
  }
  {
    gswig_result = scm_from_double(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_doublevector_ref (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-doublevector-ref"
  std::vector< double > *arg1 = 0 ;
  int arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  double result;
  
  {
    arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
  }
  {
    arg2 = (int) scm_to_int(s_1);
  }
  try {
    result = (double)std_vector_Sl_double_Sg__ref(arg1,arg2);
  } catch(std::out_of_range &_e) {
    {
      std::out_of_range * temp = new std::out_of_range(_e);
      scm_throw(scm_from_locale_symbol("swig-exception"),
        scm_list_n(SWIG_NewPointerObj(temp, SWIGTYPE_p_std__out_of_range, 1),
          SCM_UNDEFINED));
    }
  }
  {
    gswig_result = scm_from_double(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_doublevector_setN___ (SCM s_0, SCM s_1, SCM s_2)
{
#define FUNC_NAME "nlopt-doublevector-set!"
  std::vector< double > *arg1 = 0 ;
  int arg2 ;
  double arg3 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
  }
  {
    arg2 = (int) scm_to_int(s_1);
  }
  {
    arg3 = (double) scm_to_double(s_2);
  }
  try {
    std_vector_Sl_double_Sg__set(arg1,arg2,arg3);
  } catch(std::out_of_range &_e) {
    {
      std::out_of_range * temp = new std::out_of_range(_e);
      scm_throw(scm_from_locale_symbol("swig-exception"),
        scm_list_n(SWIG_NewPointerObj(temp, SWIGTYPE_p_std__out_of_range, 1),
          SCM_UNDEFINED));
    }
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_nlopt_doublevector (SCM s_0)
{
#define FUNC_NAME "delete-nlopt-doublevector"
  std::vector< double > *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (std::vector< double > *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_std__vectorT_double_t, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_DIRECT(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-DIRECT"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_DIRECT_L(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-DIRECT-L"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_L);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_DIRECT_L_RAND(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-DIRECT-L-RAND"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_L_RAND);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_DIRECT_NOSCAL(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-DIRECT-NOSCAL"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_NOSCAL);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_DIRECT_L_NOSCAL(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-DIRECT-L-NOSCAL"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_L_NOSCAL);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_DIRECT_L_RAND_NOSCAL(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-DIRECT-L-RAND-NOSCAL"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_DIRECT_L_RAND_NOSCAL);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_ORIG_DIRECT(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-ORIG-DIRECT"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_ORIG_DIRECT);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_ORIG_DIRECT_L(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-ORIG-DIRECT-L"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_ORIG_DIRECT_L);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GD_STOGO(SCM s_0)
{
#define FUNC_NAME "NLOPT-GD-STOGO"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GD_STOGO);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GD_STOGO_RAND(SCM s_0)
{
#define FUNC_NAME "NLOPT-GD-STOGO-RAND"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GD_STOGO_RAND);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_LBFGS_NOCEDAL(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-LBFGS-NOCEDAL"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_LBFGS_NOCEDAL);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_LBFGS(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-LBFGS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_LBFGS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LN_PRAXIS(SCM s_0)
{
#define FUNC_NAME "NLOPT-LN-PRAXIS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LN_PRAXIS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_VAR1(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-VAR1"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_VAR1);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_VAR2(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-VAR2"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_VAR2);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_TNEWTON(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-TNEWTON"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_TNEWTON);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_TNEWTON_RESTART(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-TNEWTON-RESTART"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_TNEWTON_RESTART);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_TNEWTON_PRECOND(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-TNEWTON-PRECOND"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_TNEWTON_PRECOND);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_TNEWTON_PRECOND_RESTART(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-TNEWTON-PRECOND-RESTART"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_TNEWTON_PRECOND_RESTART);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_CRS2_LM(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-CRS2-LM"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_CRS2_LM);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_MLSL(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-MLSL"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_MLSL);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GD_MLSL(SCM s_0)
{
#define FUNC_NAME "NLOPT-GD-MLSL"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GD_MLSL);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_MLSL_LDS(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-MLSL-LDS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_MLSL_LDS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GD_MLSL_LDS(SCM s_0)
{
#define FUNC_NAME "NLOPT-GD-MLSL-LDS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GD_MLSL_LDS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_MMA(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-MMA"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_MMA);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LN_COBYLA(SCM s_0)
{
#define FUNC_NAME "NLOPT-LN-COBYLA"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LN_COBYLA);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LN_NEWUOA(SCM s_0)
{
#define FUNC_NAME "NLOPT-LN-NEWUOA"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LN_NEWUOA);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LN_NEWUOA_BOUND(SCM s_0)
{
#define FUNC_NAME "NLOPT-LN-NEWUOA-BOUND"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LN_NEWUOA_BOUND);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LN_NELDERMEAD(SCM s_0)
{
#define FUNC_NAME "NLOPT-LN-NELDERMEAD"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LN_NELDERMEAD);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LN_SBPLX(SCM s_0)
{
#define FUNC_NAME "NLOPT-LN-SBPLX"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LN_SBPLX);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LN_AUGLAG(SCM s_0)
{
#define FUNC_NAME "NLOPT-LN-AUGLAG"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LN_AUGLAG);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_AUGLAG(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-AUGLAG"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_AUGLAG);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LN_AUGLAG_EQ(SCM s_0)
{
#define FUNC_NAME "NLOPT-LN-AUGLAG-EQ"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LN_AUGLAG_EQ);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_AUGLAG_EQ(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-AUGLAG-EQ"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_AUGLAG_EQ);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LN_BOBYQA(SCM s_0)
{
#define FUNC_NAME "NLOPT-LN-BOBYQA"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LN_BOBYQA);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_ISRES(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-ISRES"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_ISRES);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_AUGLAG(SCM s_0)
{
#define FUNC_NAME "NLOPT-AUGLAG"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_AUGLAG);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_AUGLAG_EQ(SCM s_0)
{
#define FUNC_NAME "NLOPT-AUGLAG-EQ"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_AUGLAG_EQ);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_G_MLSL(SCM s_0)
{
#define FUNC_NAME "NLOPT-G-MLSL"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_G_MLSL);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_G_MLSL_LDS(SCM s_0)
{
#define FUNC_NAME "NLOPT-G-MLSL-LDS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_G_MLSL_LDS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_SLSQP(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-SLSQP"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_SLSQP);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_LD_CCSAQ(SCM s_0)
{
#define FUNC_NAME "NLOPT-LD-CCSAQ"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_LD_CCSAQ);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_ESCH(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-ESCH"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_ESCH);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_GN_AGS(SCM s_0)
{
#define FUNC_NAME "NLOPT-GN-AGS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_GN_AGS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_NUM_ALGORITHMS(SCM s_0)
{
#define FUNC_NAME "NLOPT-NUM-ALGORITHMS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_NUM_ALGORITHMS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_FAILURE(SCM s_0)
{
#define FUNC_NAME "NLOPT-FAILURE"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_FAILURE);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_INVALID_ARGS(SCM s_0)
{
#define FUNC_NAME "NLOPT-INVALID-ARGS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_INVALID_ARGS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_OUT_OF_MEMORY(SCM s_0)
{
#define FUNC_NAME "NLOPT-OUT-OF-MEMORY"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_OUT_OF_MEMORY);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_ROUNDOFF_LIMITED(SCM s_0)
{
#define FUNC_NAME "NLOPT-ROUNDOFF-LIMITED"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_ROUNDOFF_LIMITED);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_FORCED_STOP(SCM s_0)
{
#define FUNC_NAME "NLOPT-FORCED-STOP"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_FORCED_STOP);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_NUM_FAILURES(SCM s_0)
{
#define FUNC_NAME "NLOPT-NUM-FAILURES"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_NUM_FAILURES);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_SUCCESS(SCM s_0)
{
#define FUNC_NAME "NLOPT-SUCCESS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_SUCCESS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_STOPVAL_REACHED(SCM s_0)
{
#define FUNC_NAME "NLOPT-STOPVAL-REACHED"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_STOPVAL_REACHED);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_FTOL_REACHED(SCM s_0)
{
#define FUNC_NAME "NLOPT-FTOL-REACHED"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_FTOL_REACHED);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_XTOL_REACHED(SCM s_0)
{
#define FUNC_NAME "NLOPT-XTOL-REACHED"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_XTOL_REACHED);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_MAXEVAL_REACHED(SCM s_0)
{
#define FUNC_NAME "NLOPT-MAXEVAL-REACHED"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_MAXEVAL_REACHED);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_MAXTIME_REACHED(SCM s_0)
{
#define FUNC_NAME "NLOPT-MAXTIME-REACHED"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_MAXTIME_REACHED);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_NLOPT_NUM_RESULTS(SCM s_0)
{
#define FUNC_NAME "NLOPT-NUM-RESULTS"
  SCM gswig_result;
  
  {
    gswig_result = scm_from_long(gswig_const_NLOPT_NUM_RESULTS);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_roundoff_limited ()
{
#define FUNC_NAME "new-nlopt-roundoff-limited"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  nlopt::roundoff_limited *result = 0 ;
  
  result = (nlopt::roundoff_limited *)new nlopt::roundoff_limited();
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__roundoff_limited, 1);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_nlopt_roundoff_limited (SCM s_0)
{
#define FUNC_NAME "delete-nlopt-roundoff-limited"
  nlopt::roundoff_limited *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::roundoff_limited *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__roundoff_limited, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_forced_stop ()
{
#define FUNC_NAME "new-nlopt-forced-stop"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  nlopt::forced_stop *result = 0 ;
  
  result = (nlopt::forced_stop *)new nlopt::forced_stop();
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__forced_stop, 1);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_nlopt_forced_stop (SCM s_0)
{
#define FUNC_NAME "delete-nlopt-forced-stop"
  nlopt::forced_stop *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::forced_stop *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__forced_stop, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_opt__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "new-nlopt-opt"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  nlopt::opt *result = 0 ;
  
  try {
    result = (nlopt::opt *)new nlopt::opt();
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__opt, 1);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_delete_nlopt_opt (SCM s_0)
{
#define FUNC_NAME "delete-nlopt-opt"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  delete arg1;
  gswig_result = SCM_UNSPECIFIED;
  
  SWIG_Guile_MarkPointerDestroyed(s_0);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_opt__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "new-nlopt-opt"
  nlopt::algorithm arg1 ;
  unsigned int arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  nlopt::opt *result = 0 ;
  
  {
    arg1 = (nlopt::algorithm) scm_to_int(argv[0]); 
  }
  {
    arg2 = (unsigned int) scm_to_uint(argv[1]);
  }
  try {
    result = (nlopt::opt *)new nlopt::opt(arg1,arg2);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__opt, 1);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_opt__SWIG_2 (int argc, SCM *argv)
{
#define FUNC_NAME "new-nlopt-opt"
  char *arg1 = 0 ;
  unsigned int arg2 ;
  int must_free1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  nlopt::opt *result = 0 ;
  
  {
    arg1 = (char *)SWIG_scm2str(argv[0]);
    must_free1 = 1;
  }
  {
    arg2 = (unsigned int) scm_to_uint(argv[1]);
  }
  try {
    result = (nlopt::opt *)new nlopt::opt((char const *)arg1,arg2);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__opt, 1);
  }
  if (must_free1) SWIG_free(arg1);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_opt__SWIG_3 (int argc, SCM *argv)
{
#define FUNC_NAME "new-nlopt-opt"
  nlopt::opt *arg1 = 0 ;
  nlopt::opt *argp1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  nlopt::opt *result = 0 ;
  
  {
    argp1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
    if (!argp1) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""1" " of type '" "nlopt::opt const &" "'", SCM_EOL); 
    }
    arg1 = argp1;
  }
  try {
    result = (nlopt::opt *)new nlopt::opt((nlopt::opt const &)*arg1);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  {
    gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p_nlopt__opt, 1);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_new_nlopt_opt(SCM rest)
{
#define FUNC_NAME "new-nlopt-opt"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "new-nlopt-opt");
  if (argc == 0) {
    return _wrap_new_nlopt_opt__SWIG_0(argc,argv);
  }
  if (argc == 1) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_nlopt_opt__SWIG_3(argc,argv);
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = scm_is_true(scm_integer_p(argv[0])) && scm_is_true(scm_exact_p(argv[0]))? 1 : 0;
    }
    if (_v) {
      {
        _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0;
      }
      if (_v) {
        return _wrap_new_nlopt_opt__SWIG_1(argc,argv);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      _v = scm_is_string(argv[0]) ? 1 : 0;
    }
    if (_v) {
      {
        _v = scm_is_true(scm_integer_p(argv[1])) && scm_is_true(scm_exact_p(argv[1]))? 1 : 0;
      }
      if (_v) {
        return _wrap_new_nlopt_opt__SWIG_2(argc,argv);
      }
    }
  }
  
  scm_misc_error("new-nlopt-opt", "No matching method for generic function `new_nlopt_opt'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_optimize__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-optimize"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  double *arg3 = 0 ;
  std::vector< double > *argp2 ;
  double *argp3 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  nlopt::result result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "std::vector< double > &" "'", SCM_EOL); 
    }
    arg2 = argp2;
  }
  {
    argp3 = (double *)SWIG_MustGetPtr(argv[2], SWIGTYPE_p_double, 3, 0);
    if (!argp3) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""3" " of type '" "double &" "'", SCM_EOL); 
    }
    arg3 = argp3;
  }
  try {
    result = (nlopt::result)(arg1)->optimize(*arg2,*arg3);
  } catch(nlopt::roundoff_limited &_e) {
    scm_throw(gh_symbol2scm("roundoff-limited"), SCM_EOL);
    
  } catch(nlopt::forced_stop &_e) {
    scm_throw(gh_symbol2scm("forced-stop"), SCM_EOL);
    
  } catch(std::runtime_error &_e) {
    scm_throw(gh_symbol2scm("runtime-error"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  {
    gswig_result = scm_from_long((int)result); 
  }
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_optimize__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-optimize"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > temp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    if (scm_is_vector(argv[1])) {
      unsigned long size = scm_c_vector_length(argv[1]);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else if (scm_is_null(argv[1])) {
      temp2 = std::vector< double >();
      arg2 = &temp2;
    } else if (scm_is_pair(argv[1])) {
      SCM v = scm_vector(argv[1]);
      unsigned long size = scm_c_vector_length(v);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else {
      arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
    }
  }
  try {
    result = (arg1)->optimize((std::vector< double > const &)*arg2);
  } catch(nlopt::roundoff_limited &_e) {
    scm_throw(gh_symbol2scm("roundoff-limited"), SCM_EOL);
    
  } catch(nlopt::forced_stop &_e) {
    scm_throw(gh_symbol2scm("forced-stop"), SCM_EOL);
    
  } catch(std::runtime_error &_e) {
    scm_throw(gh_symbol2scm("runtime-error"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  {
    gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
    for (unsigned int i=0; i<(&result)->size(); i++) {
      SCM x = scm_from_double(((std::vector< double > &)result)[i]);
      scm_vector_set_x(gswig_result,scm_from_long(i),x);
    }
  }
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_optimize(SCM rest)
{
#define FUNC_NAME "nlopt-opt-optimize"
  SCM argv[3];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "nlopt-opt-optimize");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        /* native sequence? */
        if (scm_is_vector(argv[1])) {
          unsigned int size = scm_c_vector_length(argv[1]);
          if (size == 0) {
            /* an empty sequence can be of any type */
            _v = 1;
          } else {
            /* check the first element only */
            SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
            _v = scm_is_number(o) ? 1 : 0;
          }
        } else if (scm_is_null(argv[1])) {
          /* again, an empty sequence can be of any type */
          _v = 1;
        } else if (scm_is_pair(argv[1])) {
          /* check the first element only */
          SCM head = SCM_CAR(argv[1]);
          _v = scm_is_number(head) ? 1 : 0;
        } else {
          /* wrapped vector? */
          std::vector< double >* v;
          _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
              SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
        }
      }
      if (_v) {
        return _wrap_nlopt_opt_optimize__SWIG_1(argc,argv);
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_double, SWIG_POINTER_NO_NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_nlopt_opt_optimize__SWIG_0(argc,argv);
        }
      }
    }
  }
  
  scm_misc_error("nlopt-opt-optimize", "No matching method for generic function `nlopt_opt_optimize'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_last_optimize_result (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-last-optimize-result"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  nlopt::result result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (nlopt::result)((nlopt::opt const *)arg1)->last_optimize_result();
  {
    gswig_result = scm_from_long((int)result); 
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_last_optimum_value (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-last-optimum-value"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  double result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (double)((nlopt::opt const *)arg1)->last_optimum_value();
  {
    gswig_result = scm_from_double(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_algorithm (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-algorithm"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  nlopt::algorithm result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (nlopt::algorithm)((nlopt::opt const *)arg1)->get_algorithm();
  {
    gswig_result = scm_from_long((int)result); 
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_algorithm_name (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-algorithm-name"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  char *result = 0 ;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (char *)((nlopt::opt const *)arg1)->get_algorithm_name();
  {
    gswig_result = SWIG_str02scm((const char *)result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_dimension (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-dimension"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  unsigned int result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (unsigned int)((nlopt::opt const *)arg1)->get_dimension();
  {
    gswig_result = scm_from_ulong(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_min_objective__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-min-objective"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt::func *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::func" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  try {
    (arg1)->set_min_objective(SWIG_STD_MOVE(arg2),arg3);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_min_objective__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-min-objective"
  nlopt::opt *arg1 = 0 ;
  nlopt::vfunc arg2 = 0 ;
  void *arg3 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    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);
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  try {
    (arg1)->set_min_objective(arg2,arg3);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_min_objective__SWIG_2 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-min-objective"
  nlopt::opt *arg1 = 0 ;
  nlopt::functor_type arg2 ;
  nlopt::functor_type *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::functor_type *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__functionT_double_funsigned_int_double_const_p_double_pF_t, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::functor_type" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  (arg1)->set_min_objective(SWIG_STD_MOVE(arg2));
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_max_objective__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-max-objective"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt::func *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::func" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  try {
    (arg1)->set_max_objective(SWIG_STD_MOVE(arg2),arg3);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_max_objective__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-max-objective"
  nlopt::opt *arg1 = 0 ;
  nlopt::vfunc arg2 = 0 ;
  void *arg3 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    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);
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  try {
    (arg1)->set_max_objective(arg2,arg3);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_max_objective__SWIG_2 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-max-objective"
  nlopt::opt *arg1 = 0 ;
  nlopt::functor_type arg2 ;
  nlopt::functor_type *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::functor_type *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__functionT_double_funsigned_int_double_const_p_double_pF_t, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::functor_type" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  (arg1)->set_max_objective(SWIG_STD_MOVE(arg2));
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_min_objective__SWIG_3 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-min-objective"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt_munge arg4 ;
  nlopt_munge arg5 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = func_guile;
    arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
    arg4 = free_guilefunc;
    arg5 = dup_guilefunc;
  }
  try {
    (arg1)->set_min_objective(SWIG_STD_MOVE(arg2),arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5));
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_min_objective(SCM rest)
{
#define FUNC_NAME "nlopt-opt-set-min-objective"
  SCM argv[3];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "nlopt-opt-set-min-objective");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__functionT_double_funsigned_int_double_const_p_double_pF_t, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_nlopt_opt_set_min_objective__SWIG_2(argc,argv);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_procedure_p(argv[1]));
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_nlopt_opt_set_min_objective__SWIG_3(argc,argv);
        }
        if (argc <= 3) {
          return _wrap_nlopt_opt_set_min_objective__SWIG_3(argc,argv);
        }
        if (argc <= 4) {
          return _wrap_nlopt_opt_set_min_objective__SWIG_3(argc,argv);
        }
        return _wrap_nlopt_opt_set_min_objective__SWIG_3(argc,argv);
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_nlopt_opt_set_min_objective__SWIG_0(argc,argv);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_nlopt_opt_set_min_objective__SWIG_1(argc,argv);
        }
      }
    }
  }
  
  scm_misc_error("nlopt-opt-set-min-objective", "No matching method for generic function `nlopt_opt_set_min_objective'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_max_objective__SWIG_3 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-max-objective"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt_munge arg4 ;
  nlopt_munge arg5 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = func_guile;
    arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
    arg4 = free_guilefunc;
    arg5 = dup_guilefunc;
  }
  try {
    (arg1)->set_max_objective(SWIG_STD_MOVE(arg2),arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5));
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_max_objective(SCM rest)
{
#define FUNC_NAME "nlopt-opt-set-max-objective"
  SCM argv[3];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 3, "nlopt-opt-set-max-objective");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__functionT_double_funsigned_int_double_const_p_double_pF_t, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_nlopt_opt_set_max_objective__SWIG_2(argc,argv);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_procedure_p(argv[1]));
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_nlopt_opt_set_max_objective__SWIG_3(argc,argv);
        }
        if (argc <= 3) {
          return _wrap_nlopt_opt_set_max_objective__SWIG_3(argc,argv);
        }
        if (argc <= 4) {
          return _wrap_nlopt_opt_set_max_objective__SWIG_3(argc,argv);
        }
        return _wrap_nlopt_opt_set_max_objective__SWIG_3(argc,argv);
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_nlopt_opt_set_max_objective__SWIG_0(argc,argv);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_nlopt_opt_set_max_objective__SWIG_1(argc,argv);
        }
      }
    }
  }
  
  scm_misc_error("nlopt-opt-set-max-objective", "No matching method for generic function `nlopt_opt_set_max_objective'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_remove_inequality_constraints (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-remove-inequality-constraints"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  try {
    (arg1)->remove_inequality_constraints();
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_constraint__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-inequality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  double arg4 ;
  nlopt::func *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::func" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  {
    arg4 = (double) scm_to_double(argv[3]);
  }
  try {
    (arg1)->add_inequality_constraint(SWIG_STD_MOVE(arg2),arg3,arg4);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_constraint__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-inequality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt::func *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::func" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  try {
    (arg1)->add_inequality_constraint(SWIG_STD_MOVE(arg2),arg3);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_constraint__SWIG_2 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-inequality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::vfunc arg2 = 0 ;
  void *arg3 = 0 ;
  double arg4 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    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);
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  {
    arg4 = (double) scm_to_double(argv[3]);
  }
  try {
    (arg1)->add_inequality_constraint(arg2,arg3,arg4);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_constraint__SWIG_3 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-inequality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::vfunc arg2 = 0 ;
  void *arg3 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    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);
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  try {
    (arg1)->add_inequality_constraint(arg2,arg3);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_mconstraint__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-inequality-mconstraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::mfunc arg2 ;
  void *arg3 = 0 ;
  std::vector< double > *arg4 = 0 ;
  nlopt::mfunc *argp2 ;
  std::vector< double > temp4 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::mfunc *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_mfunc, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::mfunc" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  {
    if (scm_is_vector(argv[3])) {
      unsigned long size = scm_c_vector_length(argv[3]);
      temp4 = std::vector< double >(size);
      arg4 = &temp4;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[3],scm_from_ulong(i));
        if (scm_is_number(o))
        temp4[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 4, argv[3]);
      }
    } else if (scm_is_null(argv[3])) {
      temp4 = std::vector< double >();
      arg4 = &temp4;
    } else if (scm_is_pair(argv[3])) {
      SCM v = scm_vector(argv[3]);
      unsigned long size = scm_c_vector_length(v);
      temp4 = std::vector< double >(size);
      arg4 = &temp4;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp4[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 4, argv[3]);
      }
    } else {
      arg4 = (std::vector< double > *) SWIG_MustGetPtr(argv[3],SWIGTYPE_p_std__vectorT_double_t,4, 0);
    }
  }
  try {
    (arg1)->add_inequality_mconstraint(SWIG_STD_MOVE(arg2),arg3,(std::vector< double > const &)*arg4);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_remove_equality_constraints (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-remove-equality-constraints"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  try {
    (arg1)->remove_equality_constraints();
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_constraint__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-equality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  double arg4 ;
  nlopt::func *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::func" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  {
    arg4 = (double) scm_to_double(argv[3]);
  }
  try {
    (arg1)->add_equality_constraint(SWIG_STD_MOVE(arg2),arg3,arg4);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_constraint__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-equality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt::func *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::func *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_func, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::func" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  try {
    (arg1)->add_equality_constraint(SWIG_STD_MOVE(arg2),arg3);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_constraint__SWIG_2 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-equality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::vfunc arg2 = 0 ;
  void *arg3 = 0 ;
  double arg4 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    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);
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  {
    arg4 = (double) scm_to_double(argv[3]);
  }
  try {
    (arg1)->add_equality_constraint(arg2,arg3,arg4);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_constraint__SWIG_3 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-equality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::vfunc arg2 = 0 ;
  void *arg3 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    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);
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  try {
    (arg1)->add_equality_constraint(arg2,arg3);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_mconstraint__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-equality-mconstraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::mfunc arg2 ;
  void *arg3 = 0 ;
  std::vector< double > *arg4 = 0 ;
  nlopt::mfunc *argp2 ;
  std::vector< double > temp4 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::mfunc *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_mfunc, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::mfunc" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  {
    if (scm_is_vector(argv[3])) {
      unsigned long size = scm_c_vector_length(argv[3]);
      temp4 = std::vector< double >(size);
      arg4 = &temp4;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[3],scm_from_ulong(i));
        if (scm_is_number(o))
        temp4[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 4, argv[3]);
      }
    } else if (scm_is_null(argv[3])) {
      temp4 = std::vector< double >();
      arg4 = &temp4;
    } else if (scm_is_pair(argv[3])) {
      SCM v = scm_vector(argv[3]);
      unsigned long size = scm_c_vector_length(v);
      temp4 = std::vector< double >(size);
      arg4 = &temp4;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp4[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 4, argv[3]);
      }
    } else {
      arg4 = (std::vector< double > *) SWIG_MustGetPtr(argv[3],SWIGTYPE_p_std__vectorT_double_t,4, 0);
    }
  }
  try {
    (arg1)->add_equality_mconstraint(SWIG_STD_MOVE(arg2),arg3,(std::vector< double > const &)*arg4);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_constraint__SWIG_4 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-inequality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt_munge arg4 ;
  nlopt_munge arg5 ;
  double arg6 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = func_guile;
    arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
    arg4 = free_guilefunc;
    arg5 = dup_guilefunc;
  }
  {
    arg6 = (double) scm_to_double(argv[2]);
  }
  try {
    (arg1)->add_inequality_constraint(SWIG_STD_MOVE(arg2),arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5),arg6);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_constraint__SWIG_5 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-inequality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt_munge arg4 ;
  nlopt_munge arg5 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = func_guile;
    arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
    arg4 = free_guilefunc;
    arg5 = dup_guilefunc;
  }
  try {
    (arg1)->add_inequality_constraint(SWIG_STD_MOVE(arg2),arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5));
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_constraint(SCM rest)
{
#define FUNC_NAME "nlopt-opt-add-inequality-constraint"
  SCM argv[4];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "nlopt-opt-add-inequality-constraint");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_procedure_p(argv[1]));
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_nlopt_opt_add_inequality_constraint__SWIG_5(argc,argv);
        }
        if (argc <= 3) {
          return _wrap_nlopt_opt_add_inequality_constraint__SWIG_5(argc,argv);
        }
        if (argc <= 4) {
          return _wrap_nlopt_opt_add_inequality_constraint__SWIG_5(argc,argv);
        }
        return _wrap_nlopt_opt_add_inequality_constraint__SWIG_5(argc,argv);
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_nlopt_opt_add_inequality_constraint__SWIG_3(argc,argv);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_procedure_p(argv[1]));
      }
      if (_v) {
        {
          _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0;
        }
        if (_v) {
          return _wrap_nlopt_opt_add_inequality_constraint__SWIG_4(argc,argv);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_nlopt_opt_add_inequality_constraint__SWIG_1(argc,argv);
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0;
          }
          if (_v) {
            return _wrap_nlopt_opt_add_inequality_constraint__SWIG_2(argc,argv);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0;
          }
          if (_v) {
            return _wrap_nlopt_opt_add_inequality_constraint__SWIG_0(argc,argv);
          }
        }
      }
    }
  }
  
  scm_misc_error("nlopt-opt-add-inequality-constraint", "No matching method for generic function `nlopt_opt_add_inequality_constraint'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_constraint__SWIG_4 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-equality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt_munge arg4 ;
  nlopt_munge arg5 ;
  double arg6 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = func_guile;
    arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
    arg4 = free_guilefunc;
    arg5 = dup_guilefunc;
  }
  {
    arg6 = (double) scm_to_double(argv[2]);
  }
  try {
    (arg1)->add_equality_constraint(SWIG_STD_MOVE(arg2),arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5),arg6);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_constraint__SWIG_5 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-equality-constraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::func arg2 ;
  void *arg3 = 0 ;
  nlopt_munge arg4 ;
  nlopt_munge arg5 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = func_guile;
    arg3 = dup_guilefunc((void*) argv[1]); // input = SCM pointer to Scheme function
    arg4 = free_guilefunc;
    arg5 = dup_guilefunc;
  }
  try {
    (arg1)->add_equality_constraint(SWIG_STD_MOVE(arg2),arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5));
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_constraint(SCM rest)
{
#define FUNC_NAME "nlopt-opt-add-equality-constraint"
  SCM argv[4];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 4, "nlopt-opt-add-equality-constraint");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_procedure_p(argv[1]));
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_nlopt_opt_add_equality_constraint__SWIG_5(argc,argv);
        }
        if (argc <= 3) {
          return _wrap_nlopt_opt_add_equality_constraint__SWIG_5(argc,argv);
        }
        if (argc <= 4) {
          return _wrap_nlopt_opt_add_equality_constraint__SWIG_5(argc,argv);
        }
        return _wrap_nlopt_opt_add_equality_constraint__SWIG_5(argc,argv);
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_nlopt_opt_add_equality_constraint__SWIG_3(argc,argv);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_procedure_p(argv[1]));
      }
      if (_v) {
        {
          _v = scm_is_true(scm_real_p(argv[2])) ? 1 : 0;
        }
        if (_v) {
          return _wrap_nlopt_opt_add_equality_constraint__SWIG_4(argc,argv);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_nlopt_opt_add_equality_constraint__SWIG_1(argc,argv);
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double, 0);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0;
          }
          if (_v) {
            return _wrap_nlopt_opt_add_equality_constraint__SWIG_2(argc,argv);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_func, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = scm_is_true(scm_real_p(argv[3])) ? 1 : 0;
          }
          if (_v) {
            return _wrap_nlopt_opt_add_equality_constraint__SWIG_0(argc,argv);
          }
        }
      }
    }
  }
  
  scm_misc_error("nlopt-opt-add-equality-constraint", "No matching method for generic function `nlopt_opt_add_equality_constraint'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_mconstraint__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-inequality-mconstraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::mfunc arg2 ;
  void *arg3 = 0 ;
  nlopt_munge arg4 ;
  nlopt_munge arg5 ;
  std::vector< double > *arg6 = 0 ;
  nlopt::mfunc *argp2 ;
  nlopt_munge *argp4 ;
  nlopt_munge *argp5 ;
  std::vector< double > temp6 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::mfunc *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_mfunc, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::mfunc" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  {
    argp4 = (nlopt_munge *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_nlopt_munge, 4, 0);
    if (!argp4) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""4" " of type '" "nlopt_munge" "'", SCM_EOL); 
    }
    arg4 = *argp4;
  }
  {
    argp5 = (nlopt_munge *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_nlopt_munge, 5, 0);
    if (!argp5) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""5" " of type '" "nlopt_munge" "'", SCM_EOL); 
    }
    arg5 = *argp5;
  }
  {
    if (scm_is_vector(argv[5])) {
      unsigned long size = scm_c_vector_length(argv[5]);
      temp6 = std::vector< double >(size);
      arg6 = &temp6;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[5],scm_from_ulong(i));
        if (scm_is_number(o))
        temp6[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 6, argv[5]);
      }
    } else if (scm_is_null(argv[5])) {
      temp6 = std::vector< double >();
      arg6 = &temp6;
    } else if (scm_is_pair(argv[5])) {
      SCM v = scm_vector(argv[5]);
      unsigned long size = scm_c_vector_length(v);
      temp6 = std::vector< double >(size);
      arg6 = &temp6;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp6[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 6, argv[5]);
      }
    } else {
      arg6 = (std::vector< double > *) SWIG_MustGetPtr(argv[5],SWIGTYPE_p_std__vectorT_double_t,6, 0);
    }
  }
  try {
    (arg1)->add_inequality_mconstraint(SWIG_STD_MOVE(arg2),arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5),(std::vector< double > const &)*arg6);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_inequality_mconstraint(SCM rest)
{
#define FUNC_NAME "nlopt-opt-add-inequality-mconstraint"
  SCM argv[6];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "nlopt-opt-add-inequality-mconstraint");
  if (argc == 4) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_mfunc, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            /* native sequence? */
            if (scm_is_vector(argv[3])) {
              unsigned int size = scm_c_vector_length(argv[3]);
              if (size == 0) {
                /* an empty sequence can be of any type */
                _v = 1;
              } else {
                /* check the first element only */
                SCM o = scm_vector_ref(argv[3],scm_from_ulong(0));
                _v = scm_is_number(o) ? 1 : 0;
              }
            } else if (scm_is_null(argv[3])) {
              /* again, an empty sequence can be of any type */
              _v = 1;
            } else if (scm_is_pair(argv[3])) {
              /* check the first element only */
              SCM head = SCM_CAR(argv[3]);
              _v = scm_is_number(head) ? 1 : 0;
            } else {
              /* wrapped vector? */
              std::vector< double >* v;
              _v = (SWIG_ConvertPtr(argv[3],(void **) &v, 
                  SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
            }
          }
          if (_v) {
            return _wrap_nlopt_opt_add_inequality_mconstraint__SWIG_0(argc,argv);
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_mfunc, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            void *ptr;
            int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_nlopt_munge, SWIG_POINTER_NO_NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              void *ptr;
              int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_nlopt_munge, SWIG_POINTER_NO_NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                /* native sequence? */
                if (scm_is_vector(argv[5])) {
                  unsigned int size = scm_c_vector_length(argv[5]);
                  if (size == 0) {
                    /* an empty sequence can be of any type */
                    _v = 1;
                  } else {
                    /* check the first element only */
                    SCM o = scm_vector_ref(argv[5],scm_from_ulong(0));
                    _v = scm_is_number(o) ? 1 : 0;
                  }
                } else if (scm_is_null(argv[5])) {
                  /* again, an empty sequence can be of any type */
                  _v = 1;
                } else if (scm_is_pair(argv[5])) {
                  /* check the first element only */
                  SCM head = SCM_CAR(argv[5]);
                  _v = scm_is_number(head) ? 1 : 0;
                } else {
                  /* wrapped vector? */
                  std::vector< double >* v;
                  _v = (SWIG_ConvertPtr(argv[5],(void **) &v, 
                      SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
                }
              }
              if (_v) {
                return _wrap_nlopt_opt_add_inequality_mconstraint__SWIG_1(argc,argv);
              }
            }
          }
        }
      }
    }
  }
  
  scm_misc_error("nlopt-opt-add-inequality-mconstraint", "No matching method for generic function `nlopt_opt_add_inequality_mconstraint'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_mconstraint__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-add-equality-mconstraint"
  nlopt::opt *arg1 = 0 ;
  nlopt::mfunc arg2 ;
  void *arg3 = 0 ;
  nlopt_munge arg4 ;
  nlopt_munge arg5 ;
  std::vector< double > *arg6 = 0 ;
  nlopt::mfunc *argp2 ;
  nlopt_munge *argp4 ;
  nlopt_munge *argp5 ;
  std::vector< double > temp6 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::mfunc *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_nlopt_mfunc, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::mfunc" "'", SCM_EOL); 
    }
    arg2 = *argp2;
  }
  {
    arg3 = (void *)SWIG_MustGetPtr(argv[2], NULL, 3, 0);
  }
  {
    argp4 = (nlopt_munge *)SWIG_MustGetPtr(argv[3], SWIGTYPE_p_nlopt_munge, 4, 0);
    if (!argp4) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""4" " of type '" "nlopt_munge" "'", SCM_EOL); 
    }
    arg4 = *argp4;
  }
  {
    argp5 = (nlopt_munge *)SWIG_MustGetPtr(argv[4], SWIGTYPE_p_nlopt_munge, 5, 0);
    if (!argp5) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""5" " of type '" "nlopt_munge" "'", SCM_EOL); 
    }
    arg5 = *argp5;
  }
  {
    if (scm_is_vector(argv[5])) {
      unsigned long size = scm_c_vector_length(argv[5]);
      temp6 = std::vector< double >(size);
      arg6 = &temp6;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[5],scm_from_ulong(i));
        if (scm_is_number(o))
        temp6[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 6, argv[5]);
      }
    } else if (scm_is_null(argv[5])) {
      temp6 = std::vector< double >();
      arg6 = &temp6;
    } else if (scm_is_pair(argv[5])) {
      SCM v = scm_vector(argv[5]);
      unsigned long size = scm_c_vector_length(v);
      temp6 = std::vector< double >(size);
      arg6 = &temp6;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp6[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 6, argv[5]);
      }
    } else {
      arg6 = (std::vector< double > *) SWIG_MustGetPtr(argv[5],SWIGTYPE_p_std__vectorT_double_t,6, 0);
    }
  }
  try {
    (arg1)->add_equality_mconstraint(SWIG_STD_MOVE(arg2),arg3,SWIG_STD_MOVE(arg4),SWIG_STD_MOVE(arg5),(std::vector< double > const &)*arg6);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_add_equality_mconstraint(SCM rest)
{
#define FUNC_NAME "nlopt-opt-add-equality-mconstraint"
  SCM argv[6];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 6, "nlopt-opt-add-equality-mconstraint");
  if (argc == 4) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_mfunc, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            /* native sequence? */
            if (scm_is_vector(argv[3])) {
              unsigned int size = scm_c_vector_length(argv[3]);
              if (size == 0) {
                /* an empty sequence can be of any type */
                _v = 1;
              } else {
                /* check the first element only */
                SCM o = scm_vector_ref(argv[3],scm_from_ulong(0));
                _v = scm_is_number(o) ? 1 : 0;
              }
            } else if (scm_is_null(argv[3])) {
              /* again, an empty sequence can be of any type */
              _v = 1;
            } else if (scm_is_pair(argv[3])) {
              /* check the first element only */
              SCM head = SCM_CAR(argv[3]);
              _v = scm_is_number(head) ? 1 : 0;
            } else {
              /* wrapped vector? */
              std::vector< double >* v;
              _v = (SWIG_ConvertPtr(argv[3],(void **) &v, 
                  SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
            }
          }
          if (_v) {
            return _wrap_nlopt_opt_add_equality_mconstraint__SWIG_0(argc,argv);
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_nlopt_mfunc, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          void *ptr;
          int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            void *ptr;
            int res = SWIG_ConvertPtr(argv[3], &ptr, SWIGTYPE_p_nlopt_munge, SWIG_POINTER_NO_NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              void *ptr;
              int res = SWIG_ConvertPtr(argv[4], &ptr, SWIGTYPE_p_nlopt_munge, SWIG_POINTER_NO_NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                /* native sequence? */
                if (scm_is_vector(argv[5])) {
                  unsigned int size = scm_c_vector_length(argv[5]);
                  if (size == 0) {
                    /* an empty sequence can be of any type */
                    _v = 1;
                  } else {
                    /* check the first element only */
                    SCM o = scm_vector_ref(argv[5],scm_from_ulong(0));
                    _v = scm_is_number(o) ? 1 : 0;
                  }
                } else if (scm_is_null(argv[5])) {
                  /* again, an empty sequence can be of any type */
                  _v = 1;
                } else if (scm_is_pair(argv[5])) {
                  /* check the first element only */
                  SCM head = SCM_CAR(argv[5]);
                  _v = scm_is_number(head) ? 1 : 0;
                } else {
                  /* wrapped vector? */
                  std::vector< double >* v;
                  _v = (SWIG_ConvertPtr(argv[5],(void **) &v, 
                      SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
                }
              }
              if (_v) {
                return _wrap_nlopt_opt_add_equality_mconstraint__SWIG_1(argc,argv);
              }
            }
          }
        }
      }
    }
  }
  
  scm_misc_error("nlopt-opt-add-equality-mconstraint", "No matching method for generic function `nlopt_opt_add_equality_mconstraint'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_param (SCM s_0, SCM s_1, SCM s_2)
{
#define FUNC_NAME "nlopt-opt-set-param"
  nlopt::opt *arg1 = 0 ;
  char *arg2 = 0 ;
  double arg3 ;
  int must_free2 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (char *)SWIG_scm2str(s_1);
    must_free2 = 1;
  }
  {
    arg3 = (double) scm_to_double(s_2);
  }
  (arg1)->set_param((char const *)arg2,arg3);
  gswig_result = SCM_UNSPECIFIED;
  
  if (must_free2) SWIG_free(arg2);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_param (SCM s_0, SCM s_1, SCM s_2)
{
#define FUNC_NAME "nlopt-opt-get-param"
  nlopt::opt *arg1 = 0 ;
  char *arg2 = 0 ;
  double arg3 ;
  int must_free2 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  double result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (char *)SWIG_scm2str(s_1);
    must_free2 = 1;
  }
  {
    arg3 = (double) scm_to_double(s_2);
  }
  result = (double)((nlopt::opt const *)arg1)->get_param((char const *)arg2,arg3);
  {
    gswig_result = scm_from_double(result);
  }
  
  if (must_free2) SWIG_free(arg2);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_has_param (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-has-param"
  nlopt::opt *arg1 = 0 ;
  char *arg2 = 0 ;
  int must_free2 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  bool result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (char *)SWIG_scm2str(s_1);
    must_free2 = 1;
  }
  result = (bool)((nlopt::opt const *)arg1)->has_param((char const *)arg2);
  {
    gswig_result = scm_from_bool(result);
  }
  
  if (must_free2) SWIG_free(arg2);
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_nth_param (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-nth-param"
  nlopt::opt *arg1 = 0 ;
  unsigned int arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  char *result = 0 ;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (unsigned int) scm_to_uint(s_1);
  }
  result = (char *)((nlopt::opt const *)arg1)->nth_param(arg2);
  {
    gswig_result = SWIG_str02scm((const char *)result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_num_params (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-num-params"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  unsigned int result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (unsigned int)((nlopt::opt const *)arg1)->num_params();
  {
    gswig_result = scm_from_ulong(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_lower_bounds__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-lower-bounds"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(argv[1]);
  }
  try {
    (arg1)->set_lower_bounds(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_lower_bounds__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-get-lower-bounds"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "std::vector< double > &" "'", SCM_EOL); 
    }
    arg2 = argp2;
  }
  ((nlopt::opt const *)arg1)->get_lower_bounds(*arg2);
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_lower_bounds__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-get-lower-bounds"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = ((nlopt::opt const *)arg1)->get_lower_bounds();
  {
    gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
    for (unsigned int i=0; i<(&result)->size(); i++) {
      SCM x = scm_from_double(((std::vector< double > &)result)[i]);
      scm_vector_set_x(gswig_result,scm_from_long(i),x);
    }
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_lower_bounds(SCM rest)
{
#define FUNC_NAME "nlopt-opt-get-lower-bounds"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-get-lower-bounds");
  if (argc == 1) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_nlopt_opt_get_lower_bounds__SWIG_1(argc,argv);
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_nlopt_opt_get_lower_bounds__SWIG_0(argc,argv);
      }
    }
  }
  
  scm_misc_error("nlopt-opt-get-lower-bounds", "No matching method for generic function `nlopt_opt_get_lower_bounds'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_lower_bounds__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-lower-bounds"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > temp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    if (scm_is_vector(argv[1])) {
      unsigned long size = scm_c_vector_length(argv[1]);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else if (scm_is_null(argv[1])) {
      temp2 = std::vector< double >();
      arg2 = &temp2;
    } else if (scm_is_pair(argv[1])) {
      SCM v = scm_vector(argv[1]);
      unsigned long size = scm_c_vector_length(v);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else {
      arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
    }
  }
  try {
    (arg1)->set_lower_bounds((std::vector< double > const &)*arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_lower_bounds(SCM rest)
{
#define FUNC_NAME "nlopt-opt-set-lower-bounds"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-set-lower-bounds");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_nlopt_opt_set_lower_bounds__SWIG_0(argc,argv);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        /* native sequence? */
        if (scm_is_vector(argv[1])) {
          unsigned int size = scm_c_vector_length(argv[1]);
          if (size == 0) {
            /* an empty sequence can be of any type */
            _v = 1;
          } else {
            /* check the first element only */
            SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
            _v = scm_is_number(o) ? 1 : 0;
          }
        } else if (scm_is_null(argv[1])) {
          /* again, an empty sequence can be of any type */
          _v = 1;
        } else if (scm_is_pair(argv[1])) {
          /* check the first element only */
          SCM head = SCM_CAR(argv[1]);
          _v = scm_is_number(head) ? 1 : 0;
        } else {
          /* wrapped vector? */
          std::vector< double >* v;
          _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
              SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
        }
      }
      if (_v) {
        return _wrap_nlopt_opt_set_lower_bounds__SWIG_1(argc,argv);
      }
    }
  }
  
  scm_misc_error("nlopt-opt-set-lower-bounds", "No matching method for generic function `nlopt_opt_set_lower_bounds'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_upper_bounds__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-upper-bounds"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(argv[1]);
  }
  try {
    (arg1)->set_upper_bounds(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_upper_bounds__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-get-upper-bounds"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "std::vector< double > &" "'", SCM_EOL); 
    }
    arg2 = argp2;
  }
  ((nlopt::opt const *)arg1)->get_upper_bounds(*arg2);
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_upper_bounds__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-get-upper-bounds"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = ((nlopt::opt const *)arg1)->get_upper_bounds();
  {
    gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
    for (unsigned int i=0; i<(&result)->size(); i++) {
      SCM x = scm_from_double(((std::vector< double > &)result)[i]);
      scm_vector_set_x(gswig_result,scm_from_long(i),x);
    }
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_upper_bounds(SCM rest)
{
#define FUNC_NAME "nlopt-opt-get-upper-bounds"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-get-upper-bounds");
  if (argc == 1) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_nlopt_opt_get_upper_bounds__SWIG_1(argc,argv);
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_nlopt_opt_get_upper_bounds__SWIG_0(argc,argv);
      }
    }
  }
  
  scm_misc_error("nlopt-opt-get-upper-bounds", "No matching method for generic function `nlopt_opt_get_upper_bounds'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_upper_bounds__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-upper-bounds"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > temp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    if (scm_is_vector(argv[1])) {
      unsigned long size = scm_c_vector_length(argv[1]);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else if (scm_is_null(argv[1])) {
      temp2 = std::vector< double >();
      arg2 = &temp2;
    } else if (scm_is_pair(argv[1])) {
      SCM v = scm_vector(argv[1]);
      unsigned long size = scm_c_vector_length(v);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else {
      arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
    }
  }
  try {
    (arg1)->set_upper_bounds((std::vector< double > const &)*arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_upper_bounds(SCM rest)
{
#define FUNC_NAME "nlopt-opt-set-upper-bounds"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-set-upper-bounds");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_nlopt_opt_set_upper_bounds__SWIG_0(argc,argv);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        /* native sequence? */
        if (scm_is_vector(argv[1])) {
          unsigned int size = scm_c_vector_length(argv[1]);
          if (size == 0) {
            /* an empty sequence can be of any type */
            _v = 1;
          } else {
            /* check the first element only */
            SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
            _v = scm_is_number(o) ? 1 : 0;
          }
        } else if (scm_is_null(argv[1])) {
          /* again, an empty sequence can be of any type */
          _v = 1;
        } else if (scm_is_pair(argv[1])) {
          /* check the first element only */
          SCM head = SCM_CAR(argv[1]);
          _v = scm_is_number(head) ? 1 : 0;
        } else {
          /* wrapped vector? */
          std::vector< double >* v;
          _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
              SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
        }
      }
      if (_v) {
        return _wrap_nlopt_opt_set_upper_bounds__SWIG_1(argc,argv);
      }
    }
  }
  
  scm_misc_error("nlopt-opt-set-upper-bounds", "No matching method for generic function `nlopt_opt_set_upper_bounds'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_stopval (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-stopval"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  double result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (double)((nlopt::opt const *)arg1)->get_stopval();
  {
    gswig_result = scm_from_double(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_stopval (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-stopval"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(s_1);
  }
  try {
    (arg1)->set_stopval(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_ftol_rel (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-ftol-rel"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  double result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (double)((nlopt::opt const *)arg1)->get_ftol_rel();
  {
    gswig_result = scm_from_double(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_ftol_rel (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-ftol-rel"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(s_1);
  }
  try {
    (arg1)->set_ftol_rel(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_ftol_abs (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-ftol-abs"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  double result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (double)((nlopt::opt const *)arg1)->get_ftol_abs();
  {
    gswig_result = scm_from_double(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_ftol_abs (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-ftol-abs"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(s_1);
  }
  try {
    (arg1)->set_ftol_abs(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_xtol_rel (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-xtol-rel"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  double result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (double)((nlopt::opt const *)arg1)->get_xtol_rel();
  {
    gswig_result = scm_from_double(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_xtol_rel (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-xtol-rel"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(s_1);
  }
  try {
    (arg1)->set_xtol_rel(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_xtol_abs__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-xtol-abs"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(argv[1]);
  }
  try {
    (arg1)->set_xtol_abs(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_xtol_abs__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-get-xtol-abs"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "std::vector< double > &" "'", SCM_EOL); 
    }
    arg2 = argp2;
  }
  ((nlopt::opt const *)arg1)->get_xtol_abs(*arg2);
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_xtol_abs__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-get-xtol-abs"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = ((nlopt::opt const *)arg1)->get_xtol_abs();
  {
    gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
    for (unsigned int i=0; i<(&result)->size(); i++) {
      SCM x = scm_from_double(((std::vector< double > &)result)[i]);
      scm_vector_set_x(gswig_result,scm_from_long(i),x);
    }
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_xtol_abs(SCM rest)
{
#define FUNC_NAME "nlopt-opt-get-xtol-abs"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-get-xtol-abs");
  if (argc == 1) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_nlopt_opt_get_xtol_abs__SWIG_1(argc,argv);
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_nlopt_opt_get_xtol_abs__SWIG_0(argc,argv);
      }
    }
  }
  
  scm_misc_error("nlopt-opt-get-xtol-abs", "No matching method for generic function `nlopt_opt_get_xtol_abs'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_xtol_abs__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-xtol-abs"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > temp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    if (scm_is_vector(argv[1])) {
      unsigned long size = scm_c_vector_length(argv[1]);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else if (scm_is_null(argv[1])) {
      temp2 = std::vector< double >();
      arg2 = &temp2;
    } else if (scm_is_pair(argv[1])) {
      SCM v = scm_vector(argv[1]);
      unsigned long size = scm_c_vector_length(v);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else {
      arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
    }
  }
  try {
    (arg1)->set_xtol_abs((std::vector< double > const &)*arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_xtol_abs(SCM rest)
{
#define FUNC_NAME "nlopt-opt-set-xtol-abs"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-set-xtol-abs");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_nlopt_opt_set_xtol_abs__SWIG_0(argc,argv);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        /* native sequence? */
        if (scm_is_vector(argv[1])) {
          unsigned int size = scm_c_vector_length(argv[1]);
          if (size == 0) {
            /* an empty sequence can be of any type */
            _v = 1;
          } else {
            /* check the first element only */
            SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
            _v = scm_is_number(o) ? 1 : 0;
          }
        } else if (scm_is_null(argv[1])) {
          /* again, an empty sequence can be of any type */
          _v = 1;
        } else if (scm_is_pair(argv[1])) {
          /* check the first element only */
          SCM head = SCM_CAR(argv[1]);
          _v = scm_is_number(head) ? 1 : 0;
        } else {
          /* wrapped vector? */
          std::vector< double >* v;
          _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
              SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
        }
      }
      if (_v) {
        return _wrap_nlopt_opt_set_xtol_abs__SWIG_1(argc,argv);
      }
    }
  }
  
  scm_misc_error("nlopt-opt-set-xtol-abs", "No matching method for generic function `nlopt_opt_set_xtol_abs'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_x_weights__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-x-weights"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(argv[1]);
  }
  try {
    (arg1)->set_x_weights(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_x_weights__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-get-x-weights"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (std::vector< double > *)SWIG_MustGetPtr(argv[1], SWIGTYPE_p_std__vectorT_double_t, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "std::vector< double > &" "'", SCM_EOL); 
    }
    arg2 = argp2;
  }
  ((nlopt::opt const *)arg1)->get_x_weights(*arg2);
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_x_weights__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-get-x-weights"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = ((nlopt::opt const *)arg1)->get_x_weights();
  {
    gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
    for (unsigned int i=0; i<(&result)->size(); i++) {
      SCM x = scm_from_double(((std::vector< double > &)result)[i]);
      scm_vector_set_x(gswig_result,scm_from_long(i),x);
    }
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_x_weights(SCM rest)
{
#define FUNC_NAME "nlopt-opt-get-x-weights"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-get-x-weights");
  if (argc == 1) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_nlopt_opt_get_x_weights__SWIG_1(argc,argv);
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        void *ptr;
        int res = SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_nlopt_opt_get_x_weights__SWIG_0(argc,argv);
      }
    }
  }
  
  scm_misc_error("nlopt-opt-get-x-weights", "No matching method for generic function `nlopt_opt_get_x_weights'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_x_weights__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-x-weights"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > temp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    if (scm_is_vector(argv[1])) {
      unsigned long size = scm_c_vector_length(argv[1]);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else if (scm_is_null(argv[1])) {
      temp2 = std::vector< double >();
      arg2 = &temp2;
    } else if (scm_is_pair(argv[1])) {
      SCM v = scm_vector(argv[1]);
      unsigned long size = scm_c_vector_length(v);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else {
      arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
    }
  }
  try {
    (arg1)->set_x_weights((std::vector< double > const &)*arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_x_weights(SCM rest)
{
#define FUNC_NAME "nlopt-opt-set-x-weights"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-set-x-weights");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_nlopt_opt_set_x_weights__SWIG_0(argc,argv);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        /* native sequence? */
        if (scm_is_vector(argv[1])) {
          unsigned int size = scm_c_vector_length(argv[1]);
          if (size == 0) {
            /* an empty sequence can be of any type */
            _v = 1;
          } else {
            /* check the first element only */
            SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
            _v = scm_is_number(o) ? 1 : 0;
          }
        } else if (scm_is_null(argv[1])) {
          /* again, an empty sequence can be of any type */
          _v = 1;
        } else if (scm_is_pair(argv[1])) {
          /* check the first element only */
          SCM head = SCM_CAR(argv[1]);
          _v = scm_is_number(head) ? 1 : 0;
        } else {
          /* wrapped vector? */
          std::vector< double >* v;
          _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
              SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
        }
      }
      if (_v) {
        return _wrap_nlopt_opt_set_x_weights__SWIG_1(argc,argv);
      }
    }
  }
  
  scm_misc_error("nlopt-opt-set-x-weights", "No matching method for generic function `nlopt_opt_set_x_weights'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_maxeval (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-maxeval"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  int result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (int)((nlopt::opt const *)arg1)->get_maxeval();
  {
    gswig_result = scm_from_long(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_maxeval (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-maxeval"
  nlopt::opt *arg1 = 0 ;
  int arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (int) scm_to_int(s_1);
  }
  try {
    (arg1)->set_maxeval(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_numevals (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-numevals"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  int result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (int)((nlopt::opt const *)arg1)->get_numevals();
  {
    gswig_result = scm_from_long(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_maxtime (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-maxtime"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  double result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (double)((nlopt::opt const *)arg1)->get_maxtime();
  {
    gswig_result = scm_from_double(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_maxtime (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-maxtime"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(s_1);
  }
  try {
    (arg1)->set_maxtime(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_force_stop (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-force-stop"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  int result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (int)((nlopt::opt const *)arg1)->get_force_stop();
  {
    gswig_result = scm_from_long(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_force_stop (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-force-stop"
  nlopt::opt *arg1 = 0 ;
  int arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (int) scm_to_int(s_1);
  }
  try {
    (arg1)->set_force_stop(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_force_stop (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-force-stop"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  try {
    (arg1)->force_stop();
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_errmsg (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-errmsg"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  char *result = 0 ;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (char *)((nlopt::opt const *)arg1)->get_errmsg();
  {
    gswig_result = SWIG_str02scm((const char *)result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_local_optimizer (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-local-optimizer"
  nlopt::opt *arg1 = 0 ;
  nlopt::opt *arg2 = 0 ;
  nlopt::opt *argp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    argp2 = (nlopt::opt *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_nlopt__opt, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "nlopt::opt const &" "'", SCM_EOL); 
    }
    arg2 = argp2;
  }
  try {
    (arg1)->set_local_optimizer((nlopt::opt const &)*arg2);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_population (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-population"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  unsigned int result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (unsigned int)((nlopt::opt const *)arg1)->get_population();
  {
    gswig_result = scm_from_ulong(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_population (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-population"
  nlopt::opt *arg1 = 0 ;
  unsigned int arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (unsigned int) scm_to_uint(s_1);
  }
  try {
    (arg1)->set_population(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_vector_storage (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-vector-storage"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  unsigned int result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (unsigned int)((nlopt::opt const *)arg1)->get_vector_storage();
  {
    gswig_result = scm_from_ulong(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_vector_storage (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-vector-storage"
  nlopt::opt *arg1 = 0 ;
  unsigned int arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (unsigned int) scm_to_uint(s_1);
  }
  try {
    (arg1)->set_vector_storage(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_initial_step__SWIG_0 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-initial-step"
  nlopt::opt *arg1 = 0 ;
  double arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (double) scm_to_double(argv[1]);
  }
  try {
    (arg1)->set_initial_step(arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_initial_step__SWIG_1 (int argc, SCM *argv)
{
#define FUNC_NAME "nlopt-opt-set-initial-step"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > temp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(argv[0], SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    if (scm_is_vector(argv[1])) {
      unsigned long size = scm_c_vector_length(argv[1]);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(argv[1],scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else if (scm_is_null(argv[1])) {
      temp2 = std::vector< double >();
      arg2 = &temp2;
    } else if (scm_is_pair(argv[1])) {
      SCM v = scm_vector(argv[1]);
      unsigned long size = scm_c_vector_length(v);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, argv[1]);
      }
    } else {
      arg2 = (std::vector< double > *) SWIG_MustGetPtr(argv[1],SWIGTYPE_p_std__vectorT_double_t,2, 0);
    }
  }
  try {
    (arg1)->set_initial_step((std::vector< double > const &)*arg2);
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_initial_step(SCM rest)
{
#define FUNC_NAME "nlopt-opt-set-initial-step"
  SCM argv[2];
  int argc = SWIG_Guile_GetArgs (argv, rest, 0, 2, "nlopt-opt-set-initial-step");
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = scm_is_true(scm_real_p(argv[1])) ? 1 : 0;
      }
      if (_v) {
        return _wrap_nlopt_opt_set_initial_step__SWIG_0(argc,argv);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    {
      void *ptr;
      int res = SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_nlopt__opt, 0);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        /* native sequence? */
        if (scm_is_vector(argv[1])) {
          unsigned int size = scm_c_vector_length(argv[1]);
          if (size == 0) {
            /* an empty sequence can be of any type */
            _v = 1;
          } else {
            /* check the first element only */
            SCM o = scm_vector_ref(argv[1],scm_from_ulong(0));
            _v = scm_is_number(o) ? 1 : 0;
          }
        } else if (scm_is_null(argv[1])) {
          /* again, an empty sequence can be of any type */
          _v = 1;
        } else if (scm_is_pair(argv[1])) {
          /* check the first element only */
          SCM head = SCM_CAR(argv[1]);
          _v = scm_is_number(head) ? 1 : 0;
        } else {
          /* wrapped vector? */
          std::vector< double >* v;
          _v = (SWIG_ConvertPtr(argv[1],(void **) &v, 
              SWIGTYPE_p_std__vectorT_double_t, 0) != -1) ? 1 : 0;
        }
      }
      if (_v) {
        return _wrap_nlopt_opt_set_initial_step__SWIG_1(argc,argv);
      }
    }
  }
  
  scm_misc_error("nlopt-opt-set-initial-step", "No matching method for generic function `nlopt_opt_set_initial_step'", SCM_EOL);
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_default_initial_step (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-default-initial-step"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > temp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    if (scm_is_vector(s_1)) {
      unsigned long size = scm_c_vector_length(s_1);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(s_1,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, s_1);
      }
    } else if (scm_is_null(s_1)) {
      temp2 = std::vector< double >();
      arg2 = &temp2;
    } else if (scm_is_pair(s_1)) {
      SCM v = scm_vector(s_1);
      unsigned long size = scm_c_vector_length(v);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, s_1);
      }
    } else {
      arg2 = (std::vector< double > *) SWIG_MustGetPtr(s_1,SWIGTYPE_p_std__vectorT_double_t,2, 0);
    }
  }
  try {
    (arg1)->set_default_initial_step((std::vector< double > const &)*arg2);
  } catch(std::bad_alloc &_e) {
    scm_throw(gh_symbol2scm("bad-alloc"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  } catch(std::invalid_argument &_e) {
    scm_throw(gh_symbol2scm("invalid-argument"),
      scm_list_1(scm_from_locale_string((_e).what())));
    
  }
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_initial_step (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-get-initial-step"
  nlopt::opt *arg1 = 0 ;
  std::vector< double > *arg2 = 0 ;
  std::vector< double > temp2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  std::vector< double > result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    if (scm_is_vector(s_1)) {
      unsigned long size = scm_c_vector_length(s_1);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(s_1,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, s_1);
      }
    } else if (scm_is_null(s_1)) {
      temp2 = std::vector< double >();
      arg2 = &temp2;
    } else if (scm_is_pair(s_1)) {
      SCM v = scm_vector(s_1);
      unsigned long size = scm_c_vector_length(v);
      temp2 = std::vector< double >(size);
      arg2 = &temp2;
      for (unsigned long i=0; i<size; i++) {
        SCM o = scm_vector_ref(v,scm_from_ulong(i));
        if (scm_is_number(o))
        temp2[i] = (double)(scm_to_double(o));
        else
        scm_wrong_type_arg(FUNC_NAME, 2, s_1);
      }
    } else {
      arg2 = (std::vector< double > *) SWIG_MustGetPtr(s_1,SWIGTYPE_p_std__vectorT_double_t,2, 0);
    }
  }
  result = ((nlopt::opt const *)arg1)->get_initial_step_((std::vector< double > const &)*arg2);
  {
    gswig_result = scm_make_vector(scm_from_long((&result)->size()),SCM_UNSPECIFIED);
    for (unsigned int i=0; i<(&result)->size(); i++) {
      SCM x = scm_from_double(((std::vector< double > &)result)[i]);
      scm_vector_set_x(gswig_result,scm_from_long(i),x);
    }
  }
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_get_exceptions_enabled (SCM s_0)
{
#define FUNC_NAME "nlopt-opt-get-exceptions-enabled"
  nlopt::opt *arg1 = 0 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  bool result;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  result = (bool)((nlopt::opt const *)arg1)->get_exceptions_enabled();
  {
    gswig_result = scm_from_bool(result);
  }
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_opt_set_exceptions_enabled (SCM s_0, SCM s_1)
{
#define FUNC_NAME "nlopt-opt-set-exceptions-enabled"
  nlopt::opt *arg1 = 0 ;
  bool arg2 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (nlopt::opt *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_nlopt__opt, 1, 0);
  }
  {
    arg2 = (bool) scm_is_true(s_1);
  }
  (arg1)->set_exceptions_enabled(arg2);
  gswig_result = SCM_UNSPECIFIED;
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_srand (SCM s_0)
{
#define FUNC_NAME "nlopt-srand"
  unsigned long arg1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    arg1 = (unsigned long) scm_to_ulong(s_0);
  }
  nlopt::srand(arg1);
  gswig_result = SCM_UNSPECIFIED;
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_srand_time ()
{
#define FUNC_NAME "nlopt-srand-time"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  nlopt::srand_time();
  gswig_result = SCM_UNSPECIFIED;
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_version (SCM s_0, SCM s_1, SCM s_2)
{
#define FUNC_NAME "nlopt-version"
  int *arg1 = 0 ;
  int *arg2 = 0 ;
  int *arg3 = 0 ;
  int *argp1 ;
  int *argp2 ;
  int *argp3 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  
  {
    argp1 = (int *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_int, 1, 0);
    if (!argp1) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""1" " of type '" "int &" "'", SCM_EOL); 
    }
    arg1 = argp1;
  }
  {
    argp2 = (int *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_int, 2, 0);
    if (!argp2) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""2" " of type '" "int &" "'", SCM_EOL); 
    }
    arg2 = argp2;
  }
  {
    argp3 = (int *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_int, 3, 0);
    if (!argp3) {
      scm_misc_error(FUNC_NAME, "invalid null reference for argument ""3" " of type '" "int &" "'", SCM_EOL); 
    }
    arg3 = argp3;
  }
  nlopt::version(*arg1,*arg2,*arg3);
  gswig_result = SCM_UNSPECIFIED;
  
  
  
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_version_major ()
{
#define FUNC_NAME "nlopt-version-major"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  int result;
  
  result = (int)nlopt::version_major();
  {
    gswig_result = scm_from_long(result);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_version_minor ()
{
#define FUNC_NAME "nlopt-version-minor"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  int result;
  
  result = (int)nlopt::version_minor();
  {
    gswig_result = scm_from_long(result);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_version_bugfix ()
{
#define FUNC_NAME "nlopt-version-bugfix"
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  int result;
  
  result = (int)nlopt::version_bugfix();
  {
    gswig_result = scm_from_long(result);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


static SCM
_wrap_nlopt_algorithm_name (SCM s_0)
{
#define FUNC_NAME "nlopt-algorithm-name"
  nlopt::algorithm arg1 ;
  SCM gswig_result;
  SWIGUNUSED int gswig_list_p = 0;
  char *result = 0 ;
  
  {
    arg1 = (nlopt::algorithm) scm_to_int(s_0); 
  }
  result = (char *)nlopt::algorithm_name(arg1);
  {
    gswig_result = SWIG_str02scm((const char *)result);
  }
  
  return gswig_result;
#undef FUNC_NAME
}


#ifdef __cplusplus
extern "C" {
#endif

/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_nlopt__forced_stopTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *) (std::runtime_error *) ((nlopt::forced_stop *) x));
}
static void *_p_nlopt__roundoff_limitedTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *) (std::runtime_error *) ((nlopt::roundoff_limited *) x));
}
static void *_p_std__bad_castTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *)  ((std::bad_cast *) x));
}
static void *_p_std__bad_exceptionTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *)  ((std::bad_exception *) x));
}
static void *_p_std__domain_errorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *) (std::logic_error *) ((std::domain_error *) x));
}
static void *_p_std__invalid_argumentTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *) (std::logic_error *) ((std::invalid_argument *) x));
}
static void *_p_std__length_errorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *) (std::logic_error *) ((std::length_error *) x));
}
static void *_p_std__logic_errorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *)  ((std::logic_error *) x));
}
static void *_p_std__out_of_rangeTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *) (std::logic_error *) ((std::out_of_range *) x));
}
static void *_p_std__overflow_errorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *) (std::runtime_error *) ((std::overflow_error *) x));
}
static void *_p_std__range_errorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *) (std::runtime_error *) ((std::range_error *) x));
}
static void *_p_std__runtime_errorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *)  ((std::runtime_error *) x));
}
static void *_p_std__underflow_errorTo_p_std__exception(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::exception *) (std::runtime_error *) ((std::underflow_error *) x));
}
static void *_p_std__domain_errorTo_p_std__logic_error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::logic_error *)  ((std::domain_error *) x));
}
static void *_p_std__invalid_argumentTo_p_std__logic_error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::logic_error *)  ((std::invalid_argument *) x));
}
static void *_p_std__length_errorTo_p_std__logic_error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::logic_error *)  ((std::length_error *) x));
}
static void *_p_std__out_of_rangeTo_p_std__logic_error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::logic_error *)  ((std::out_of_range *) x));
}
static void *_p_nlopt__forced_stopTo_p_std__runtime_error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::runtime_error *)  ((nlopt::forced_stop *) x));
}
static void *_p_nlopt__roundoff_limitedTo_p_std__runtime_error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::runtime_error *)  ((nlopt::roundoff_limited *) x));
}
static void *_p_std__overflow_errorTo_p_std__runtime_error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::runtime_error *)  ((std::overflow_error *) x));
}
static void *_p_std__range_errorTo_p_std__runtime_error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::runtime_error *)  ((std::range_error *) x));
}
static void *_p_std__underflow_errorTo_p_std__runtime_error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((std::runtime_error *)  ((std::underflow_error *) x));
}
static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
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};
static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_nlopt__forced_stop = {"_p_nlopt__forced_stop", "nlopt::forced_stop *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_nlopt__opt = {"_p_nlopt__opt", "nlopt::opt *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_nlopt__roundoff_limited = {"_p_nlopt__roundoff_limited", "nlopt::roundoff_limited *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_nlopt_func = {"_p_nlopt_func", "nlopt::func *|nlopt_func *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_nlopt_mfunc = {"_p_nlopt_mfunc", "nlopt::mfunc *|nlopt_mfunc *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_nlopt_munge = {"_p_nlopt_munge", "nlopt_munge *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__bad_cast = {"_p_std__bad_cast", "std::bad_cast *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__bad_exception = {"_p_std__bad_exception", "std::bad_exception *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__domain_error = {"_p_std__domain_error", "std::domain_error *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__exception = {"_p_std__exception", "std::exception *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__functionT_double_funsigned_int_double_const_p_double_pF_t = {"_p_std__functionT_double_funsigned_int_double_const_p_double_pF_t", "nlopt::functor_type *|std::function< double (unsigned int,double const *,double *) > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__length_error = {"_p_std__length_error", "std::length_error *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__logic_error = {"_p_std__logic_error", "std::logic_error *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__out_of_range = {"_p_std__out_of_range", "std::out_of_range *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__overflow_error = {"_p_std__overflow_error", "std::overflow_error *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__range_error = {"_p_std__range_error", "std::range_error *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__runtime_error = {"_p_std__runtime_error", "std::runtime_error *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__underflow_error = {"_p_std__underflow_error", "std::underflow_error *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_double_t = {"_p_std__vectorT_double_t", "std::vector< double > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "SCM *|unsigned long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_difference_type,
  &_swigt__p_double,
  &_swigt__p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double,
  &_swigt__p_int,
  &_swigt__p_nlopt__forced_stop,
  &_swigt__p_nlopt__opt,
  &_swigt__p_nlopt__roundoff_limited,
  &_swigt__p_nlopt_func,
  &_swigt__p_nlopt_mfunc,
  &_swigt__p_nlopt_munge,
  &_swigt__p_size_type,
  &_swigt__p_std__bad_cast,
  &_swigt__p_std__bad_exception,
  &_swigt__p_std__domain_error,
  &_swigt__p_std__exception,
  &_swigt__p_std__functionT_double_funsigned_int_double_const_p_double_pF_t,
  &_swigt__p_std__invalid_argument,
  &_swigt__p_std__length_error,
  &_swigt__p_std__logic_error,
  &_swigt__p_std__out_of_range,
  &_swigt__p_std__overflow_error,
  &_swigt__p_std__range_error,
  &_swigt__p_std__runtime_error,
  &_swigt__p_std__underflow_error,
  &_swigt__p_std__vectorT_double_t,
  &_swigt__p_unsigned_long,
  &_swigt__p_value_type,
};

static swig_cast_info _swigc__p_difference_type[] = {  {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
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}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_nlopt__forced_stop[] = {  {&_swigt__p_nlopt__forced_stop, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_nlopt__opt[] = {  {&_swigt__p_nlopt__opt, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_nlopt__roundoff_limited[] = {  {&_swigt__p_nlopt__roundoff_limited, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_nlopt_func[] = {  {&_swigt__p_nlopt_func, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_nlopt_mfunc[] = {  {&_swigt__p_nlopt_mfunc, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_nlopt_munge[] = {  {&_swigt__p_nlopt_munge, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_size_type[] = {  {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__bad_cast[] = {  {&_swigt__p_std__bad_cast, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__bad_exception[] = {  {&_swigt__p_std__bad_exception, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__domain_error[] = {  {&_swigt__p_std__domain_error, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__exception[] = {  {&_swigt__p_std__exception, 0, 0, 0},  {&_swigt__p_nlopt__forced_stop, _p_nlopt__forced_stopTo_p_std__exception, 0, 0},  {&_swigt__p_nlopt__roundoff_limited, _p_nlopt__roundoff_limitedTo_p_std__exception, 0, 0},  {&_swigt__p_std__bad_cast, _p_std__bad_castTo_p_std__exception, 0, 0},  {&_swigt__p_std__bad_exception, _p_std__bad_exceptionTo_p_std__exception, 0, 0},  {&_swigt__p_std__domain_error, _p_std__domain_errorTo_p_std__exception, 0, 0},  {&_swigt__p_std__invalid_argument, _p_std__invalid_argumentTo_p_std__exception, 0, 0},  {&_swigt__p_std__length_error, _p_std__length_errorTo_p_std__exception, 0, 0},  {&_swigt__p_std__logic_error, _p_std__logic_errorTo_p_std__exception, 0, 0},  {&_swigt__p_std__out_of_range, _p_std__out_of_rangeTo_p_std__exception, 0, 0},  {&_swigt__p_std__overflow_error, _p_std__overflow_errorTo_p_std__exception, 0, 0},  {&_swigt__p_std__range_error, _p_std__range_errorTo_p_std__exception, 0, 0},  {&_swigt__p_std__runtime_error, _p_std__runtime_errorTo_p_std__exception, 0, 0},  {&_swigt__p_std__underflow_error, _p_std__underflow_errorTo_p_std__exception, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__functionT_double_funsigned_int_double_const_p_double_pF_t[] = {  {&_swigt__p_std__functionT_double_funsigned_int_double_const_p_double_pF_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__invalid_argument[] = {  {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__length_error[] = {  {&_swigt__p_std__length_error, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__logic_error[] = {  {&_swigt__p_std__logic_error, 0, 0, 0},  {&_swigt__p_std__domain_error, _p_std__domain_errorTo_p_std__logic_error, 0, 0},  {&_swigt__p_std__invalid_argument, _p_std__invalid_argumentTo_p_std__logic_error, 0, 0},  {&_swigt__p_std__length_error, _p_std__length_errorTo_p_std__logic_error, 0, 0},  {&_swigt__p_std__out_of_range, _p_std__out_of_rangeTo_p_std__logic_error, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__out_of_range[] = {  {&_swigt__p_std__out_of_range, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__overflow_error[] = {  {&_swigt__p_std__overflow_error, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__range_error[] = {  {&_swigt__p_std__range_error, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__runtime_error[] = {  {&_swigt__p_std__runtime_error, 0, 0, 0},  {&_swigt__p_nlopt__forced_stop, _p_nlopt__forced_stopTo_p_std__runtime_error, 0, 0},  {&_swigt__p_nlopt__roundoff_limited, _p_nlopt__roundoff_limitedTo_p_std__runtime_error, 0, 0},  {&_swigt__p_std__overflow_error, _p_std__overflow_errorTo_p_std__runtime_error, 0, 0},  {&_swigt__p_std__range_error, _p_std__range_errorTo_p_std__runtime_error, 0, 0},  {&_swigt__p_std__underflow_error, _p_std__underflow_errorTo_p_std__runtime_error, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__underflow_error[] = {  {&_swigt__p_std__underflow_error, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_double_t[] = {  {&_swigt__p_std__vectorT_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_value_type[] = {  {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_difference_type,
  _swigc__p_double,
  _swigc__p_f_r_q_const__std__vector__double___r_std__vector__double___p_void__double,
  _swigc__p_int,
  _swigc__p_nlopt__forced_stop,
  _swigc__p_nlopt__opt,
  _swigc__p_nlopt__roundoff_limited,
  _swigc__p_nlopt_func,
  _swigc__p_nlopt_mfunc,
  _swigc__p_nlopt_munge,
  _swigc__p_size_type,
  _swigc__p_std__bad_cast,
  _swigc__p_std__bad_exception,
  _swigc__p_std__domain_error,
  _swigc__p_std__exception,
  _swigc__p_std__functionT_double_funsigned_int_double_const_p_double_pF_t,
  _swigc__p_std__invalid_argument,
  _swigc__p_std__length_error,
  _swigc__p_std__logic_error,
  _swigc__p_std__out_of_range,
  _swigc__p_std__overflow_error,
  _swigc__p_std__range_error,
  _swigc__p_std__runtime_error,
  _swigc__p_std__underflow_error,
  _swigc__p_std__vectorT_double_t,
  _swigc__p_unsigned_long,
  _swigc__p_value_type,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is made tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned statically to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast dependencies. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns.
 *
 * We loop through the cast[] array associated with the type and mark casts
 * which have not been defined in previously loaded modules by assigning
 * cast pointer value to cast->next. We also hash cast->type->name string
 * and store the value in the cast->value field. If we encounter swig_cast_info
 * structure that represents a cast to self we move it to the beginning
 * of the cast array. One trick we need to do is making sure the type pointer
 * in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the list (because the cast->type) pointer will
 *     be correct.
 *
 * Once the cast array has been set up AND it does have new casts that need
 * to be added we sort non-self cast entries to move filtered out entries
 * to the end of the array and to arrange the rest in the increasing order
 * of their type pointer values. We store the index of the last added entry
 * in the cast->value field of the entry[0] (overwriting the name hash). Then
 * we sort <next|value> fields of the remaining entries to arrange hash values
 * in the increasing order. This way cast->next->type->name field matches
 * the cast->value hash.
 *
 * Example:
 * Array of casts for type stored at 0x5000, cast to type stored at 0x3000
 * has already been loaded
 *
 *      After sweep-and-hash:   After sort-by-type:    After sort-by-hash:
 *        ________________       ________________       ________________
 *       |                |     |                |     |                |
 * Entry |  type = 0x5000 |     |  type = 0x5000 |     |  type = 0x5000 |
 *   0   |                |     |                |     |                |
 *       |  next = Entry0 |     |  next = Entry0 |     |  next = Entry0 |
 *       | value = 1212   |     | value = 3      |     | value = 3      |
 *       |                |     |                |     |                |
 *       |================|     |================|     |================|
 *       |                |     |                |     |                |
 * Entry |  type = 0x2000 |     |  type = 0x1000 |     |  type = 0x1000 |
 *   1   |                |     |                |     |                |
 *       |  next = Entry1 |     |  next = Entry1 |     |  next = Entry3 |
 *       | value = 3434   |     | value = 4545   |     | value = 2323   |
 *       |________________|     |________________|     |________________|
 *       |                |     |                |     |                |
 * Entry |  type = 0x3000 |     |  type = 0x2000 |     |  type = 0x2000 |
 *   2   |                |     |                |     |                |
 *       |  next = 0      |     |  next = Entry2 |     |  next = Entry2 |
 *       | value = 0      |     | value = 3434   |     | value = 3434   |
 *       |________________|     |________________|     |________________|
 *       |                |     |                |     |                |
 * Entry |  type = 0x1000 |     |  type = 0x4000 |     |  type = 0x4000 |
 *   3   |                |     |                |     |                |
 *       |  next = Entry3 |     |  next = Entry3 |     |  next = Entry1 |
 *       | value = 4545   |     | value = 2323   |     | value = 4545   |
 *       |________________|     |________________|     |________________|
 *       |                |     |                |     |                |
 * Entry |  type = 0x4000 |     |  type = 0x3000 |     |  type = 0x3000 |
 *   4   |                |     |                |     |                |
 *       |  next = Entry4 |     |  next = 0      |     |  next = 0      |
 *       | value = 2323   |     | value = 0      |     | value = 0      |
 *       |________________|     |________________|     |________________|
 *
 * Once the cast array has been initialized, we use cast[0]->next field to link
 * it into the list of cast arrays for the type.
 *              ____    ____    ____
 * type->cast->|next|->|next|->|next|->0
 *             |----|  |----|  |----|
 *             |----|  |----|  |----|
 *             |----|  |----|  |----|
 *
 * Subsequent cast resolution works as follows:
 *
 * 1. Check whether the type matches the first entry in the current cast array.
 * 2. If not, then do a binary search over the (0:cast->value] interval using
 *    either type address or the hash value of the type name.
 * 3. If not found, then move over to the next cast array (cast[0]->next).
 *
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif

#ifndef SWIG_INIT_CLIENT_DATA_TYPE
#define SWIG_INIT_CLIENT_DATA_TYPE void *
#endif

/*
 * Sort function that puts cast entries with nonzero 'next' at the front
 * of the array while ordering them by addresses of their 'type' structs.
 */
SWIGINTERN int SWIG_CastCmpStruct(const void *pa, const void *pb) {
  swig_cast_info *pca = (swig_cast_info *)pa;
  swig_cast_info *pcb = (swig_cast_info *)pb;
  if (pca->type < pcb->type)
  return (pca->next || pcb->next == 0) ? -1 : 1;
  if (pca->type > pcb->type)
  return (pcb->next || pca->next == 0) ? 1 : -1;
  return 0;
}

/*
 * Shell-sort 'next' and 'value' field pairs to order them by 'value'.
 */
SWIGINTERN void SWIG_CastHashSort(swig_cast_info *cast, int size) {
  const int hmax = size/9;
  int h, i;
  for(h = 1; h <= hmax; h = 3*h+1);
  for(; h > 0; h /= 3)
  {
    for(i = h; i < size; ++i)
    {
      swig_cast_info *p = cast[i].next;
      unsigned int hash = cast[i].value;
      int j = i;
      while(j >= h && hash < cast[j-h].value)
      {
        cast[j].next = cast[j-h].next;
        cast[j].value = cast[j-h].value;
        j -= h;
      }
      cast[j].next = p;
      cast[j].value = hash;
    }
  }
}

SWIGRUNTIME void
SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;
  
  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }
  
  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpreters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *target_type;
    swig_cast_info *cast, *first;
    int num_mapped = 0;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = first = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      target_type = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        target_type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
        if (target_type) {
          /* Target type already defined in another module */
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: found cast %s\n", target_type->name);
#endif
          if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
            printf("SWIG_InitializeModule: skip old type %s\n", target_type->name);
#endif
            cast->type = target_type;
            target_type = 0;
          } else {
            /* Check if this cast is already in the list */
            swig_cast_info *ocast = SWIG_TypeCheck(target_type->name, type);
#ifdef SWIGRUNTIME_DEBUG
            if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", target_type->name);
#endif
            if (!ocast) target_type = 0;
          }
        }
      }
      
      if (!target_type) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        /* Set inclusion mark for sorting */
        cast->next = cast;
        num_mapped++;
        
        if (type == cast->type) {
#ifdef SWIGRUNTIME_DEBUG
          printf("%s : self cast at pos [%li]\n", type->name, cast - first);
#endif
          if (cast - first) {
            /* Move cast to itself to the first entry in the array */
            
            swig_cast_info tmp = *cast;
            *cast = *first;
            *first = tmp;
          }
          first++;
          
        } else {
          cast->value = SWIG_Hash(cast->type->name, (unsigned int)strlen(cast->type->name));
        }
      }
      cast++;
    }
    
    if (num_mapped) {
      if (cast - first) {
        swig_cast_info *tmp;
        
        /* Sort casts by type address for binary search in SWIG_TypeCheckStruct */
        qsort(first, cast - first, sizeof(swig_cast_info), SWIG_CastCmpStruct);
        
        /* Remap back links for added entries */
        cast = swig_module.cast_initial[i] + num_mapped;
        for (tmp = first; tmp < cast; tmp++) {
          tmp->next = tmp;
        }
      }
      
      /* Set the value field of the first entry to the index of the last added entry */
      cast = swig_module.cast_initial[i];
      cast->value = num_mapped - 1;
      
      num_mapped -= (int)(first - cast);
      if (num_mapped > 1) {
        /* Sort <'next','value'> pairs by 'value' for binary search in SWIG_TypeCheck */
        
        SWIG_CastHashSort(first, num_mapped);
      }
      
      first = type->cast;
      if (first) {
        /* Link the current set into the list of cast arrays */
        cast->next = first->next;
        first->next = cast;
      } else {
        cast->next = 0;
        type->cast = cast;
      }
    }
    
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  static int init_run = 0;
  
  if (init_run) return;
  init_run = 1;
  
  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      swig_cast_info *head, *cast;
      head = swig_module.types[i]->cast;
      while (head) {
        for (cast = head; (cast - head) <= head->value; cast++) {
          if (!cast->converter) {
            if (cast->type && !cast->type->clientdata)
            SWIG_TypeClientData(cast->type, swig_module.types[i]->clientdata);
          }
        }
        head = head->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{
  /* c-mode */
#endif
}
#endif


SWIG_GUILE_INIT_STATIC void
SWIG_init(void)
{
  SWIG_InitializeModule(0);
  SWIG_PropagateClientData();
  
  SWIG_TypeClientData(SWIGTYPE_p_std__bad_cast, (void *) &_swig_guile_clientdatabad_cast);
  scm_c_define_gsubr("new-bad-cast", 0, 0, 0, (swig_guile_proc) _wrap_new_bad_cast);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__bad_cast->clientdata))->destroy = (guile_destructor) _wrap_delete_bad_cast;
  scm_c_define_gsubr("delete-bad-cast", 1, 0, 0, (swig_guile_proc) _wrap_delete_bad_cast);
  SWIG_TypeClientData(SWIGTYPE_p_std__bad_exception, (void *) &_swig_guile_clientdatabad_exception);
  scm_c_define_gsubr("new-bad-exception", 0, 0, 0, (swig_guile_proc) _wrap_new_bad_exception);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__bad_exception->clientdata))->destroy = (guile_destructor) _wrap_delete_bad_exception;
  scm_c_define_gsubr("delete-bad-exception", 1, 0, 0, (swig_guile_proc) _wrap_delete_bad_exception);
  SWIG_TypeClientData(SWIGTYPE_p_std__logic_error, (void *) &_swig_guile_clientdatalogic_error);
  scm_c_define_gsubr("new-logic-error", 1, 0, 0, (swig_guile_proc) _wrap_new_logic_error);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__logic_error->clientdata))->destroy = (guile_destructor) _wrap_delete_logic_error;
  scm_c_define_gsubr("delete-logic-error", 1, 0, 0, (swig_guile_proc) _wrap_delete_logic_error);
  SWIG_TypeClientData(SWIGTYPE_p_std__domain_error, (void *) &_swig_guile_clientdatadomain_error);
  scm_c_define_gsubr("new-domain-error", 1, 0, 0, (swig_guile_proc) _wrap_new_domain_error);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__domain_error->clientdata))->destroy = (guile_destructor) _wrap_delete_domain_error;
  scm_c_define_gsubr("delete-domain-error", 1, 0, 0, (swig_guile_proc) _wrap_delete_domain_error);
  SWIG_TypeClientData(SWIGTYPE_p_std__invalid_argument, (void *) &_swig_guile_clientdatainvalid_argument);
  scm_c_define_gsubr("new-invalid-argument", 1, 0, 0, (swig_guile_proc) _wrap_new_invalid_argument);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__invalid_argument->clientdata))->destroy = (guile_destructor) _wrap_delete_invalid_argument;
  scm_c_define_gsubr("delete-invalid-argument", 1, 0, 0, (swig_guile_proc) _wrap_delete_invalid_argument);
  SWIG_TypeClientData(SWIGTYPE_p_std__length_error, (void *) &_swig_guile_clientdatalength_error);
  scm_c_define_gsubr("new-length-error", 1, 0, 0, (swig_guile_proc) _wrap_new_length_error);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__length_error->clientdata))->destroy = (guile_destructor) _wrap_delete_length_error;
  scm_c_define_gsubr("delete-length-error", 1, 0, 0, (swig_guile_proc) _wrap_delete_length_error);
  SWIG_TypeClientData(SWIGTYPE_p_std__out_of_range, (void *) &_swig_guile_clientdataout_of_range);
  scm_c_define_gsubr("new-out-of-range", 1, 0, 0, (swig_guile_proc) _wrap_new_out_of_range);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__out_of_range->clientdata))->destroy = (guile_destructor) _wrap_delete_out_of_range;
  scm_c_define_gsubr("delete-out-of-range", 1, 0, 0, (swig_guile_proc) _wrap_delete_out_of_range);
  SWIG_TypeClientData(SWIGTYPE_p_std__runtime_error, (void *) &_swig_guile_clientdataruntime_error);
  scm_c_define_gsubr("new-runtime-error", 1, 0, 0, (swig_guile_proc) _wrap_new_runtime_error);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__runtime_error->clientdata))->destroy = (guile_destructor) _wrap_delete_runtime_error;
  scm_c_define_gsubr("delete-runtime-error", 1, 0, 0, (swig_guile_proc) _wrap_delete_runtime_error);
  SWIG_TypeClientData(SWIGTYPE_p_std__range_error, (void *) &_swig_guile_clientdatarange_error);
  scm_c_define_gsubr("new-range-error", 1, 0, 0, (swig_guile_proc) _wrap_new_range_error);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__range_error->clientdata))->destroy = (guile_destructor) _wrap_delete_range_error;
  scm_c_define_gsubr("delete-range-error", 1, 0, 0, (swig_guile_proc) _wrap_delete_range_error);
  SWIG_TypeClientData(SWIGTYPE_p_std__overflow_error, (void *) &_swig_guile_clientdataoverflow_error);
  scm_c_define_gsubr("new-overflow-error", 1, 0, 0, (swig_guile_proc) _wrap_new_overflow_error);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__overflow_error->clientdata))->destroy = (guile_destructor) _wrap_delete_overflow_error;
  scm_c_define_gsubr("delete-overflow-error", 1, 0, 0, (swig_guile_proc) _wrap_delete_overflow_error);
  SWIG_TypeClientData(SWIGTYPE_p_std__underflow_error, (void *) &_swig_guile_clientdataunderflow_error);
  scm_c_define_gsubr("new-underflow-error", 1, 0, 0, (swig_guile_proc) _wrap_new_underflow_error);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__underflow_error->clientdata))->destroy = (guile_destructor) _wrap_delete_underflow_error;
  scm_c_define_gsubr("delete-underflow-error", 1, 0, 0, (swig_guile_proc) _wrap_delete_underflow_error);
  SWIG_TypeClientData(SWIGTYPE_p_std__vectorT_double_t, (void *) &_swig_guile_clientdatanlopt_doublevector);
  scm_c_define_gsubr("new-nlopt-doublevector", 0, 0, 1, (swig_guile_proc) _wrap_new_nlopt_doublevector);
  scm_c_define_gsubr("nlopt-doublevector-length", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_length);
  scm_c_define_gsubr("nlopt-doublevector-empty?", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_emptyq___);
  scm_c_define_gsubr("nlopt-doublevector-clear!", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_clearN___);
  scm_c_define_gsubr("nlopt-doublevector-push!", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_pushN___);
  scm_c_define_gsubr("nlopt-doublevector-pop!", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_popN___);
  scm_c_define_gsubr("nlopt-doublevector-ref", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_ref);
  scm_c_define_gsubr("nlopt-doublevector-set!", 3, 0, 0, (swig_guile_proc) _wrap_nlopt_doublevector_setN___);
  ((swig_guile_clientdata *)(SWIGTYPE_p_std__vectorT_double_t->clientdata))->destroy = (guile_destructor) _wrap_delete_nlopt_doublevector;
  scm_c_define_gsubr("delete-nlopt-doublevector", 1, 0, 0, (swig_guile_proc) _wrap_delete_nlopt_doublevector);
  scm_c_define_gsubr("NLOPT-GN-DIRECT", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT);
  scm_c_define_gsubr("NLOPT-GN-DIRECT-L", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_L);
  scm_c_define_gsubr("NLOPT-GN-DIRECT-L-RAND", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_L_RAND);
  scm_c_define_gsubr("NLOPT-GN-DIRECT-NOSCAL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_NOSCAL);
  scm_c_define_gsubr("NLOPT-GN-DIRECT-L-NOSCAL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_L_NOSCAL);
  scm_c_define_gsubr("NLOPT-GN-DIRECT-L-RAND-NOSCAL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_DIRECT_L_RAND_NOSCAL);
  scm_c_define_gsubr("NLOPT-GN-ORIG-DIRECT", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_ORIG_DIRECT);
  scm_c_define_gsubr("NLOPT-GN-ORIG-DIRECT-L", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_ORIG_DIRECT_L);
  scm_c_define_gsubr("NLOPT-GD-STOGO", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GD_STOGO);
  scm_c_define_gsubr("NLOPT-GD-STOGO-RAND", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GD_STOGO_RAND);
  scm_c_define_gsubr("NLOPT-LD-LBFGS-NOCEDAL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_LBFGS_NOCEDAL);
  scm_c_define_gsubr("NLOPT-LD-LBFGS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_LBFGS);
  scm_c_define_gsubr("NLOPT-LN-PRAXIS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_PRAXIS);
  scm_c_define_gsubr("NLOPT-LD-VAR1", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_VAR1);
  scm_c_define_gsubr("NLOPT-LD-VAR2", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_VAR2);
  scm_c_define_gsubr("NLOPT-LD-TNEWTON", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_TNEWTON);
  scm_c_define_gsubr("NLOPT-LD-TNEWTON-RESTART", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_TNEWTON_RESTART);
  scm_c_define_gsubr("NLOPT-LD-TNEWTON-PRECOND", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_TNEWTON_PRECOND);
  scm_c_define_gsubr("NLOPT-LD-TNEWTON-PRECOND-RESTART", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_TNEWTON_PRECOND_RESTART);
  scm_c_define_gsubr("NLOPT-GN-CRS2-LM", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_CRS2_LM);
  scm_c_define_gsubr("NLOPT-GN-MLSL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_MLSL);
  scm_c_define_gsubr("NLOPT-GD-MLSL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GD_MLSL);
  scm_c_define_gsubr("NLOPT-GN-MLSL-LDS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_MLSL_LDS);
  scm_c_define_gsubr("NLOPT-GD-MLSL-LDS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GD_MLSL_LDS);
  scm_c_define_gsubr("NLOPT-LD-MMA", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_MMA);
  scm_c_define_gsubr("NLOPT-LN-COBYLA", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_COBYLA);
  scm_c_define_gsubr("NLOPT-LN-NEWUOA", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_NEWUOA);
  scm_c_define_gsubr("NLOPT-LN-NEWUOA-BOUND", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_NEWUOA_BOUND);
  scm_c_define_gsubr("NLOPT-LN-NELDERMEAD", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_NELDERMEAD);
  scm_c_define_gsubr("NLOPT-LN-SBPLX", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_SBPLX);
  scm_c_define_gsubr("NLOPT-LN-AUGLAG", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_AUGLAG);
  scm_c_define_gsubr("NLOPT-LD-AUGLAG", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_AUGLAG);
  scm_c_define_gsubr("NLOPT-LN-AUGLAG-EQ", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_AUGLAG_EQ);
  scm_c_define_gsubr("NLOPT-LD-AUGLAG-EQ", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_AUGLAG_EQ);
  scm_c_define_gsubr("NLOPT-LN-BOBYQA", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LN_BOBYQA);
  scm_c_define_gsubr("NLOPT-GN-ISRES", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_ISRES);
  scm_c_define_gsubr("NLOPT-AUGLAG", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_AUGLAG);
  scm_c_define_gsubr("NLOPT-AUGLAG-EQ", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_AUGLAG_EQ);
  scm_c_define_gsubr("NLOPT-G-MLSL", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_G_MLSL);
  scm_c_define_gsubr("NLOPT-G-MLSL-LDS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_G_MLSL_LDS);
  scm_c_define_gsubr("NLOPT-LD-SLSQP", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_SLSQP);
  scm_c_define_gsubr("NLOPT-LD-CCSAQ", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_LD_CCSAQ);
  scm_c_define_gsubr("NLOPT-GN-ESCH", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_ESCH);
  scm_c_define_gsubr("NLOPT-GN-AGS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_GN_AGS);
  scm_c_define_gsubr("NLOPT-NUM-ALGORITHMS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_NUM_ALGORITHMS);
  scm_c_define_gsubr("NLOPT-FAILURE", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_FAILURE);
  scm_c_define_gsubr("NLOPT-INVALID-ARGS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_INVALID_ARGS);
  scm_c_define_gsubr("NLOPT-OUT-OF-MEMORY", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_OUT_OF_MEMORY);
  scm_c_define_gsubr("NLOPT-ROUNDOFF-LIMITED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_ROUNDOFF_LIMITED);
  scm_c_define_gsubr("NLOPT-FORCED-STOP", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_FORCED_STOP);
  scm_c_define_gsubr("NLOPT-NUM-FAILURES", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_NUM_FAILURES);
  scm_c_define_gsubr("NLOPT-SUCCESS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_SUCCESS);
  scm_c_define_gsubr("NLOPT-STOPVAL-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_STOPVAL_REACHED);
  scm_c_define_gsubr("NLOPT-FTOL-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_FTOL_REACHED);
  scm_c_define_gsubr("NLOPT-XTOL-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_XTOL_REACHED);
  scm_c_define_gsubr("NLOPT-MAXEVAL-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_MAXEVAL_REACHED);
  scm_c_define_gsubr("NLOPT-MAXTIME-REACHED", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_MAXTIME_REACHED);
  scm_c_define_gsubr("NLOPT-NUM-RESULTS", 0, 0, 0, (swig_guile_proc) _wrap_NLOPT_NUM_RESULTS);
  SWIG_TypeClientData(SWIGTYPE_p_nlopt__roundoff_limited, (void *) &_swig_guile_clientdatanlopt_roundoff_limited);
  scm_c_define_gsubr("new-nlopt-roundoff-limited", 0, 0, 0, (swig_guile_proc) _wrap_new_nlopt_roundoff_limited);
  ((swig_guile_clientdata *)(SWIGTYPE_p_nlopt__roundoff_limited->clientdata))->destroy = (guile_destructor) _wrap_delete_nlopt_roundoff_limited;
  scm_c_define_gsubr("delete-nlopt-roundoff-limited", 1, 0, 0, (swig_guile_proc) _wrap_delete_nlopt_roundoff_limited);
  SWIG_TypeClientData(SWIGTYPE_p_nlopt__forced_stop, (void *) &_swig_guile_clientdatanlopt_forced_stop);
  scm_c_define_gsubr("new-nlopt-forced-stop", 0, 0, 0, (swig_guile_proc) _wrap_new_nlopt_forced_stop);
  ((swig_guile_clientdata *)(SWIGTYPE_p_nlopt__forced_stop->clientdata))->destroy = (guile_destructor) _wrap_delete_nlopt_forced_stop;
  scm_c_define_gsubr("delete-nlopt-forced-stop", 1, 0, 0, (swig_guile_proc) _wrap_delete_nlopt_forced_stop);
  SWIG_TypeClientData(SWIGTYPE_p_nlopt__opt, (void *) &_swig_guile_clientdatanlopt_opt);
  ((swig_guile_clientdata *)(SWIGTYPE_p_nlopt__opt->clientdata))->destroy = (guile_destructor) _wrap_delete_nlopt_opt;
  scm_c_define_gsubr("delete-nlopt-opt", 1, 0, 0, (swig_guile_proc) _wrap_delete_nlopt_opt);
  scm_c_define_gsubr("new-nlopt-opt", 0, 0, 1, (swig_guile_proc) _wrap_new_nlopt_opt);
  scm_c_define_gsubr("nlopt-opt-optimize", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_optimize);
  scm_c_define_gsubr("nlopt-opt-last-optimize-result", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_last_optimize_result);
  scm_c_define_gsubr("nlopt-opt-last-optimum-value", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_last_optimum_value);
  scm_c_define_gsubr("nlopt-opt-get-algorithm", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_algorithm);
  scm_c_define_gsubr("nlopt-opt-get-algorithm-name", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_algorithm_name);
  scm_c_define_gsubr("nlopt-opt-get-dimension", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_dimension);
  scm_c_define_gsubr("nlopt-opt-set-min-objective", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_min_objective);
  scm_c_define_gsubr("nlopt-opt-set-max-objective", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_max_objective);
  scm_c_define_gsubr("nlopt-opt-remove-inequality-constraints", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_remove_inequality_constraints);
  scm_c_define_gsubr("nlopt-opt-remove-equality-constraints", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_remove_equality_constraints);
  scm_c_define_gsubr("nlopt-opt-add-inequality-constraint", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_add_inequality_constraint);
  scm_c_define_gsubr("nlopt-opt-add-equality-constraint", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_add_equality_constraint);
  scm_c_define_gsubr("nlopt-opt-add-inequality-mconstraint", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_add_inequality_mconstraint);
  scm_c_define_gsubr("nlopt-opt-add-equality-mconstraint", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_add_equality_mconstraint);
  scm_c_define_gsubr("nlopt-opt-set-param", 3, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_param);
  scm_c_define_gsubr("nlopt-opt-get-param", 3, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_param);
  scm_c_define_gsubr("nlopt-opt-has-param", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_has_param);
  scm_c_define_gsubr("nlopt-opt-nth-param", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_nth_param);
  scm_c_define_gsubr("nlopt-opt-num-params", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_num_params);
  scm_c_define_gsubr("nlopt-opt-get-lower-bounds", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_get_lower_bounds);
  scm_c_define_gsubr("nlopt-opt-set-lower-bounds", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_lower_bounds);
  scm_c_define_gsubr("nlopt-opt-get-upper-bounds", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_get_upper_bounds);
  scm_c_define_gsubr("nlopt-opt-set-upper-bounds", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_upper_bounds);
  scm_c_define_gsubr("nlopt-opt-get-stopval", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_stopval);
  scm_c_define_gsubr("nlopt-opt-set-stopval", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_stopval);
  scm_c_define_gsubr("nlopt-opt-get-ftol-rel", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_ftol_rel);
  scm_c_define_gsubr("nlopt-opt-set-ftol-rel", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_ftol_rel);
  scm_c_define_gsubr("nlopt-opt-get-ftol-abs", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_ftol_abs);
  scm_c_define_gsubr("nlopt-opt-set-ftol-abs", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_ftol_abs);
  scm_c_define_gsubr("nlopt-opt-get-xtol-rel", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_xtol_rel);
  scm_c_define_gsubr("nlopt-opt-set-xtol-rel", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_xtol_rel);
  scm_c_define_gsubr("nlopt-opt-get-xtol-abs", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_get_xtol_abs);
  scm_c_define_gsubr("nlopt-opt-set-xtol-abs", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_xtol_abs);
  scm_c_define_gsubr("nlopt-opt-get-x-weights", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_get_x_weights);
  scm_c_define_gsubr("nlopt-opt-set-x-weights", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_x_weights);
  scm_c_define_gsubr("nlopt-opt-get-maxeval", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_maxeval);
  scm_c_define_gsubr("nlopt-opt-set-maxeval", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_maxeval);
  scm_c_define_gsubr("nlopt-opt-get-numevals", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_numevals);
  scm_c_define_gsubr("nlopt-opt-get-maxtime", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_maxtime);
  scm_c_define_gsubr("nlopt-opt-set-maxtime", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_maxtime);
  scm_c_define_gsubr("nlopt-opt-get-force-stop", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_force_stop);
  scm_c_define_gsubr("nlopt-opt-set-force-stop", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_force_stop);
  scm_c_define_gsubr("nlopt-opt-force-stop", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_force_stop);
  scm_c_define_gsubr("nlopt-opt-get-errmsg", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_errmsg);
  scm_c_define_gsubr("nlopt-opt-set-local-optimizer", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_local_optimizer);
  scm_c_define_gsubr("nlopt-opt-get-population", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_population);
  scm_c_define_gsubr("nlopt-opt-set-population", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_population);
  scm_c_define_gsubr("nlopt-opt-get-vector-storage", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_vector_storage);
  scm_c_define_gsubr("nlopt-opt-set-vector-storage", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_vector_storage);
  scm_c_define_gsubr("nlopt-opt-set-initial-step", 0, 0, 1, (swig_guile_proc) _wrap_nlopt_opt_set_initial_step);
  scm_c_define_gsubr("nlopt-opt-set-default-initial-step", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_default_initial_step);
  scm_c_define_gsubr("nlopt-opt-get-initial-step", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_initial_step);
  scm_c_define_gsubr("nlopt-opt-get-exceptions-enabled", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_get_exceptions_enabled);
  scm_c_define_gsubr("nlopt-opt-set-exceptions-enabled", 2, 0, 0, (swig_guile_proc) _wrap_nlopt_opt_set_exceptions_enabled);
  scm_c_define_gsubr("nlopt-srand", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_srand);
  scm_c_define_gsubr("nlopt-srand-time", 0, 0, 0, (swig_guile_proc) _wrap_nlopt_srand_time);
  scm_c_define_gsubr("nlopt-version", 3, 0, 0, (swig_guile_proc) _wrap_nlopt_version);
  scm_c_define_gsubr("nlopt-version-major", 0, 0, 0, (swig_guile_proc) _wrap_nlopt_version_major);
  scm_c_define_gsubr("nlopt-version-minor", 0, 0, 0, (swig_guile_proc) _wrap_nlopt_version_minor);
  scm_c_define_gsubr("nlopt-version-bugfix", 0, 0, 0, (swig_guile_proc) _wrap_nlopt_version_bugfix);
  scm_c_define_gsubr("nlopt-algorithm-name", 1, 0, 0, (swig_guile_proc) _wrap_nlopt_algorithm_name);
}

#ifdef __cplusplus
}
#endif
extern "C" {
/* Linkage: simple */

}

